Skip to content

Commit 81c05e4

Browse files
Kotbenekgregkh
authored andcommitted
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 <[email protected]> Tested-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e6e6399 commit 81c05e4

File tree

1 file changed

+2
-2
lines changed
  • drivers/staging/vt6655

1 file changed

+2
-2
lines changed

drivers/staging/vt6655/mac.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,9 @@
537537

538538
/*--------------------- Export Macros ------------------------------*/
539539

540-
#define VT6655_MAC_SELECT_PAGE0(iobase) iowrite8(0, iobase + MAC_REG_PAGE1SEL)
540+
#define VT6655_MAC_SELECT_PAGE0(iobase) iowrite8(0, (iobase) + MAC_REG_PAGE1SEL)
541541

542-
#define VT6655_MAC_SELECT_PAGE1(iobase) iowrite8(1, iobase + MAC_REG_PAGE1SEL)
542+
#define VT6655_MAC_SELECT_PAGE1(iobase) iowrite8(1, (iobase) + MAC_REG_PAGE1SEL)
543543

544544
#define MAKEWORD(lb, hb) \
545545
((unsigned short)(((unsigned char)(lb)) | (((unsigned short)((unsigned char)(hb))) << 8)))

0 commit comments

Comments
 (0)