[PATCH] video/fbdev/core: Mark debug-only variable as __maybe_unused
Sam Ravnborg
sam at ravnborg.org
Sun Nov 1 09:47:18 UTC 2020
Hi Thomas.
On Wed, Oct 21, 2020 at 02:15:12PM +0200, Thomas Zimmermann wrote:
> 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 at 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?
Sam
More information about the dri-devel
mailing list