[PATCH 3/5] tg3: Enclose macro with complex values in parenthesis

Javier Martinez Canillas martinez.javier at gmail.com
Tue Mar 1 12:04:27 EST 2011


Macros with complex values should be enclosed in parenthesis.
Change accordingly.

Signed-off-by: Javier Martinez Canillas <martinez.javier at gmail.com>
---
 drivers/net/tg3.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 6dc7a8a..c67eb19 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -513,16 +513,16 @@ static void tg3_write32_mbox_5906(struct tg3 *tp, u32 off, u32 val)
 	writel(val, tp->regs + off + GRCMBOX_BASE);
 }
 
-#define tw32_mailbox(reg, val)		tp->write32_mbox(tp, reg, val)
+#define tw32_mailbox(reg, val)		(tp->write32_mbox(tp, reg, val))
 #define tw32_mailbox_f(reg, val)	tw32_mailbox_flush(tp, (reg), (val))
-#define tw32_rx_mbox(reg, val)		tp->write32_rx_mbox(tp, reg, val)
-#define tw32_tx_mbox(reg, val)		tp->write32_tx_mbox(tp, reg, val)
-#define tr32_mailbox(reg)		tp->read32_mbox(tp, reg)
+#define tw32_rx_mbox(reg, val)		(tp->write32_rx_mbox(tp, reg, val))
+#define tw32_tx_mbox(reg, val)		(tp->write32_tx_mbox(tp, reg, val))
+#define tr32_mailbox(reg)		(tp->read32_mbox(tp, reg))
 
-#define tw32(reg, val)			tp->write32(tp, reg, val)
+#define tw32(reg, val)			(tp->write32(tp, reg, val))
 #define tw32_f(reg, val)		_tw32_flush(tp, (reg), (val), 0)
 #define tw32_wait_f(reg, val, us)	_tw32_flush(tp, (reg), (val), (us))
-#define tr32(reg)			tp->read32(tp, reg)
+#define tr32(reg)			(tp->read32(tp, reg))
 
 static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val)
 {
-- 
1.7.2.3




More information about the Kernelnewbies mailing list