[PATCH 23/31] video: fbdev: s1d13xxxfb: Mark debug variables as __maybe_unused
Lee Jones
lee.jones at linaro.org
Wed Jan 13 14:50:01 UTC 2021
Can't declare these under the same clause as their use, since
debugging is enabled manually with an '#if {0,1}', so mark them as
__maybe_unused instead to notify the compiler that this behaviour is
expected.
Fixes the following W=1 kernel build warning(s):
drivers/video/fbdev/s1d13xxxfb.c: In function ‘s1d13xxxfb_fetch_hw_state’:
drivers/video/fbdev/s1d13xxxfb.c:644:16: warning: variable ‘is_dual’ set but not used [-Wunused-but-set-variable]
drivers/video/fbdev/s1d13xxxfb.c:643:11: warning: variable ‘lcd_bpp’ set but not used [-Wunused-but-set-variable]
Cc: Kristoffer Ericson <kristoffer.ericson at gmail.com>
Cc: Thibaut VARENE <varenet at parisc-linux.org>
Cc: Ben Dooks <ben at simtec.co.uk>
Cc: dri-devel at lists.freedesktop.org
Cc: linux-fbdev at vger.kernel.org
Signed-off-by: Lee Jones <lee.jones at linaro.org>
---
drivers/video/fbdev/s1d13xxxfb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/s1d13xxxfb.c b/drivers/video/fbdev/s1d13xxxfb.c
index 4541afcf9386e..e6e8bc74412c6 100644
--- a/drivers/video/fbdev/s1d13xxxfb.c
+++ b/drivers/video/fbdev/s1d13xxxfb.c
@@ -640,8 +640,8 @@ static void s1d13xxxfb_fetch_hw_state(struct fb_info *info)
u16 offset;
u32 xres, yres;
u32 xres_virtual, yres_virtual;
- int bpp, lcd_bpp;
- int is_color, is_dual, is_tft;
+ int bpp, __maybe_unused lcd_bpp;
+ int is_color, __maybe_unused is_dual, is_tft;
int lcd_enabled, crt_enabled;
fix->type = FB_TYPE_PACKED_PIXELS;
--
2.25.1
More information about the dri-devel
mailing list