Skip to contentSkip to conversation

video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc()

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jun 26, 2017 – Jul 4, 2017 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc()

Value assigned to variable vdisplay at line 990 is overwritten at line 1039 before it can be used. Also, variable assignment at line 987 is the same as at line 1039. This makes such variable assignments useless.

Remove these variable assignments and the code related.

Addresses-Covertity-ID: 1226900

---
 drivers/video/fbdev/aty/atyfb_base.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/video/fbdev/aty/atyfb_base.c +0 -6
index 11026e7..3142d7f 100644
@@ -984,12 +984,6 @@ static int aty_var_to_crtc(const struct fb_info *info,
 		v_total <<= 1;
 	}
 
-	vdisplay = yres;
-#ifdef CONFIG_FB_ATY_GENERIC_LCD
-	if ((par->lcd_table != 0) && (crtc->lcd_gen_cntl & LCD_ON))
-		vdisplay  = par->lcd_height;
-#endif
-
 	v_disp--;
 	v_sync_strt--;
 	v_sync_end--;
Signature · 1 line
2.5.0
#1 lore raw
Quoted 9 lines · Gustavo A. R. Silva

Value assigned to variable vdisplay at line 990 is overwritten at line 1039 before it can be used. Also, variable assignment at line 987 is the same as at line 1039. This makes such variable assignments useless.

Remove these variable assignments and the code related.

Addresses-Covertity-ID: 1226900

Patch queued for 4.13, thanks.

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