From: Arnd Bergmann <arnd@kernel.org> To: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] fbdev: omapfb: avoid -Wempty-body warning Date: Mon, 22 Mar 2021 11:52:59 +0100 [thread overview] Message-ID: <20210322105307.1291840-1-arnd@kernel.org> (raw) From: Arnd Bergmann <arnd@arndb.de> 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> --- drivers/video/fbdev/omap2/omapfb/omapfb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb.h b/drivers/video/fbdev/omap2/omapfb/omapfb.h index d27abccb37bc..1c1b5201c8b6 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb.h +++ b/drivers/video/fbdev/omap2/omapfb/omapfb.h @@ -29,7 +29,7 @@ extern bool omapfb_debug; printk(KERN_DEBUG "OMAPFB: " format, ## __VA_ARGS__); \ } while (0) #else -#define DBG(format, ...) +#define DBG(format, ...) no_printk(format, ## __VA_ARGS__) #endif #define FB2OFB(fb_info) ((struct omapfb_info *)(fb_info->par)) -- 2.29.2
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org> To: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de> Subject: [PATCH 1/2] fbdev: omapfb: avoid -Wempty-body warning Date: Mon, 22 Mar 2021 11:52:59 +0100 [thread overview] Message-ID: <20210322105307.1291840-1-arnd@kernel.org> (raw) From: Arnd Bergmann <arnd@arndb.de> 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> --- drivers/video/fbdev/omap2/omapfb/omapfb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb.h b/drivers/video/fbdev/omap2/omapfb/omapfb.h index d27abccb37bc..1c1b5201c8b6 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb.h +++ b/drivers/video/fbdev/omap2/omapfb/omapfb.h @@ -29,7 +29,7 @@ extern bool omapfb_debug; printk(KERN_DEBUG "OMAPFB: " format, ## __VA_ARGS__); \ } while (0) #else -#define DBG(format, ...) +#define DBG(format, ...) no_printk(format, ## __VA_ARGS__) #endif #define FB2OFB(fb_info) ((struct omapfb_info *)(fb_info->par)) -- 2.29.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2021-03-22 10:53 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-22 10:52 Arnd Bergmann [this message] 2021-03-22 10:52 ` [PATCH 1/2] fbdev: omapfb: avoid -Wempty-body warning Arnd Bergmann 2021-03-22 10:53 ` [PATCH 2/2] vgaarb: avoid -Wempty-body warnings Arnd Bergmann 2021-03-22 10:53 ` Arnd Bergmann 2021-03-22 13:59 ` Daniel Vetter 2021-03-22 13:59 ` Daniel Vetter 2021-03-22 15:05 ` [PATCH 1/2] fbdev: omapfb: avoid -Wempty-body warning Geert Uytterhoeven 2021-03-22 15:05 ` Geert Uytterhoeven
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210322105307.1291840-1-arnd@kernel.org \ --to=arnd@kernel.org \ --cc=arnd@arndb.de \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.