OSDN Git Service

fbdev: savage: fix -Wextra build warning
authorRandy Dunlap <rdunlap@infradead.org>
Sun, 15 Mar 2020 04:10:00 +0000 (21:10 -0700)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 20 Mar 2020 13:29:10 +0000 (14:29 +0100)
When 'SAVAGEFB_DEBUG' is not defined, modify the DBG() macro to use the
no_printk() macro instead of using <empty>.
This fixes a build warning when -Wextra is used and provides
printk format checking:

../drivers/video/fbdev/savage/savagefb_driver.c:2411:13: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200315041002.24473-5-rdunlap@infradead.org
drivers/video/fbdev/savage/savagefb.h

index aba04af..3314d5b 100644 (file)
@@ -21,7 +21,7 @@
 #ifdef SAVAGEFB_DEBUG
 # define DBG(x)                printk (KERN_DEBUG "savagefb: %s\n", (x));
 #else
-# define DBG(x)
+# define DBG(x)                no_printk(x)
 # define SavagePrintRegs(...)
 #endif