All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: octeon-usb: Add brackets to avoid precedence issues
@ 2019-03-04 17:57 Nishka Dasgupta
  2019-03-04 19:03 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Nishka Dasgupta @ 2019-03-04 17:57 UTC (permalink / raw)
  To: gregkh, outreachy-kernel; +Cc: Nishka Dasgupta

Add parentheses around macro arguments to avoid precedence issues. Issue
found with Checkpatch.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
---
 drivers/staging/octeon-usb/octeon-hcd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/octeon-usb/octeon-hcd.h b/drivers/staging/octeon-usb/octeon-hcd.h
index ae7ae50071ae..0ee74f63fdbf 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.h
+++ b/drivers/staging/octeon-usb/octeon-hcd.h
@@ -51,10 +51,10 @@
 #include <asm/bitfield.h>
 
 #define CVMX_USBCXBASE 0x00016F0010000000ull
-#define CVMX_USBCXREG1(reg, bid) \
+#define CVMX_USBCXREG1((reg), bid) \
 	(CVMX_ADD_IO_SEG(CVMX_USBCXBASE | reg) + \
 	 ((bid) & 1) * 0x100000000000ull)
-#define CVMX_USBCXREG2(reg, bid, off) \
+#define CVMX_USBCXREG2((reg), bid, off) \
 	(CVMX_ADD_IO_SEG(CVMX_USBCXBASE | reg) + \
 	 (((off) & 7) + ((bid) & 1) * 0x8000000000ull) * 32)
 
-- 
2.19.1



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

* Re: [PATCH] staging: octeon-usb: Add brackets to avoid precedence issues
  2019-03-04 17:57 [PATCH] staging: octeon-usb: Add brackets to avoid precedence issues Nishka Dasgupta
@ 2019-03-04 19:03 ` Greg KH
  2019-03-04 20:14   ` [Outreachy kernel] " Nishka Dasgupta
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2019-03-04 19:03 UTC (permalink / raw)
  To: Nishka Dasgupta; +Cc: outreachy-kernel

On Mon, Mar 04, 2019 at 11:27:53PM +0530, Nishka Dasgupta wrote:
> Add parentheses around macro arguments to avoid precedence issues. Issue
> found with Checkpatch.
> 
> Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
> ---
>  drivers/staging/octeon-usb/octeon-hcd.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/octeon-usb/octeon-hcd.h b/drivers/staging/octeon-usb/octeon-hcd.h
> index ae7ae50071ae..0ee74f63fdbf 100644
> --- a/drivers/staging/octeon-usb/octeon-hcd.h
> +++ b/drivers/staging/octeon-usb/octeon-hcd.h
> @@ -51,10 +51,10 @@
>  #include <asm/bitfield.h>
>  
>  #define CVMX_USBCXBASE 0x00016F0010000000ull
> -#define CVMX_USBCXREG1(reg, bid) \
> +#define CVMX_USBCXREG1((reg), bid) \

I really do not think you changed any "precedence issues" here at all :(



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

* Re: [Outreachy kernel] Re: [PATCH] staging: octeon-usb: Add brackets to avoid precedence issues
  2019-03-04 19:03 ` Greg KH
@ 2019-03-04 20:14   ` Nishka Dasgupta
  0 siblings, 0 replies; 3+ messages in thread
From: Nishka Dasgupta @ 2019-03-04 20:14 UTC (permalink / raw)
  To: Greg KH; +Cc: Nishka Dasgupta, outreachy-kernel

On Tue, Mar 5, 2019 at 12:33 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Mon, Mar 04, 2019 at 11:27:53PM +0530, Nishka Dasgupta wrote:
> > Add parentheses around macro arguments to avoid precedence issues. Issue
> > found with Checkpatch.
> >
> > Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
> > ---
> >  drivers/staging/octeon-usb/octeon-hcd.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/octeon-usb/octeon-hcd.h b/drivers/staging/octeon-usb/octeon-hcd.h
> > index ae7ae50071ae..0ee74f63fdbf 100644
> > --- a/drivers/staging/octeon-usb/octeon-hcd.h
> > +++ b/drivers/staging/octeon-usb/octeon-hcd.h
> > @@ -51,10 +51,10 @@
> >  #include <asm/bitfield.h>
> >
> >  #define CVMX_USBCXBASE 0x00016F0010000000ull
> > -#define CVMX_USBCXREG1(reg, bid) \
> > +#define CVMX_USBCXREG1((reg), bid) \
>
> I really do not think you changed any "precedence issues" here at all :(

Sorry about that; I won't submit this kind of patch in future.

- Nishka
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190304190311.GE13830%40kroah.com.
> For more options, visit https://groups.google.com/d/optout.


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

end of thread, other threads:[~2019-03-04 20:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 17:57 [PATCH] staging: octeon-usb: Add brackets to avoid precedence issues Nishka Dasgupta
2019-03-04 19:03 ` Greg KH
2019-03-04 20:14   ` [Outreachy kernel] " Nishka Dasgupta

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.