From patchwork Tue May 16 11:28:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9728897 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 5D25C602DB for ; Tue, 16 May 2017 11:29:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D4DD289FF for ; Tue, 16 May 2017 11:29:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E52228A15; Tue, 16 May 2017 11:29:18 +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 3482A289FF for ; Tue, 16 May 2017 11:29:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751436AbdEPL3Q (ORCPT ); Tue, 16 May 2017 07:29:16 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:50459 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751067AbdEPL3P (ORCPT ); Tue, 16 May 2017 07:29:15 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0MHfTA-1d9VGh24Gi-003J1L; Tue, 16 May 2017 13:29:07 +0200 From: Arnd Bergmann To: Florian Tobias Schandinat , Bartlomiej Zolnierkiewicz Cc: Arnd Bergmann , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] fbdev: via: remove possibly unused variables Date: Tue, 16 May 2017 13:28:57 +0200 Message-Id: <20170516112906.4144714-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:8965khaTF8IvWd04AvLn5QKVurr50mvpC75adMnYM4+SvGd7G+l /8VITWb8yZt0i+w1dKmZbJwxx5Tvlo0rhTlRNWsrgZ7xbkd/kSJ5huluSrQSiijTwh0MppJ bAiXByD6mIy8Dzat5+WMwqPiyty27dzVSL3l0vTtRKVAMpVmqqLvzHPxavdhdDQ6Qxs0Pou b0vZg9bjrFAzLCiWaCwKg== X-UI-Out-Filterresults: notjunk:1; V01:K0:2QOM/h31NWo=:esecuJ1R5H2x1dfnqWeqkf +GVr5GlIdzC4D11w3BRyQNrQHIajcQM68tIP2/MpjyKz6YzxqixI0p1I6NdzSWfKKxQe/Mk2j JvtDHL77ooq3zn3Nh6LSfjJuQfAY0GLq/geD7QiDU51GQ1KJa1IzTox3pek6cmrSP/pbcgU/B a4atKCBvGtxqOh7kN42Ph0FdXIIwGUfdjv4EJZvHSfKe1byuY6UqCszVjBpmY2Ww/2D/H/qNc 7ZLnThJbrYXjDPxKhWCAnb/QBQIQF+JZnKt5S6ANQ39aSId233caji/XHz4Rdz3RA6DmryJSF xGLM54Do2UV+j8FnpVcIcE+9yZCGf7gdea3MRPzdsQ+dtvLVOm3WnrhbwYSakB+YQf+AHUoGH ADUVlVVebbvgS1OZmzWSuFH9OoS9wJGlxdd68iLVYeCS1qkyeAwLvClqDOK7bqiw1tHyHUXmy 7itL5IzzKAywqyZfmWMURTWeiMpBODpiV954x2bZbaNtHPbDWbCj8TX5Ft9wm608rSi/HBkLp ERL11fOCcyzIjvr9LTagv4xyfh0sIBzo/vKAEOnfR5g7ApFMdHDUuHWSWO1U3R0fXtGrLB892 DcVZGNZje4oscW/yWpT7OsbLrtgZlf7E6/GY62roxIdGFNmENVvqSE0EZOigaKhYDzyUVoknp FdQJfTHS7SGpFA5vYyfbF+rbKLIaQsQaumZ6YDGg+ngXCoBG/Z35W000g/zdKfst8zDs= 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 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_entry' [-Werror=unused-variable] drivers/video/fbdev/via/viafbdev.c:1634:4: error: unused variable 'iga1_entry' [-Werror=unused-variable] These are easy to avoid by using the pointer from the structure. Signed-off-by: Arnd Bergmann --- 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/viafbdev.c index 510772bed4f4..89ee4d73bcff 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 *shared) } static void viafb_remove_proc(struct viafb_shared *shared) { - struct proc_dir_entry *viafb_entry = shared->proc_entry, - *iga1_entry = shared->iga1_proc_entry, - *iga2_entry = shared->iga2_proc_entry; + struct proc_dir_entry *viafb_entry = shared->proc_entry; if (!viafb_entry) return; - 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);