staging: fwserial: Add Brackets around Parameters
PATCH 1/1 staging: fwserial: Add Brackets around Parameters
Add parentheses around macro parameters to avoid precedence issues. Issue found with Checkpatch.
Signed-off-by Nishka Dasgupta <[email protected]>
--- drivers/staging/fwserial/fwserial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fwserial/fwserial.c +1 -1
@@ -89,7 +89,7 @@ struct fwtty_transaction { }; }; -#define to_device (a, b) (a->b) +#define to_device((a), (b)) (a->b)#define fwtty_err (p, fmt, ...) \ dev_err(to_device(p, device), fmt, ##__VA_ARGS__)#define fwtty_info (p, fmt, ...) \
Signature · 1 line
2.19.1
Greg KH
maintainerQuoted 13 lines · Nishka Dasgupta
Add parentheses around macro parameters to avoid precedence issues. Issue found with Checkpatch.
Signed-off-by Nishka Dasgupta <[email protected]>--- drivers/staging/fwserial/fwserial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/fwserial/fwserial.c +0
-0
drivers/staging/fwserial/fwserial.c struct fwtty_transaction { · line 92
Quoted 5 lines
drivers/staging/fwserial/fwserial.c +1
-1@@ -89,7 +89,7 @@ struct fwtty_transaction { }; }; -#define to_device (a, b) (a->b) +#define to_device((a), (b)) (a->b)
Also not needed :(