All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: connector: Replace BIT macro with generic bit ops
@ 2021-05-27 12:10 Kyle Tso
  2021-05-27 12:41 ` Greg KH
  2021-06-02 20:18 ` Rob Herring
  0 siblings, 2 replies; 5+ messages in thread
From: Kyle Tso @ 2021-05-27 12:10 UTC (permalink / raw)
  To: heikki.krogerus, robh+dt, gregkh
  Cc: badhri, linux-kernel, devicetree, Kyle Tso

BIT macro is not defined. Replace it with generic bit operations.

Fixes: 630dce2810b9 ("dt-bindings: connector: Add SVDM VDO properties")
Signed-off-by: Kyle Tso <kyletso@google.com>
---
Changes since v1:
- re-word the commit message

 include/dt-bindings/usb/pd.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

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
 
-- 
2.31.1.818.g46aad6cb9e-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dt-bindings: connector: Replace BIT macro with generic bit ops
  2021-05-27 12:10 [PATCH v2] dt-bindings: connector: Replace BIT macro with generic bit ops Kyle Tso
@ 2021-05-27 12:41 ` Greg KH
  2021-05-27 12:52   ` Rob Herring
  2021-06-02 20:18 ` Rob Herring
  1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2021-05-27 12:41 UTC (permalink / raw)
  To: Kyle Tso; +Cc: heikki.krogerus, robh+dt, badhri, linux-kernel, devicetree

On Thu, May 27, 2021 at 08:10:29PM +0800, Kyle Tso wrote:
> BIT macro is not defined. Replace it with generic bit operations.
> 
> Fixes: 630dce2810b9 ("dt-bindings: connector: Add SVDM VDO properties")
> Signed-off-by: Kyle Tso <kyletso@google.com>
> ---
> Changes since v1:
> - re-word the commit message
> 
>  include/dt-bindings/usb/pd.h | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> 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)

Why not just include the proper .h file instead?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dt-bindings: connector: Replace BIT macro with generic bit ops
  2021-05-27 12:41 ` Greg KH
@ 2021-05-27 12:52   ` Rob Herring
  2021-05-27 13:02     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2021-05-27 12:52 UTC (permalink / raw)
  To: Greg KH
  Cc: Kyle Tso, Heikki Krogerus, Badhri Jagan Sridharan, linux-kernel,
	devicetree

On Thu, May 27, 2021 at 7:41 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Thu, May 27, 2021 at 08:10:29PM +0800, Kyle Tso wrote:
> > BIT macro is not defined. Replace it with generic bit operations.
> >
> > Fixes: 630dce2810b9 ("dt-bindings: connector: Add SVDM VDO properties")
> > Signed-off-by: Kyle Tso <kyletso@google.com>
> > ---
> > Changes since v1:
> > - re-word the commit message
> >
> >  include/dt-bindings/usb/pd.h | 20 ++++++++++----------
> >  1 file changed, 10 insertions(+), 10 deletions(-)
> >
> > 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)
>
> Why not just include the proper .h file instead?

Because the DT headers can't depend on kernel headers as they get used
separately.

Rob

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dt-bindings: connector: Replace BIT macro with generic bit ops
  2021-05-27 12:52   ` Rob Herring
@ 2021-05-27 13:02     ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2021-05-27 13:02 UTC (permalink / raw)
  To: Rob Herring
  Cc: Kyle Tso, Heikki Krogerus, Badhri Jagan Sridharan, linux-kernel,
	devicetree

On Thu, May 27, 2021 at 07:52:24AM -0500, Rob Herring wrote:
> On Thu, May 27, 2021 at 7:41 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Thu, May 27, 2021 at 08:10:29PM +0800, Kyle Tso wrote:
> > > BIT macro is not defined. Replace it with generic bit operations.
> > >
> > > Fixes: 630dce2810b9 ("dt-bindings: connector: Add SVDM VDO properties")
> > > Signed-off-by: Kyle Tso <kyletso@google.com>
> > > ---
> > > Changes since v1:
> > > - re-word the commit message
> > >
> > >  include/dt-bindings/usb/pd.h | 20 ++++++++++----------
> > >  1 file changed, 10 insertions(+), 10 deletions(-)
> > >
> > > 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)
> >
> > Why not just include the proper .h file instead?
> 
> Because the DT headers can't depend on kernel headers as they get used
> separately.

Lame.  :)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] dt-bindings: connector: Replace BIT macro with generic bit ops
  2021-05-27 12:10 [PATCH v2] dt-bindings: connector: Replace BIT macro with generic bit ops Kyle Tso
  2021-05-27 12:41 ` Greg KH
@ 2021-06-02 20:18 ` Rob Herring
  1 sibling, 0 replies; 5+ messages in thread
From: Rob Herring @ 2021-06-02 20:18 UTC (permalink / raw)
  To: Kyle Tso
  Cc: devicetree, linux-kernel, gregkh, badhri, robh+dt, heikki.krogerus

On Thu, 27 May 2021 20:10:29 +0800, Kyle Tso wrote:
> BIT macro is not defined. Replace it with generic bit operations.
> 
> Fixes: 630dce2810b9 ("dt-bindings: connector: Add SVDM VDO properties")
> Signed-off-by: Kyle Tso <kyletso@google.com>
> ---
> Changes since v1:
> - re-word the commit message
> 
>  include/dt-bindings/usb/pd.h | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-02 20:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27 12:10 [PATCH v2] dt-bindings: connector: Replace BIT macro with generic bit ops Kyle Tso
2021-05-27 12:41 ` Greg KH
2021-05-27 12:52   ` Rob Herring
2021-05-27 13:02     ` Greg KH
2021-06-02 20:18 ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.