From patchwork Wed Aug 10 21:54:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101960 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp609501qga; Wed, 10 Aug 2016 14:56:25 -0700 (PDT) X-Received: by 10.66.82.42 with SMTP id f10mr11036627pay.17.1470866184938; Wed, 10 Aug 2016 14:56:24 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g63si50414704pfb.36.2016.08.10.14.56.24; Wed, 10 Aug 2016 14:56:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932378AbcHJV4K (ORCPT + 27 others); Wed, 10 Aug 2016 17:56:10 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:55518 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbcHJV4I (ORCPT ); Wed, 10 Aug 2016 17:56:08 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MVqHM-1bif8k3E5Y-00X1pR; Wed, 10 Aug 2016 23:55:54 +0200 From: Arnd Bergmann To: Andrew Lunn , Vivien Didelot Cc: Arnd Bergmann , "David S. Miller" , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/9] dsa: mv88e6xxx: hide unused functions Date: Wed, 10 Aug 2016 23:54:08 +0200 Message-Id: <20160810215424.1926658-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160810215424.1926658-1-arnd@arndb.de> References: <20160810215424.1926658-1-arnd@arndb.de> X-Provags-ID: V03:K0:+VmCZGBsfVQl0Pe9KckyKYMIbmzMkNXiwxiSvND+u/94kODGmsO Lbd1FPJElOtpm/lrOQL6w+c96edCWuAz8ju9g7NzMTXa6paH43vfJdH+bn81AjvpXtYXEuV vgmKxkw9RNbnK3GzrRdNwPhEapSJDLlpWdHGjmjEV9+xAT0CG3Kt0f9IuePOujFSyoRZWJY V2+/4oSNowZ/WYdKmB3Aw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Y3ClISNq2Xs=:h4fmFQUB4/L6maTyiNB0+k M/u2qEw9aHUkr/PuMzzOyXFuiIvU70YcMdDAoHdTMKMiVMABxravlHaEXEQ+ZPf5rY9ZX1spK r9hhodMDWUPRTWmpZAYIb6fwMQIUR/SAzbPBYefPBA13O4soL1nghwYEcYM4xsv4ZlCXL9sgz XufC33rk0fODB6paYXJObddXRxAw5YiEmohKOGX6zxiYQ5B+6LNCaMbyGBqmG+2weXQzC3ydr HDFmgqDFDjLzjaYrnDF8zIQgiAZyKz3v1rYTdcjrBWRRQcqcmNrTbwTfQBWGDKpMqMdAznUPf o3B73esW8XjYybndQQboOKCcYw3MmWETG6qdr1C26Wu6on2dV1ABLQfJLB7ShMnGVNQsa2UVM RgQ1sRANU0jN63bLCyDFX35WEHndKrIYYClfgtyld2oZ9HTbKNp1ZdKrN5SUvflikzqk6vZeG 9KKbYdcXuETCa73y9AMpSiOzbDiQ9uKydn1BgdFFpxhmDLSyRLLOAfvJApCHBzosxw8YRk7Sn dySKDP9e5iJ9LGtg1799ldzPh3FgUsxI7J/akDvm+ByQqYTjisW5o6VixDmSgf+37Lel1FEf4 tL2uszHx7UEucn/UZ3x3IR2/sMs152BfSKzilL8NtLAjppoZm3xsxFnu6fjuk/uZRYhP1W5VN bJxjhZGz/8M1tPWyR92vFdCGJlpmCfKaqZoFXG/fQTr3cVsYQ1lcJJNWleJs3GAyPyUE= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_NET_DSA_HWMON is disabled, we get warnings about two unused functions whose only callers are all inside of an #ifdef: drivers/net/dsa/mv88e6xxx.c:3257:12: 'mv88e6xxx_mdio_page_write' defined but not used [-Werror=unused-function] drivers/net/dsa/mv88e6xxx.c:3244:12: 'mv88e6xxx_mdio_page_read' defined but not used [-Werror=unused-function] This adds another ifdef around the function definitions. The warnings appeared after the functions were marked 'static', but the problem was already there before that. Signed-off-by: Arnd Bergmann Fixes: 57d3231057e9 ("net: dsa: mv88e6xxx: fix style issues") Reviewed-by: Vivien Didelot --- When I first submitted it on June 23, there was a clash with some other patches, this version is based on top of current mainline, which contains those patches already, so it should apply cleanly. --- drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index d36aedde8cb9..d1d9d3cf9139 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3187,6 +3187,7 @@ static int mv88e6xxx_set_addr(struct dsa_switch *ds, u8 *addr) return err; } +#ifdef CONFIG_NET_DSA_HWMON static int mv88e6xxx_mdio_page_read(struct dsa_switch *ds, int port, int page, int reg) { @@ -3212,6 +3213,7 @@ static int mv88e6xxx_mdio_page_write(struct dsa_switch *ds, int port, int page, return ret; } +#endif static int mv88e6xxx_port_to_mdio_addr(struct mv88e6xxx_chip *chip, int port) {