Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: savage: fix -Wextra build warning

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

authored by

Randy Dunlap and committed by
Bartlomiej Zolnierkiewicz
5194480c 6ea16a0b

+1 -1
+1 -1
drivers/video/fbdev/savage/savagefb.h
··· 21 21 #ifdef SAVAGEFB_DEBUG 22 22 # define DBG(x) printk (KERN_DEBUG "savagefb: %s\n", (x)); 23 23 #else 24 - # define DBG(x) 24 + # define DBG(x) no_printk(x) 25 25 # define SavagePrintRegs(...) 26 26 #endif 27 27