From patchwork Mon Jul 8 12:48:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11034989 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F966138B for ; Mon, 8 Jul 2019 12:49:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CDC3285A3 for ; Mon, 8 Jul 2019 12:49:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FBD2285B0; Mon, 8 Jul 2019 12:49:12 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0F834285A3 for ; Mon, 8 Jul 2019 12:49:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Tz0hVp7mzCyw/c9Sdso1LwkvAeVNv22IsIHrXbY1iPs=; b=pvX+OpTI8uEP9C 3nK6sIzrAArB+H8awAjkLfym3yvN1GyN8CuxvdkBBjniO1pxs72mvGtvASoBykm+88ckVFeA29M3j pwrALJOcmfZJpTaKZkOORNQG2g/UjRir9uFAC5GXUBV4oXMMxzhNP5WR8nunsbuZ1+IGy271BkHoC +Oj4ac+NYgzfqyLclpmQLrI3DO8uL/wGWZLEiTIAGVU0cKP3iOXYPYDNzxY/Zqbsn8yzXYyoZgzqd tMkt9ttPUjCZ7QBcJiGvmTACcVfHTdDb6smhz0/2eO5Ild9OZmG4WTnGygm0/kDzVXvMQHl6smxRt lhPU3xQAtL2DLT2r2SiA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hkT4r-0000GQ-VJ; Mon, 08 Jul 2019 12:49:06 +0000 Received: from mout.kundenserver.de ([217.72.192.74]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hkT4o-0000Fm-PI for linux-riscv@lists.infradead.org; Mon, 08 Jul 2019 12:49:04 +0000 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MrhHm-1iGSIj2jCe-00nh6M; Mon, 08 Jul 2019 14:48:45 +0200 From: Arnd Bergmann To: Nicolas Ferre , "David S. Miller" , Palmer Dabbelt , Paul Walmsley Subject: [PATCH] [net-next] macb: fix build warning for !CONFIG_OF Date: Mon, 8 Jul 2019 14:48:23 +0200 Message-Id: <20190708124840.3616530-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:X+taGt58qrgWMOLWMf4Bvf333mJptyDHQK7HA/HpVPPyZF7xrMQ tjuy5Qx2f3YuT6ZgYHZJn8eFFjPfNQxAnOzZsHk4xaUaqhWqqHwItVDRjyDGRp7qiQFmkyi sgP3yzk7u0HzZ6I4I2LDVxXSbZnM7plMQR/LNRJ5djXPcQc0D7G++x/PlOagPjcPDVJW6HL +7Ksk5XLkP5+Xco33sUIQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:0186pYpNvdU=:TDOWwKRi0pGg6Giz7TyYjK oqGpJyjCwnbUFBXq/8lJW9MEOOzaskgFqY4pT8U7iWfGCER4waEjiVORkYV1ajdA8U6pN2ZFl 1qtZD+TOweWKTKCb4B9rttD3Y4aRx51uE32Vl8EsRHdBR9mcAUu8xo+Hs8BV0NGsfqmyBN0uD TjtoLDmatHiZqgW78tZBjebWmOFCIpZtOJngEExmInL7Oe+sLi6dHwO+d3pHB4TEIZxyMo+jn 27EJld3BGiJzm39XYRjKT6kMtLrS6zg2KYAEj30J/uKNvvnvNeZ/H7oVJArvVSiUaAsvih4mr YWbN9+3rFqf+jgv4ikHAybdMI4bNYNVddWiID+9k14A0Fvg4o/XMuLQBIT5YjtQH6ayWDtsVN NOAFfAB0zL4DwgM19+3L6o3s6vGf1058VwQOtP+anwDrrCzgcHUrzUhhJokh41ETsFOwW5DGw SaFn6nJ0conYI/jHon06vYrByVVvgBD8M6nNqJxlmUjK1/VIrkA1YvPEJtxCNTY178Jvy6uZj 5pUkQ86dj7xH1tYTtvUsxikUC/pnq2ymCMcZm4wB34fJ6fp0TWWmFsZAkbzMMfhX/s5BeD313 GgoJ8+1MJSQzRwxn6R2JHypu9snUDib01QBrsrHUp6BnhkTaoun6KexWptJsmZRhChJ8pprgK ySiUz3Iwpbg5zVGn4loe3oKUiwo5SmA5Po8RLaXQ3VQb7adhpoOOGdrAISWzYVNAEmETlu0xG kfDOKtx023fLuH2GyHsJewYgoWvGZBL87jB9Vw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190708_054903_117595_B88A3022 X-CRM114-Status: GOOD ( 10.87 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yash Shah , Harini Katakam , linux-riscv@lists.infradead.org, Claudiu Beznea Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When CONFIG_OF is disabled, we get a harmless warning about the newly added variable: drivers/net/ethernet/cadence/macb_main.c:48:39: error: 'mgmt' defined but not used [-Werror=unused-variable] static struct sifive_fu540_macb_mgmt *mgmt; Move the variable closer to its use inside of the #ifdef. Fixes: c218ad559020 ("macb: Add support for SiFive FU540-C000") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/cadence/macb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index a27d32f69de9..5ca17e62dc3e 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -45,8 +45,6 @@ struct sifive_fu540_macb_mgmt { struct clk_hw hw; }; -static struct sifive_fu540_macb_mgmt *mgmt; - #define MACB_RX_BUFFER_SIZE 128 #define RX_BUFFER_MULTIPLE 64 /* bytes */ @@ -3628,6 +3626,8 @@ static int macb_init(struct platform_device *pdev) /* max number of receive buffers */ #define AT91ETHER_MAX_RX_DESCR 9 +static struct sifive_fu540_macb_mgmt *mgmt; + /* Initialize and start the Receiver and Transmit subsystems */ static int at91ether_start(struct net_device *dev) {