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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Cc: Thibaut VARENE <varenet@xxxxxxxxxxxxxxxx>
Cc: Ben Dooks <ben@xxxxxxxxxxxx>
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Cc: linux-fbdev@xxxxxxxxxxxxxxx
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
 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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux