* [PATCH] atyfb: hide unused variable @ 2017-07-10 11:12 ` Arnd Bergmann 0 siblings, 0 replies; 4+ messages in thread From: Arnd Bergmann @ 2017-07-10 11:12 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz Cc: Arnd Bergmann, Gustavo A. R. Silva, linux-fbdev, linux-kernel The vdisplay variable is now only accessed inside of an #ifdef, producing a harmless warning: drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_var_to_crtc': drivers/video/fbdev/aty/atyfb_base.c:805:19: error: unused variable 'vdisplay' [-Werror=unused-variable] This moves the declaration into the ifdef as well. Fixes: dd7d958ae912 ("video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc()") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/video/fbdev/aty/atyfb_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index ae5535ca3496..18c9b1467197 100644 --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c @@ -802,7 +802,7 @@ static int aty_var_to_crtc(const struct fb_info *info, { struct atyfb_par *par = (struct atyfb_par *) info->par; u32 xres, yres, vxres, vyres, xoffset, yoffset, bpp; - u32 sync, vmode, vdisplay; + u32 sync, vmode; u32 h_total, h_disp, h_sync_strt, h_sync_end, h_sync_dly, h_sync_wid, h_sync_pol; u32 v_total, v_disp, v_sync_strt, v_sync_end, v_sync_wid, v_sync_pol, c_sync; u32 pix_width, dp_pix_width, dp_chain_mask; @@ -1030,7 +1030,7 @@ static int aty_var_to_crtc(const struct fb_info *info, crtc->gen_cntl |= CRTC_INTERLACE_EN; #ifdef CONFIG_FB_ATY_GENERIC_LCD if (par->lcd_table != 0) { - vdisplay = yres; + u32 vdisplay = yres; if (vmode & FB_VMODE_DOUBLE) vdisplay <<= 1; crtc->gen_cntl &= ~(CRTC2_EN | CRTC2_PIX_WIDTH); -- 2.9.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] atyfb: hide unused variable @ 2017-07-10 11:12 ` Arnd Bergmann 0 siblings, 0 replies; 4+ messages in thread From: Arnd Bergmann @ 2017-07-10 11:12 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz Cc: Arnd Bergmann, Gustavo A. R. Silva, linux-fbdev, linux-kernel The vdisplay variable is now only accessed inside of an #ifdef, producing a harmless warning: drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_var_to_crtc': drivers/video/fbdev/aty/atyfb_base.c:805:19: error: unused variable 'vdisplay' [-Werror=unused-variable] This moves the declaration into the ifdef as well. Fixes: dd7d958ae912 ("video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc()") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/video/fbdev/aty/atyfb_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index ae5535ca3496..18c9b1467197 100644 --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c @@ -802,7 +802,7 @@ static int aty_var_to_crtc(const struct fb_info *info, { struct atyfb_par *par = (struct atyfb_par *) info->par; u32 xres, yres, vxres, vyres, xoffset, yoffset, bpp; - u32 sync, vmode, vdisplay; + u32 sync, vmode; u32 h_total, h_disp, h_sync_strt, h_sync_end, h_sync_dly, h_sync_wid, h_sync_pol; u32 v_total, v_disp, v_sync_strt, v_sync_end, v_sync_wid, v_sync_pol, c_sync; u32 pix_width, dp_pix_width, dp_chain_mask; @@ -1030,7 +1030,7 @@ static int aty_var_to_crtc(const struct fb_info *info, crtc->gen_cntl |= CRTC_INTERLACE_EN; #ifdef CONFIG_FB_ATY_GENERIC_LCD if (par->lcd_table != 0) { - vdisplay = yres; + u32 vdisplay = yres; if (vmode & FB_VMODE_DOUBLE) vdisplay <<= 1; crtc->gen_cntl &= ~(CRTC2_EN | CRTC2_PIX_WIDTH); -- 2.9.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] atyfb: hide unused variable 2017-07-10 11:12 ` Arnd Bergmann @ 2017-07-12 16:31 ` Bartlomiej Zolnierkiewicz -1 siblings, 0 replies; 4+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2017-07-12 16:31 UTC (permalink / raw) To: Arnd Bergmann; +Cc: Gustavo A. R. Silva, linux-fbdev, linux-kernel On Monday, July 10, 2017 01:12:46 PM Arnd Bergmann wrote: > The vdisplay variable is now only accessed inside of an #ifdef, producing > a harmless warning: > > drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_var_to_crtc': > drivers/video/fbdev/aty/atyfb_base.c:805:19: error: unused variable 'vdisplay' [-Werror=unused-variable] > > This moves the declaration into the ifdef as well. > > Fixes: dd7d958ae912 ("video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc()") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Patch queued for 4.13, thanks. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] atyfb: hide unused variable @ 2017-07-12 16:31 ` Bartlomiej Zolnierkiewicz 0 siblings, 0 replies; 4+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2017-07-12 16:31 UTC (permalink / raw) To: Arnd Bergmann; +Cc: Gustavo A. R. Silva, linux-fbdev, linux-kernel On Monday, July 10, 2017 01:12:46 PM Arnd Bergmann wrote: > The vdisplay variable is now only accessed inside of an #ifdef, producing > a harmless warning: > > drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_var_to_crtc': > drivers/video/fbdev/aty/atyfb_base.c:805:19: error: unused variable 'vdisplay' [-Werror=unused-variable] > > This moves the declaration into the ifdef as well. > > Fixes: dd7d958ae912 ("video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc()") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Patch queued for 4.13, thanks. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-07-12 16:31 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20170710111335epcas4p38f91ea2aa1c12161af113766b989e8f1@epcas4p3.samsung.com> 2017-07-10 11:12 ` [PATCH] atyfb: hide unused variable Arnd Bergmann 2017-07-10 11:12 ` Arnd Bergmann 2017-07-12 16:31 ` Bartlomiej Zolnierkiewicz 2017-07-12 16:31 ` Bartlomiej Zolnierkiewicz
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.