summaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/hd64572.c
diff options
context:
space:
mode:
authorPeng Li <lipeng321@huawei.com>2021-05-21 03:08:17 +0200
committerDavid S. Miller <davem@davemloft.net>2021-05-21 22:26:41 +0200
commit70fe4523c8f6c310c4e5e2c2de5a018a22a6d928 (patch)
tree8f237b699151f96de780e17f7d9e26e3e098f465 /drivers/net/wan/hd64572.c
parentnet: wan: add braces {} to all arms of the statement (diff)
downloadlinux-70fe4523c8f6c310c4e5e2c2de5a018a22a6d928.tar.xz
linux-70fe4523c8f6c310c4e5e2c2de5a018a22a6d928.zip
net: wan: add necessary () to macro argument
Macro argument 'card' and 'port' may be better as '(card)' and '(port)' to avoid precedence issues. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/wan/hd64572.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wan/hd64572.c b/drivers/net/wan/hd64572.c
index 7fccf23c8bef..b89b03a6aba7 100644
--- a/drivers/net/wan/hd64572.c
+++ b/drivers/net/wan/hd64572.c
@@ -41,16 +41,16 @@
#define NAPI_WEIGHT 16
-#define get_msci(port) (port->chan ? MSCI1_OFFSET : MSCI0_OFFSET)
-#define get_dmac_rx(port) (port->chan ? DMAC1RX_OFFSET : DMAC0RX_OFFSET)
-#define get_dmac_tx(port) (port->chan ? DMAC1TX_OFFSET : DMAC0TX_OFFSET)
-
-#define sca_in(reg, card) readb(card->scabase + (reg))
-#define sca_out(value, reg, card) writeb(value, card->scabase + (reg))
-#define sca_inw(reg, card) readw(card->scabase + (reg))
-#define sca_outw(value, reg, card) writew(value, card->scabase + (reg))
-#define sca_inl(reg, card) readl(card->scabase + (reg))
-#define sca_outl(value, reg, card) writel(value, card->scabase + (reg))
+#define get_msci(port) ((port)->chan ? MSCI1_OFFSET : MSCI0_OFFSET)
+#define get_dmac_rx(port) ((port)->chan ? DMAC1RX_OFFSET : DMAC0RX_OFFSET)
+#define get_dmac_tx(port) ((port)->chan ? DMAC1TX_OFFSET : DMAC0TX_OFFSET)
+
+#define sca_in(reg, card) readb((card)->scabase + (reg))
+#define sca_out(value, reg, card) writeb(value, (card)->scabase + (reg))
+#define sca_inw(reg, card) readw((card)->scabase + (reg))
+#define sca_outw(value, reg, card) writew(value, (card)->scabase + (reg))
+#define sca_inl(reg, card) readl((card)->scabase + (reg))
+#define sca_outl(value, reg, card) writel(value, (card)->scabase + (reg))
static int sca_poll(struct napi_struct *napi, int budget);