From: Javier Martinez Canillas <martinez.javier@gmail.com>
To: Matt Carlson <mcarlson@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>,
Grant Likely <grant.likely@secretlab.ca>,
netdev@vger.kernel.org, kernelnewbies@kernelnewbies.org,
Javier Martinez Canillas <martinez.javier@gmail.com>
Subject: [PATCH 3/5] tg3: Enclose macro with complex values in parenthesis
Date: Tue, 1 Mar 2011 18:04:27 +0100 [thread overview]
Message-ID: <1298999069-12740-3-git-send-email-martinez.javier@gmail.com> (raw)
In-Reply-To: <1298999069-12740-1-git-send-email-martinez.javier@gmail.com>
Macros with complex values should be enclosed in parenthesis.
Change accordingly.
Signed-off-by: Javier Martinez Canillas <martinez.javier@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
next prev parent reply other threads:[~2011-03-01 17:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-01 17:04 [PATCH 1/5] tg3: use <linux/io.h> and <linux/uaccess.h> instead <asm/io.h> and <asm/uaccess.h> Javier Martinez Canillas
2011-03-01 17:04 ` [PATCH 1/5] tg3: use usleep_range not msleep for small sleeps Javier Martinez Canillas
2011-03-03 4:55 ` David Miller
2011-03-03 12:14 ` Javier Martinez Canillas
2011-03-01 17:04 ` Javier Martinez Canillas [this message]
2011-03-03 4:56 ` [PATCH 3/5] tg3: Enclose macro with complex values in parenthesis David Miller
2011-03-03 11:54 ` Javier Martinez Canillas
2011-03-01 17:04 ` [PATCH 4/5] tg3: Don't use IRQF_SAMPLE_RANDOM Javier Martinez Canillas
2011-03-01 17:04 ` [PATCH 5/5] tg3: Fix inline keyword usage Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298999069-12740-3-git-send-email-martinez.javier@gmail.com \
--to=martinez.javier@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=kernelnewbies@kernelnewbies.org \
--cc=mcarlson@broadcom.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).