OSDN Git Service

staging: fbtft: Avoid potential precedence issues
authorDeepak R Varma <mh12gx2825@gmail.com>
Sun, 15 Mar 2020 23:42:32 +0000 (05:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Mar 2020 11:47:24 +0000 (12:47 +0100)
Put parentheses around uses of macro parameters to avoid possible
precedence issues. Problem detected by checkpatch.

Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Link: https://lore.kernel.org/r/5c8520a5c3da453460608deee9a25232d52f4513.1584314604.git.mh12gx2825@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft.h

index 81da30f..76f8c09 100644 (file)
@@ -406,8 +406,8 @@ do {                                                         \
 
 #define fbtft_par_dbg(level, par, format, arg...)            \
 do {                                                         \
-       if (unlikely(par->debug & level))                    \
-               dev_info(par->info->device, format, ##arg);  \
+       if (unlikely((par)->debug & (level)))                    \
+               dev_info((par)->info->device, format, ##arg);  \
 } while (0)
 
 #define fbtft_par_dbg_hex(level, par, dev, type, buf, num, format, arg...) \