diff mbox series

[23/31] video: fbdev: s1d13xxxfb: Mark debug variables as __maybe_unused

Message ID 20210113145009.1272040-24-lee.jones@linaro.org
State New
Headers show
Series Rid W=1 warnings from Video | expand

Commit Message

Lee Jones Jan. 13, 2021, 2:50 p.m. UTC
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

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@gmail.com>
Cc: Thibaut VARENE <varenet@parisc-linux.org>
Cc: Ben Dooks <ben@simtec.co.uk>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
 drivers/video/fbdev/s1d13xxxfb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series


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;