summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rtl818x
diff options
context:
space:
mode:
authorAndrea Merello <andrea.merello@gmail.com>2014-04-04 20:24:36 +0400
committerJohn W. Linville <linville@tuxdriver.com>2014-04-22 23:06:27 +0400
commit6bcb20c7768ceca2138a6d9642d532f357e0b6c5 (patch)
tree47a2be0f96238b149703311c3aa852d191e4b553 /drivers/net/wireless/rtl818x
parent1c3fb9b8f80b4e5c7d4e1907f91f4459752929e9 (diff)
downloadlinux-6bcb20c7768ceca2138a6d9642d532f357e0b6c5.tar.xz
rtl8180: add parentheses to REG_ADDR macros
Parentheses are missing around the macro argument, causing the macro possibly not to work passing certain expressions as arguments. This should not cause any issues with current code, however it's worth to add them, as a good practice, and to eventually avoid future bugs. Suggested-by: Dave Kilroy <kilroyd@googlemail.com> Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtl818x')
-rw-r--r--drivers/net/wireless/rtl818x/rtl818x.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl818x.h b/drivers/net/wireless/rtl818x/rtl818x.h
index 45ea4e1c4abe..7abef95d278b 100644
--- a/drivers/net/wireless/rtl818x/rtl818x.h
+++ b/drivers/net/wireless/rtl818x/rtl818x.h
@@ -334,9 +334,9 @@ struct rtl818x_csr {
* I don't like to introduce a ton of "reserved"..
* They are for RTL8187SE
*/
-#define REG_ADDR1(addr) ((u8 __iomem *)priv->map + addr)
-#define REG_ADDR2(addr) ((__le16 __iomem *)priv->map + (addr >> 1))
-#define REG_ADDR4(addr) ((__le32 __iomem *)priv->map + (addr >> 2))
+#define REG_ADDR1(addr) ((u8 __iomem *)priv->map + (addr))
+#define REG_ADDR2(addr) ((__le16 __iomem *)priv->map + ((addr) >> 1))
+#define REG_ADDR4(addr) ((__le32 __iomem *)priv->map + ((addr) >> 2))
#define FEMR_SE REG_ADDR2(0x1D4)
#define ARFR REG_ADDR2(0x1E0)