From patchwork Mon Jul 10 11:12:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9832693 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C9F1060318 for ; Mon, 10 Jul 2017 11:13:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC1F026E4A for ; Mon, 10 Jul 2017 11:13:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B06B127F2B; Mon, 10 Jul 2017 11:13:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D0D226E4A for ; Mon, 10 Jul 2017 11:13:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753286AbdGJLNj (ORCPT ); Mon, 10 Jul 2017 07:13:39 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:49381 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752731AbdGJLNi (ORCPT ); Mon, 10 Jul 2017 07:13:38 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0Lu5Go-1dduqT3m9G-011Pj1; Mon, 10 Jul 2017 13:13:15 +0200 From: Arnd Bergmann To: Bartlomiej Zolnierkiewicz Cc: Arnd Bergmann , "Gustavo A. R. Silva" , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] atyfb: hide unused variable Date: Mon, 10 Jul 2017 13:12:46 +0200 Message-Id: <20170710111312.747154-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:WoG9iY82gueF+JpeD90nH5T3mbAt6mlK/NabYT6bP9SmidSOFHK ihrERuODZ0UoSS0JRkYRwSfEkDMnQmUOKi79PCO1n/eCGOz3zZYhWsEgCwpmvVgd3QDuZO+ dB7Xuqb9RlxcUCADONqinaNjbIVAkbVW70D7doDB3Y5bRDR+5v4m5AH7GmmF31m4otoH2dM eyNHfIYOzqOnc0sDt9r6Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:R9e9wXAq6VY=:p3MSjoedGPFCt1fKbDy5ft NgGtQRXjUgPftocyrmt4Fiq35h2BL2Bk6jYd06lPmZXv+Ganak3711ulWSMsUBDQBiPqh65uv B4QTe8x1ZfeQ93Z3zWG3bRoEE/tKvake9SBWgPyv1pG06Aoz9ugdTXCSgijRGhWHUJzUfb1WU QNPeVC/ntXM0fkCEuXNxMx9A6ExsYieMDj+JUKn8jFstRy5W5Ro5s9bZZIf2or0bStDAA58mZ MYWRt1tMnC/SS07JS5/UQPXzn7Z6nb6klZnFTl9PHcd4CdYuLPOEHqZi612T//Fj9/TxT9zxC KMPcQA/0hbz2tV3VAO4rPibHSgCtoAlL8wX3o09JCM+q89/l42M7EYc/5QCspv2P6Fx62v5q4 ALxk5kWLPF4uX/lSMrpOrBiZy3RVLXA1DHNUwwNZc00GtAQsiq3Tm/K/zMkCL7vaCR5p4JIg8 U+6qglSHnANqnUULTYUs1Ce8s+WIlvxXna811dFKB4wlF/gBIlnZ19aXgA7BpZ+EHl8AoKHxq 0tmuI2Gm4VSzeR+kwZkTQpsx0UYKkPf5tWCu1sSTc7h1jsHwGfCSu5ukffAJyAsCX4zwL+/l+ VMnNubU+5mccA+3t8JevwZ7vm2Px06FUVGe/pC1tmywSC3f+qKCaHhB/RHWqvFZMMD2SORx1r kueKSMlPMXv5el7N/GyIZrgUOhmsNQFcru+NVIGFZtxaJs+kqRL4cTFgOPJPWZIC7IDE= Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);