staging: octeon-usb: fixed precedence issue
PATCH 1/1 staging: octeon-usb: fixed precedence issue
Added parenthesis around reg macro to avoid precedence issue identified by checkpatch.pl
--- drivers/staging/octeon-usb/octeon-hcd.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/octeon-usb/octeon-hcd.h +8 -8
@@ -51,11 +51,11 @@#include <asm/bitfield.h> #define CVMX_USBCXBASE 0x00016F0010000000ull -#define CVMX_USBCXREG1 (reg, bid) \ - (CVMX_ADD_IO_SEG(CVMX_USBCXBASE | reg) + \ +#define CVMX_USBCXREG1((reg), bid) \ + (CVMX_ADD_IO_SEG(CVMX_USBCXBASE | (reg)) + \ ((bid) & 1) * 0x100000000000ull) -#define CVMX_USBCXREG2 (reg, bid, off) \ - (CVMX_ADD_IO_SEG(CVMX_USBCXBASE | reg) + \ +#define CVMX_USBCXREG2((reg), bid, off) \ + (CVMX_ADD_IO_SEG(CVMX_USBCXBASE | (reg)) + \ (((off) & 7) + ((bid) & 1) * 0x8000000000ull) * 32)#define CVMX_USBCX_GAHBCFG (bid) CVMX_USBCXREG1(0x008, bid)
@@ -86,10 +86,10 @@#define CVMX_USBNXBID1 (bid) (((bid) & 1) * 0x10000000ull)#define CVMX_USBNXBID2 (bid) (((bid) & 1) * 0x100000000000ull) -#define CVMX_USBNXREG1 (reg, bid) \ - (CVMX_ADD_IO_SEG(0x0001180068000000ull | reg) + CVMX_USBNXBID1(bid)) -#define CVMX_USBNXREG2 (reg, bid) \ - (CVMX_ADD_IO_SEG(0x00016F0000000000ull | reg) + CVMX_USBNXBID2(bid)) +#define CVMX_USBNXREG1((reg), bid) \ + (CVMX_ADD_IO_SEG(0x0001180068000000ull | (reg)) + CVMX_USBNXBID1(bid)) +#define CVMX_USBNXREG2((reg), bid) \ + (CVMX_ADD_IO_SEG(0x00016F0000000000ull | (reg)) + CVMX_USBNXBID2(bid))#define CVMX_USBNX_CLK_CTL (bid) CVMX_USBNXREG1(0x10, bid)#define CVMX_USBNX_DMA0_INB_CHN0 (bid) CVMX_USBNXREG2(0x818, bid)
Signature · 1 line
2.17.1
Greg KH
maintainerQuoted 13 lines · Selvakumar Elangovan
Added parenthesis around reg macro to avoid precedence issue identified by checkpatch.pl
Signed-off-by Selvakumar Elangovan <[email protected]>--- drivers/staging/octeon-usb/octeon-hcd.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/staging/octeon-usb/octeon-hcd.h +0
-0
drivers/staging/octeon-usb/octeon-hcd.h line 54
Quoted 6 lines
drivers/staging/octeon-usb/octeon-hcd.h +1
-2@@ -51,11 +51,11 @@#include <asm/bitfield.h> #define CVMX_USBCXBASE 0x00016F0010000000ull -#define CVMX_USBCXREG1 (reg, bid) \ - (CVMX_ADD_IO_SEG(CVMX_USBCXBASE | reg) + \ +#define CVMX_USBCXREG1((reg), bid) \
Why did you change this line?
A message that is not in the archive (sent off-list or not yet received): CAD=cR88u5o58NaL=z6NtMc2=N-hesKkFC8tkP3PJ4fu1Oaf-ZQ@mail.gmail.com
Greg KH
maintainerA: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
Quoted 3 lines · Selvakumar E
Hi Greg
I changed the line because of the checkpatch.pl warned for
precedence issue.
But I fail to see how this:
Quoted 1 line
Quoted 1 line
Quoted 1 line
+#define
CVMX_USBCXREG1((reg), bid)\
Does anything here at all.
What am I missing?
thanks,
greg k-h