[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161201145812.GA7521@GEERT_PC.localdomain>
Date: Thu, 1 Dec 2016 15:58:12 +0100
From: Geert Custers <geert.aj.custers@...il.com>
To: aaro.koskinen@....fi
Cc: linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org
Subject: [PATCH] staging: octeon-usb: Resolve some checkpatch.pl warnings
This patch removes some of the warnings that are present when running
the checkpatch.pl script. It corrects the warnings related to macro
precedents.
Signed-off-by: Geert Custers <geert.aj.custers@...il.com>
---
drivers/staging/octeon-usb/octeon-hcd.c | 2 +-
drivers/staging/octeon-usb/octeon-hcd.h | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 9a7858a..9e6974e 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -380,7 +380,7 @@ struct octeon_hcd {
#define CVMX_WAIT_FOR_FIELD32(address, _union, cond, timeout_usec) \
({int result; \
do { \
- u64 done = cvmx_get_cycle() + (u64)timeout_usec * \
+ u64 done = cvmx_get_cycle() + (u64)(timeout_usec) * \
octeon_get_clock_rate() / 1000000; \
union _union c; \
\
diff --git a/drivers/staging/octeon-usb/octeon-hcd.h b/drivers/staging/octeon-usb/octeon-hcd.h
index 3353aefe..dc702fc 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.h
+++ b/drivers/staging/octeon-usb/octeon-hcd.h
@@ -51,10 +51,10 @@
#define CVMX_USBCXBASE 0x00016F0010000000ull
#define CVMX_USBCXREG1(reg, bid) \
- (CVMX_ADD_IO_SEG(CVMX_USBCXBASE | reg) + \
+ (CVMX_ADD_IO_SEG(CVMX_USBCXBASE | (reg)) + \
((bid) & 1) * 0x100000000000ull)
#define CVMX_USBCXREG2(reg, bid, off) \
- (CVMX_ADD_IO_SEG(CVMX_USBCXBASE | reg) + \
+ (CVMX_ADD_IO_SEG(CVMX_USBCXBASE | (reg)) + \
(((off) & 7) + ((bid) & 1) * 0x8000000000ull) * 32)
#define CVMX_USBCX_GAHBCFG(bid) CVMX_USBCXREG1(0x008, bid)
@@ -86,9 +86,9 @@
#define CVMX_USBNXBID2(bid) (((bid) & 1) * 0x100000000000ull)
#define CVMX_USBNXREG1(reg, bid) \
- (CVMX_ADD_IO_SEG(0x0001180068000000ull | reg) + CVMX_USBNXBID1(bid))
+ (CVMX_ADD_IO_SEG(0x0001180068000000ull | (reg)) + CVMX_USBNXBID1(bid))
#define CVMX_USBNXREG2(reg, bid) \
- (CVMX_ADD_IO_SEG(0x00016F0000000000ull | reg) + CVMX_USBNXBID2(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)
--
2.10.2
Powered by blists - more mailing lists