[PATCH 04/31] video: fbdev: aty: atyfb_base: Mark 'dac_type' as __maybe_unused

Lee Jones lee.jones at linaro.org
Wed Jan 13 14:49:42 UTC 2021


'dac_type' is only used in the '#ifdef CONFIG_ATARI' clause.

Fixes the following W=1 kernel build warning(s):

 drivers/video/fbdev/aty/atyfb_base.c: In function ‘aty_init’:
 drivers/video/fbdev/aty/atyfb_base.c:2363:6: warning: variable ‘dac_type’ set but not used [-Wunused-but-set-variable]

Cc: Vaibhav Gupta <vaibhavgupta40 at gmail.com>
Cc: Alex Kern <alex.kern at gmx.de>
Cc: "Eddie C. Dost" <ecd at skynet.be>
Cc: Anthony Tong <atong at uiuc.edu>
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/aty/atyfb_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c
index 11c328f0585ce..9b056b49f2807 100644
--- a/drivers/video/fbdev/aty/atyfb_base.c
+++ b/drivers/video/fbdev/aty/atyfb_base.c
@@ -2360,7 +2360,7 @@ static int aty_init(struct fb_info *info)
 #ifdef CONFIG_FB_ATY_GX
 	if (!M64_HAS(INTEGRATED)) {
 		u32 stat0;
-		u8 dac_type, dac_subtype, clk_type;
+		u8 __maybe_unused dac_type, dac_subtype, clk_type;
 		stat0 = aty_ld_le32(CNFG_STAT0, par);
 		par->bus_type = (stat0 >> 0) & 0x07;
 		par->ram_type = (stat0 >> 3) & 0x07;
-- 
2.25.1



More information about the dri-devel mailing list