summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorDominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>2024-09-11 18:02:19 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-13 07:31:35 +0200
commit81c05e4776adf8b439e5c439ac46e5025af57020 (patch)
tree067f80916b8ffb3793aa4e7f4e8b6e821ea47941 /drivers/staging
parente6e639934664938335fa32d3576f87fc66055183 (diff)
downloadlwn-81c05e4776adf8b439e5c439ac46e5025af57020.tar.gz
lwn-81c05e4776adf8b439e5c439ac46e5025af57020.zip
staging: vt6655: mac.h: Fix possible precedence issue in macros
It is safer to put macro arguments in parentheses. This way, accidental operator precedence issues can be avoided. Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20240911180149.14474-1-dominik.karol.piatkowski@protonmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/vt6655/mac.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
index acf931c3f5fd..a33af2852227 100644
--- a/drivers/staging/vt6655/mac.h
+++ b/drivers/staging/vt6655/mac.h
@@ -537,9 +537,9 @@
/*--------------------- Export Macros ------------------------------*/
-#define VT6655_MAC_SELECT_PAGE0(iobase) iowrite8(0, iobase + MAC_REG_PAGE1SEL)
+#define VT6655_MAC_SELECT_PAGE0(iobase) iowrite8(0, (iobase) + MAC_REG_PAGE1SEL)
-#define VT6655_MAC_SELECT_PAGE1(iobase) iowrite8(1, iobase + MAC_REG_PAGE1SEL)
+#define VT6655_MAC_SELECT_PAGE1(iobase) iowrite8(1, (iobase) + MAC_REG_PAGE1SEL)
#define MAKEWORD(lb, hb) \
((unsigned short)(((unsigned char)(lb)) | (((unsigned short)((unsigned char)(hb))) << 8)))