All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: gregkh@linuxfoundation.org, daniel.vetter@ffwll.ch,
	b.zolnierkie@samsung.com, jirislaby@kernel.org,
	gustavoars@kernel.org, peda@axentia.se, jingxiangfeng@huawei.com,
	natechancellor@gmail.com, george.kennedy@oracle.com,
	yepeilin.cs@gmail.com
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH] video/fbdev/core: Mark debug-only variable as __maybe_unused
Date: Wed, 21 Oct 2020 14:15:12 +0200	[thread overview]
Message-ID: <20201021121512.17774-1-tzimmermann@suse.de> (raw)

Compiling fbcon.c gives

../drivers/video/fbdev/core/fbcon.c: In function 'fbcon_exit':
../drivers/video/fbdev/core/fbcon.c:3358:7: warning: variable 'pending' set but not used [-Wunused-but-set-variable]
 3358 |   int pending = 0;
      |       ^~~~~~~

The variable pending is only used for fbcon debugging. It's unused
otherwise. Mark it accordingly.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/video/fbdev/core/fbcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index d03f62369734..aca1512b6e86 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -3355,7 +3355,7 @@ static void fbcon_exit(void)
 #endif
 
 	for_each_registered_fb(i) {
-		int pending = 0;
+		int __maybe_unused pending = 0;
 
 		mapped = 0;
 		info = registered_fb[i];
-- 
2.28.0


WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de>
To: gregkh@linuxfoundation.org, daniel.vetter@ffwll.ch,
	b.zolnierkie@samsung.com, jirislaby@kernel.org,
	gustavoars@kernel.org, peda@axentia.se, jingxiangfeng@huawei.com,
	natechancellor@gmail.com, george.kennedy@oracle.com,
	yepeilin.cs@gmail.com
Cc: linux-fbdev@vger.kernel.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH] video/fbdev/core: Mark debug-only variable as __maybe_unused
Date: Wed, 21 Oct 2020 14:15:12 +0200	[thread overview]
Message-ID: <20201021121512.17774-1-tzimmermann@suse.de> (raw)

Compiling fbcon.c gives

../drivers/video/fbdev/core/fbcon.c: In function 'fbcon_exit':
../drivers/video/fbdev/core/fbcon.c:3358:7: warning: variable 'pending' set but not used [-Wunused-but-set-variable]
 3358 |   int pending = 0;
      |       ^~~~~~~

The variable pending is only used for fbcon debugging. It's unused
otherwise. Mark it accordingly.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/video/fbdev/core/fbcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index d03f62369734..aca1512b6e86 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -3355,7 +3355,7 @@ static void fbcon_exit(void)
 #endif
 
 	for_each_registered_fb(i) {
-		int pending = 0;
+		int __maybe_unused pending = 0;
 
 		mapped = 0;
 		info = registered_fb[i];
-- 
2.28.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2020-10-21 12:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21 12:15 Thomas Zimmermann [this message]
2020-10-21 12:15 ` [PATCH] video/fbdev/core: Mark debug-only variable as __maybe_unused Thomas Zimmermann
2020-11-01  9:47 ` Sam Ravnborg
2020-11-01  9:47   ` Sam Ravnborg
2020-11-01 10:09   ` Peilin Ye
2020-11-01 10:09     ` Peilin Ye
2020-11-01 14:49   ` [PATCH] fbcon: Replace printk() with pr_*() Peilin Ye
2020-11-01 14:49     ` Peilin Ye
2020-11-01 15:41     ` Greg Kroah-Hartman
2020-11-01 15:41       ` Greg Kroah-Hartman
2020-11-01 16:08       ` Peilin Ye
2020-11-01 16:08         ` Peilin Ye

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=20201021121512.17774-1-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=george.kennedy@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavoars@kernel.org \
    --cc=jingxiangfeng@huawei.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=peda@axentia.se \
    --cc=yepeilin.cs@gmail.com \
    /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: link
Be 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.