From patchwork Tue Feb 23 13:57:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8391881 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 38B8A9F1D4 for ; Tue, 23 Feb 2016 13:58:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 71B3120122 for ; Tue, 23 Feb 2016 13:58:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2237A2026C for ; Tue, 23 Feb 2016 13:58:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752978AbcBWN6h (ORCPT ); Tue, 23 Feb 2016 08:58:37 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:49517 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752338AbcBWN6f (ORCPT ); Tue, 23 Feb 2016 08:58:35 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0LdVQI-1a8TQp0aP4-00ijk9; Tue, 23 Feb 2016 14:58:09 +0100 From: Arnd Bergmann To: Tony Lindgren Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 2/3] ARM: omap1: avoid unused variable warning Date: Tue, 23 Feb 2016 14:57:52 +0100 Message-Id: <1456235876-4088840-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456235876-4088840-1-git-send-email-arnd@arndb.de> References: <1456235876-4088840-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:hr7nbv62AOT56kXtw2YP9cNFuqus5y1pBmO+se3U+0DIQlMumN4 EPaQJQdfnvmA5FZE4O448eoydQVM4ZNOelu9qrod2whk5gY0QcqPMQ85fc5n8eOf41w1Zfp bIW7PXPQm0H9Ah7XvfMvKwsS0a87qxkG4WFR8pl0g9iEoADTv5EC2GSoGuc7c4lSkugjIxP h8RtqZNCLxUWe1B30U12Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:Wk6ztpS5biQ=:HpHmmy3kZ7yDiRNEBmlBCZ lTJJ+CU1eIhjQ0shv6ZrqMi/j8FytktAinidugYKBRlxSIyOCnW8W1G/BFB+9vbkxprQtAef3 RPsPPDLzBqHCSc0rLiq59qw83upTgzgnvyuwqeGA/AND7+YfL2g5Roo94PQZs9dnXjFmq7DOr BnkcxLG9rJmfvkr31CsZtbAOUmMLM2AU+9ZgwRFq7wcor2gbLfUXAjXoHjRZF3KcsTL0nMglW V8esekyaet+HgeJYJZeAslpVN4P/+nNnHZU5buK28fx8/be4l9pGVepsf4GMp4Gv4oJOunVsU 7LWVbEQnqQyoRBSlb6Lnt/kPRszHi2QlBMGvlrSI166XLsA+47p9uRYugaeR9na00MPX1y1yH KCQwX86srTBJNL4wFQOJwplY6ltREQa26VKw6Yfo6CJQTMLCCg9gh7X83i62QgJVfmb/a1KjV usiDIEWEowNnQAAsr9IPupZ+lKE/J2SVsG8B8zLRTVlMvGFqat4NGd9d5AoSZkzItTfbKRufY /1YETC0XtV7PwbMX+saIMA1Sz3jh66UxGj2H3z9eFXb0yjx12CHV5j05ceZ7OzXtdWC6gBnAR 9F8e3PKDsHIBWEwR4zt1LOXBY1J53MZmqOdSMysXnJiOwapiAp9DWgSBtt+UO0KvjLZcWT4j0 Ifm+0YYMaFtI67N7mbDg8EPwzFgnRO2yPE64GHtkPfKc4KCStGwOiguW5/4btSjfj59c= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The osk_mistral_init() contains code that is only compiled when CONFIG_PM is set, but it uses a variable that is declared outside of the #ifdef: arch/arm/mach-omap1/board-osk.c: In function 'osk_mistral_init': arch/arm/mach-omap1/board-osk.c:513:7: warning: unused variable 'ret' [-Wunused-variable] This puts the variable in the same #ifdef to avoid the warning. Signed-off-by: Arnd Bergmann Acked-by: Aaro Koskinen --- arch/arm/mach-omap1/board-osk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 209aecb0df68..fcc5c0650429 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -510,7 +510,9 @@ static void __init osk_mistral_init(void) */ omap_cfg_reg(N15_1610_MPUIO2); if (gpio_request(OMAP_MPUIO(2), "wakeup") == 0) { +#ifdef CONFIG_PM int ret = 0; +#endif int irq = gpio_to_irq(OMAP_MPUIO(2)); gpio_direction_input(OMAP_MPUIO(2));