Re: [PATCH] video/fbdev/core: Mark debug-only variable as __maybe_unused
From: Peilin Ye <hidden>
Date: 2020-11-01 10:09:17
Also in:
dri-devel
From: Peilin Ye <hidden>
Date: 2020-11-01 10:09:17
Also in:
dri-devel
Hi Sam, On Sun, Nov 01, 2020 at 10:47:18AM +0100, Sam Ravnborg wrote:
Hi Thomas. On Wed, Oct 21, 2020 at 02:15:12PM +0200, Thomas Zimmermann wrote:quoted
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>A better fix would be to replace the few uses of DPRINTK() with pr_dbg(). pr_info() is alread in use. ofc, the next step would be to replace all prink() with their pr_ counterparts. Peilin, maybe this is one for your nice cleanups in fbcon?
Sure, I will send a patch replacing all printk() except DPRINTK(). Thank you for the suggestion! Peilin