Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123AbdFZW2r (ORCPT ); Mon, 26 Jun 2017 18:28:47 -0400 Received: from gateway30.websitewelcome.com ([192.185.144.21]:49442 "EHLO gateway30.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751615AbdFZW2k (ORCPT ); Mon, 26 Jun 2017 18:28:40 -0400 Date: Mon, 26 Jun 2017 17:05:18 -0500 From: "Gustavo A. R. Silva" To: Bartlomiej Zolnierkiewicz Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] video: fbdev: aty: remove useless variable assignments in aty_var_to_crtc() Message-ID: <20170626220518.GA9369@embeddedgus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.152.192.143 X-Exim-ID: 1dPc8F-001mFN-AD X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.152.192.143]:59188 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 3 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 966 Lines: 32 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 Signed-off-by: Gustavo A. R. Silva --- drivers/video/fbdev/aty/atyfb_base.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index 11026e7..3142d7f 100644 --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c @@ -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--; -- 2.5.0