summaryrefslogtreecommitdiff
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorPeng Li <lipeng321@huawei.com>2021-06-16 10:23:35 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-16 10:52:33 +0300
commitacc3edf0054eb44221b2a6629bfa575c85c6e901 (patch)
tree902d3b426ca1aaebbade6e85a9715ecb23c4cddd /drivers/net/wan
parent70d063b9a6219a6fd6c88e9e318ea36889348a36 (diff)
downloadlinux-acc3edf0054eb44221b2a6629bfa575c85c6e901.tar.xz
net: cosa: add necessary () to macro argument
Macro argument 'cosa' may be better as '(cosa)' 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 'drivers/net/wan')
-rw-r--r--drivers/net/wan/cosa.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 6125ca49c944..a6629dc5c5e9 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -238,14 +238,14 @@ MODULE_LICENSE("GPL");
#define cosa_inw inw
#endif
-#define is_8bit(cosa) (!(cosa->datareg & 0x08))
-
-#define cosa_getstatus(cosa) (cosa_inb(cosa->statusreg))
-#define cosa_putstatus(cosa, stat) (cosa_outb(stat, cosa->statusreg))
-#define cosa_getdata16(cosa) (cosa_inw(cosa->datareg))
-#define cosa_getdata8(cosa) (cosa_inb(cosa->datareg))
-#define cosa_putdata16(cosa, dt) (cosa_outw(dt, cosa->datareg))
-#define cosa_putdata8(cosa, dt) (cosa_outb(dt, cosa->datareg))
+#define is_8bit(cosa) (!((cosa)->datareg & 0x08))
+
+#define cosa_getstatus(cosa) (cosa_inb((cosa)->statusreg))
+#define cosa_putstatus(cosa, stat) (cosa_outb(stat, (cosa)->statusreg))
+#define cosa_getdata16(cosa) (cosa_inw((cosa)->datareg))
+#define cosa_getdata8(cosa) (cosa_inb((cosa)->datareg))
+#define cosa_putdata16(cosa, dt) (cosa_outw(dt, (cosa)->datareg))
+#define cosa_putdata8(cosa, dt) (cosa_outb(dt, (cosa)->datareg))
/* Initialization stuff */
static int cosa_probe(int ioaddr, int irq, int dma);