linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video/fbdev/core: Mark debug-only variable as __maybe_unused
@ 2020-10-21 12:15 Thomas Zimmermann
  2020-11-01  9:47 ` Sam Ravnborg
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Zimmermann @ 2020-10-21 12:15 UTC (permalink / raw)
  To: gregkh, daniel.vetter, b.zolnierkie, jirislaby, gustavoars, peda,
	jingxiangfeng, natechancellor, george.kennedy, yepeilin.cs
  Cc: dri-devel, linux-fbdev, Thomas Zimmermann

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-01 16:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 10:09   ` Peilin Ye
2020-11-01 14:49   ` [PATCH] fbcon: Replace printk() with pr_*() Peilin Ye
2020-11-01 15:41     ` Greg Kroah-Hartman
2020-11-01 16:08       ` Peilin Ye

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).