The branch main has been updated by manu:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=0860c27fe8cf144cb10f8916a0b8fe5ad57a3d9e

commit 0860c27fe8cf144cb10f8916a0b8fe5ad57a3d9e
Author:     Emmanuel Vadot <m...@freebsd.org>
AuthorDate: 2022-11-16 10:57:56 +0000
Commit:     Emmanuel Vadot <m...@freebsd.org>
CommitDate: 2022-11-16 10:58:32 +0000

    usb/dwc3: Use more () for macros variables
    
    Suggested by:   andrew
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
---
 sys/dev/usb/controller/dwc3.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/usb/controller/dwc3.h b/sys/dev/usb/controller/dwc3.h
index fd61d1129df3..72420890d28c 100644
--- a/sys/dev/usb/controller/dwc3.h
+++ b/sys/dev/usb/controller/dwc3.h
@@ -99,7 +99,7 @@
 #define         DWC3_GUSB2PHYCFG0_USBTRDTIM_8BITS      9
 #define         DWC3_GUSB2PHYCFG0_USBTRDTIM_16BITS     5
 #define         DWC3_GUSB2PHYCFG0_ENBLSLPM             (1 << 8)
-#define         DWC3_GUSB2PHYCFG0_PHYSEL(x)            ((x >> 7) & 0x1)        
/* 0 = USB2.0, 1 = USB1.1 */
+#define         DWC3_GUSB2PHYCFG0_PHYSEL(x)            (((x) >> 7) & 0x1)      
/* 0 = USB2.0, 1 = USB1.1 */
 #define         DWC3_GUSB2PHYCFG0_SUSPENDUSB20         (1 << 6)
 #define         DWC3_GUSB2PHYCFG0_ULPI_UTMI_SEL        (1 << 4)
 #define         DWC3_GUSB2PHYCFG0_PHYIF                (1 << 3)
@@ -110,7 +110,7 @@
 #define         DWC3_GUSB3PIPECTL0_DELAYP1TRANS        (1 << 18)
 #define         DWC3_GUSB3PIPECTL0_SUSPENDUSB3         (1 << 17)
 
-#define        DWC3_HWPARAMS3_SSPHY(x)                 (x & 0x3)
+#define        DWC3_HWPARAMS3_SSPHY(x)                 ((x) & 0x3)
 #define         DWC3_HWPARAMS3_SSPHY_DISABLE           0
 #define         DWC3_HWPARAMS3_SSPHY_GEN1              1
 #define         DWC3_HWPARAMS3_SSPHY_GEN2              2

Reply via email to