diff mbox series

dt-bindings: connector: Replace BIT macro with generic bit ops

Message ID 20210527101345.569725-1-kyletso@google.com
State Accepted
Commit 9257bd80b917cc7908abd27ed5a5211964563f62
Headers show
Series dt-bindings: connector: Replace BIT macro with generic bit ops | expand

Commit Message

Kyle Tso May 27, 2021, 10:13 a.m. UTC
BIT macro is not supported in dt-bindings. Replace it with generic bit
operations.

Fixes: 630dce2810b9 ("dt-bindings: connector: Add SVDM VDO properties")
Signed-off-by: Kyle Tso <kyletso@google.com>
---
 include/dt-bindings/usb/pd.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Comments

Kyle Tso May 27, 2021, 12:12 p.m. UTC | #1
On Thu, May 27, 2021 at 6:21 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Thu, May 27, 2021 at 06:13:45PM +0800, Kyle Tso wrote:
> > BIT macro is not supported in dt-bindings. Replace it with generic bit
> > operations.
>
> Why isn't the BIT macro supported there?  How are we going to "remember"
> that I should not take patches that use this #define in that location?

I rephrased the commit message in v2

thanks,
Kyle

>
> thanks,
>
> greg k-h
diff mbox series

Patch

diff --git a/include/dt-bindings/usb/pd.h b/include/dt-bindings/usb/pd.h
index fef3ef65967f..cb70b4ceedde 100644
--- a/include/dt-bindings/usb/pd.h
+++ b/include/dt-bindings/usb/pd.h
@@ -163,10 +163,10 @@ 
 #define UFP_VDO_VER1_2		2
 
 /* Device Capability */
-#define DEV_USB2_CAPABLE	BIT(0)
-#define DEV_USB2_BILLBOARD	BIT(1)
-#define DEV_USB3_CAPABLE	BIT(2)
-#define DEV_USB4_CAPABLE	BIT(3)
+#define DEV_USB2_CAPABLE	(1 << 0)
+#define DEV_USB2_BILLBOARD	(1 << 1)
+#define DEV_USB3_CAPABLE	(1 << 2)
+#define DEV_USB4_CAPABLE	(1 << 3)
 
 /* Connector Type */
 #define UFP_RECEPTACLE		2
@@ -191,9 +191,9 @@ 
 
 /* Alternate Modes */
 #define UFP_ALTMODE_NOT_SUPP	0
-#define UFP_ALTMODE_TBT3	BIT(0)
-#define UFP_ALTMODE_RECFG	BIT(1)
-#define UFP_ALTMODE_NO_RECFG	BIT(2)
+#define UFP_ALTMODE_TBT3	(1 << 0)
+#define UFP_ALTMODE_RECFG	(1 << 1)
+#define UFP_ALTMODE_NO_RECFG	(1 << 2)
 
 /* USB Highest Speed */
 #define UFP_USB2_ONLY		0
@@ -217,9 +217,9 @@ 
  * <4:0>   :: Port number
  */
 #define DFP_VDO_VER1_1		1
-#define HOST_USB2_CAPABLE	BIT(0)
-#define HOST_USB3_CAPABLE	BIT(1)
-#define HOST_USB4_CAPABLE	BIT(2)
+#define HOST_USB2_CAPABLE	(1 << 0)
+#define HOST_USB3_CAPABLE	(1 << 1)
+#define HOST_USB4_CAPABLE	(1 << 2)
 #define DFP_RECEPTACLE		2
 #define DFP_CAPTIVE		3