Commit 81c05e47 authored by Dominik Karol Piątkowski's avatar Dominik Karol Piątkowski Committed by Greg Kroah-Hartman

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: default avatarDominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Tested-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20240911180149.14474-1-dominik.karol.piatkowski@protonmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e6e63993
......@@ -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)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment