Return-Path: Received: from mail-cys01nam02on0129.outbound.protection.outlook.com ([104.47.37.129]:45715 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032523AbeCAPhp (ORCPT ); Thu, 1 Mar 2018 10:37:45 -0500 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Arnd Bergmann , Bartlomiej Zolnierkiewicz , Sasha Levin Subject: [added to the 4.1 stable tree] video: fbdev: via: remove possibly unused variables Date: Thu, 1 Mar 2018 15:27:07 +0000 Message-ID: <20180301152116.1486-432-alexander.levin@microsoft.com> References: <20180301152116.1486-1-alexander.levin@microsoft.com> In-Reply-To: <20180301152116.1486-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Arnd Bergmann This patch has been added to the 4.1 stable tree. If you have any objections, please let us know. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [ Upstream commit 484c7bbf2649831714da3a0fa30213977458e9b5 ] When CONFIG_PROC_FS is disabled, we get warnings about unused variables as remove_proc_entry() evaluates to an empty macro. drivers/video/fbdev/via/viafbdev.c: In function 'viafb_remove_proc': drivers/video/fbdev/via/viafbdev.c:1635:4: error: unused variable 'iga2_ent= ry' [-Werror=3Dunused-variable] drivers/video/fbdev/via/viafbdev.c:1634:4: error: unused variable 'iga1_ent= ry' [-Werror=3Dunused-variable] These are easy to avoid by using the pointer from the structure. Signed-off-by: Arnd Bergmann Cc: Florian Tobias Schandinat Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sasha Levin --- drivers/video/fbdev/via/viafbdev.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/via/viafbdev.c b/drivers/video/fbdev/via/v= iafbdev.c index f9718f012aae..badee04ef496 100644 --- a/drivers/video/fbdev/via/viafbdev.c +++ b/drivers/video/fbdev/via/viafbdev.c @@ -1630,16 +1630,14 @@ static void viafb_init_proc(struct viafb_shared *sh= ared) } static void viafb_remove_proc(struct viafb_shared *shared) { - struct proc_dir_entry *viafb_entry =3D shared->proc_entry, - *iga1_entry =3D shared->iga1_proc_entry, - *iga2_entry =3D shared->iga2_proc_entry; + struct proc_dir_entry *viafb_entry =3D shared->proc_entry; =20 if (!viafb_entry) return; =20 - remove_proc_entry("output_devices", iga2_entry); + remove_proc_entry("output_devices", shared->iga2_proc_entry); remove_proc_entry("iga2", viafb_entry); - remove_proc_entry("output_devices", iga1_entry); + remove_proc_entry("output_devices", shared->iga1_proc_entry); remove_proc_entry("iga1", viafb_entry); remove_proc_entry("supported_output_devices", viafb_entry); =20 --=20 2.14.1