Skip to contentSkip to conversation

fbdev: mxsfb: remove set but not used variable 'line_count'

PATCH In review YueHaibing 2 participants 2 messages Apr 3, 2019 – Apr 11, 2019

Subsystems (3)
lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 1/1 fbdev: mxsfb: remove set but not used variable 'line_count'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/video/fbdev/mxsfb.c: In function 'mxsfb_restore_mode':
drivers/video/fbdev/mxsfb.c:633:11: warning:
variable 'line_count' set but not used [-Wunused-but-set-variable]

It's never used since introduction in commit f0a523b5e5e2 ("video: Add i.MX23/28 framebuffer driver") and can be removed.

---
 drivers/video/fbdev/mxsfb.c | 2 --
 1 file changed, 2 deletions(-)
drivers/video/fbdev/mxsfb.c +0 -2
index a017200a16b3..1fdd1eb38fe0 100644
@@ -630,7 +630,6 @@ static int mxsfb_restore_mode(struct fb_info *fb_info,
 			struct fb_videomode *vmode)
 {
 	struct mxsfb_info *host = fb_info->par;
-	unsigned line_count;
 	unsigned period;
 	unsigned long pa, fbsize;
 	int bits_per_pixel, ofs, ret = 0;
@@ -717,7 +716,6 @@ static int mxsfb_restore_mode(struct fb_info *fb_info,
 		writel(fb_info->fix.smem_start, host->base + host->devdata->next_buf);
 	}
 
-	line_count = fb_info->fix.smem_len / fb_info->fix.line_length;
 	fb_info->fix.ypanstep = 1;
 
 	clk_prepare_enable(host->clk);

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#1 lore raw
Quoted 10 lines · YueHaibing

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/video/fbdev/mxsfb.c: In function 'mxsfb_restore_mode':
drivers/video/fbdev/mxsfb.c:633:11: warning:
variable 'line_count' set but not used [-Wunused-but-set-variable]

It's never used since introduction in commit f0a523b5e5e2 ("video: Add i.MX23/28 framebuffer driver") and can be removed.

Patch queued for v5.2 with minor change in the patch summary ("video: fbdev: mxsfb: remove set but not used variable 'line_count'"), thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics