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

fbdev: omapfb: avoid -Wempty-body warning

Building with 'make W=1' shows a few harmless warnings:

drivers/video/fbdev/omap2/omapfb/omapfb-main.c: In function 'omapfb_calc_addr':
drivers/video/fbdev/omap2/omapfb/omapfb-main.c:823:56: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
823 | var->xoffset, var->yoffset, offset);
| ^
drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c: In function 'omapfb_ioctl':
drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:911:45: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
911 | DBG("ioctl failed: %d\n", r);

Avoid these by using no_printk(), which adds format string checking as
well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210322105307.1291840-1-arnd@kernel.org

authored by

Arnd Bergmann and committed by
Daniel Vetter
84c41184 8f214d43

+1 -1
+1 -1
drivers/video/fbdev/omap2/omapfb/omapfb.h
··· 29 29 printk(KERN_DEBUG "OMAPFB: " format, ## __VA_ARGS__); \ 30 30 } while (0) 31 31 #else 32 - #define DBG(format, ...) 32 + #define DBG(format, ...) no_printk(format, ## __VA_ARGS__) 33 33 #endif 34 34 35 35 #define FB2OFB(fb_info) ((struct omapfb_info *)(fb_info->par))