All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: line6: fix parentheses around macro in usbdefs.h
@ 2014-12-03  8:22 Sam van Kampen
  2014-12-03 16:04 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Sam van Kampen @ 2014-12-03  8:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel

>From a9deb1763d3f23a3b005e63fdc896c6d903097d1 Mon Sep 17 00:00:00 2001
From: Sam van Kampen <sam@tehsvk.net>
Date: Wed, 3 Dec 2014 09:05:51 +0100
Subject: [PATCH] Staging: line6: fix parentheses around macro in usbdefs.h

This patch fixes the error "Macros with complex values should be enclosed in
parentheses", as reported by checkpatch.pl.

Signed-off-by: Sam van Kampen <sam@tehsvk.net>
---
 drivers/staging/line6/usbdefs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/line6/usbdefs.h b/drivers/staging/line6/usbdefs.h
index 2d1cc47..48958b5 100644
--- a/drivers/staging/line6/usbdefs.h
+++ b/drivers/staging/line6/usbdefs.h
@@ -40,7 +40,7 @@
 #define LINE6_DEVID_TONEPORT_UX2  0x4142
 #define LINE6_DEVID_VARIAX        0x534d
 
-#define LINE6_BIT(x) LINE6_BIT_ ## x = 1 << LINE6_INDEX_ ## x
+#define LINE6_BIT(x) (LINE6_BIT_ ## x = 1 << LINE6_INDEX_ ## x)
 
 enum {
 	LINE6_INDEX_BASSPODXT,
-- 
2.0.4


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

* Re: [PATCH] Staging: line6: fix parentheses around macro in usbdefs.h
  2014-12-03  8:22 [PATCH] Staging: line6: fix parentheses around macro in usbdefs.h Sam van Kampen
@ 2014-12-03 16:04 ` Greg Kroah-Hartman
  2014-12-03 17:57   ` Sam van Kampen
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-03 16:04 UTC (permalink / raw)
  To: Sam van Kampen; +Cc: linux-kernel

On Wed, Dec 03, 2014 at 09:22:49AM +0100, Sam van Kampen wrote:
> >From a9deb1763d3f23a3b005e63fdc896c6d903097d1 Mon Sep 17 00:00:00 2001
> From: Sam van Kampen <sam@tehsvk.net>
> Date: Wed, 3 Dec 2014 09:05:51 +0100
> Subject: [PATCH] Staging: line6: fix parentheses around macro in usbdefs.h

Why is this mess here?

> This patch fixes the error "Macros with complex values should be enclosed in
> parentheses", as reported by checkpatch.pl.
> 
> Signed-off-by: Sam van Kampen <sam@tehsvk.net>
> ---
>  drivers/staging/line6/usbdefs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Any reason you didn't use scripts/get_maintainer.pl to determine who to
send the patch to?  Please do that and resend.

thanks,

greg k-h

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

* Re: [PATCH] Staging: line6: fix parentheses around macro in usbdefs.h
  2014-12-03 16:04 ` Greg Kroah-Hartman
@ 2014-12-03 17:57   ` Sam van Kampen
  0 siblings, 0 replies; 6+ messages in thread
From: Sam van Kampen @ 2014-12-03 17:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: LKML

On Wed, Dec 03, 2014 at 08:04:34AM -0800, Greg Kroah-Hartman wrote:
> On Wed, Dec 03, 2014 at 09:22:49AM +0100, Sam van Kampen wrote:
> > >From a9deb1763d3f23a3b005e63fdc896c6d903097d1 Mon Sep 17 00:00:00 2001
> > From: Sam van Kampen <sam@tehsvk.net>
> > Date: Wed, 3 Dec 2014 09:05:51 +0100
> > Subject: [PATCH] Staging: line6: fix parentheses around macro in usbdefs.h
> 
> Why is this mess here?
Sorry, the mess was auto-generated by git format-patch. I had seen it
before on the mailing list and therefore didn't question it.

> 
> > This patch fixes the error "Macros with complex values should be enclosed in
> > parentheses", as reported by checkpatch.pl.
> > 
> > Signed-off-by: Sam van Kampen <sam@tehsvk.net>
> > ---
> >  drivers/staging/line6/usbdefs.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Any reason you didn't use scripts/get_maintainer.pl to determine who to
> send the patch to?  Please do that and resend.
I wasn't sure whether I should send the patch to everyone on that list,
so I merely sent it to you and linux-kernel (missing the list for the
staging subsystem). I'll resend it, without the mess and with the
correct recipients.

Thanks,
Sam

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

* Re: [PATCH] Staging: line6: fix parentheses around macro in usbdefs.h
  2014-12-03 18:34 Sam van Kampen
  2014-12-03 18:45 ` Joe Perches
@ 2015-01-12 19:51 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2015-01-12 19:51 UTC (permalink / raw)
  To: Sam van Kampen; +Cc: LKML, Chris Bajumpaa, Monam Agarwal, Davide Berardi, devel

On Wed, Dec 03, 2014 at 07:34:42PM +0100, Sam van Kampen wrote:
> This patch fixes the error "Macros with complex values should be enclosed in
> parentheses", as reported by checkpatch.pl.
> 
> Signed-off-by: Sam van Kampen <sam@tehsvk.net>
> ---
>  drivers/staging/line6/usbdefs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/line6/usbdefs.h b/drivers/staging/line6/usbdefs.h
> index 2d1cc47..48958b5 100644
> --- a/drivers/staging/line6/usbdefs.h
> +++ b/drivers/staging/line6/usbdefs.h
> @@ -40,7 +40,7 @@
>  #define LINE6_DEVID_TONEPORT_UX2  0x4142
>  #define LINE6_DEVID_VARIAX        0x534d
>  
> -#define LINE6_BIT(x) LINE6_BIT_ ## x = 1 << LINE6_INDEX_ ## x
> +#define LINE6_BIT(x) (LINE6_BIT_ ## x = 1 << LINE6_INDEX_ ## x)
>  
>  enum {
>  	LINE6_INDEX_BASSPODXT,

I love this line in the driver, it proves that people make changes to
the code without even building it.

Please ALWAYS test-build your patches, otherwise you waste people's time
and make them grumpy.

greg k-h

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

* Re: [PATCH] Staging: line6: fix parentheses around macro in usbdefs.h
  2014-12-03 18:34 Sam van Kampen
@ 2014-12-03 18:45 ` Joe Perches
  2015-01-12 19:51 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 6+ messages in thread
From: Joe Perches @ 2014-12-03 18:45 UTC (permalink / raw)
  To: Sam van Kampen
  Cc: Greg Kroah-Hartman, LKML, Chris Bajumpaa, Monam Agarwal,
	Davide Berardi, devel

On Wed, 2014-12-03 at 19:34 +0100, Sam van Kampen wrote:
> This patch fixes the error "Macros with complex values should be enclosed in
> parentheses", as reported by checkpatch.pl.
[]
> diff --git a/drivers/staging/line6/usbdefs.h b/drivers/staging/line6/usbdefs.h
[]
> @@ -40,7 +40,7 @@
>  #define LINE6_DEVID_TONEPORT_UX2  0x4142
>  #define LINE6_DEVID_VARIAX        0x534d
>  
> -#define LINE6_BIT(x) LINE6_BIT_ ## x = 1 << LINE6_INDEX_ ## x
> +#define LINE6_BIT(x) (LINE6_BIT_ ## x = 1 << LINE6_INDEX_ ## x)

The uses are pretty ugly.

It'd probably be nicer if all the LINE6_BIT uses were
direct enum declarations instead.




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

* [PATCH] Staging: line6: fix parentheses around macro in usbdefs.h
@ 2014-12-03 18:34 Sam van Kampen
  2014-12-03 18:45 ` Joe Perches
  2015-01-12 19:51 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 6+ messages in thread
From: Sam van Kampen @ 2014-12-03 18:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: LKML, Chris Bajumpaa, Monam Agarwal, Davide Berardi, devel

This patch fixes the error "Macros with complex values should be enclosed in
parentheses", as reported by checkpatch.pl.

Signed-off-by: Sam van Kampen <sam@tehsvk.net>
---
 drivers/staging/line6/usbdefs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/line6/usbdefs.h b/drivers/staging/line6/usbdefs.h
index 2d1cc47..48958b5 100644
--- a/drivers/staging/line6/usbdefs.h
+++ b/drivers/staging/line6/usbdefs.h
@@ -40,7 +40,7 @@
 #define LINE6_DEVID_TONEPORT_UX2  0x4142
 #define LINE6_DEVID_VARIAX        0x534d
 
-#define LINE6_BIT(x) LINE6_BIT_ ## x = 1 << LINE6_INDEX_ ## x
+#define LINE6_BIT(x) (LINE6_BIT_ ## x = 1 << LINE6_INDEX_ ## x)
 
 enum {
 	LINE6_INDEX_BASSPODXT,
-- 
2.0.4

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

end of thread, other threads:[~2015-01-12 19:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-03  8:22 [PATCH] Staging: line6: fix parentheses around macro in usbdefs.h Sam van Kampen
2014-12-03 16:04 ` Greg Kroah-Hartman
2014-12-03 17:57   ` Sam van Kampen
2014-12-03 18:34 Sam van Kampen
2014-12-03 18:45 ` Joe Perches
2015-01-12 19:51 ` Greg Kroah-Hartman

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.