From patchwork Thu Mar 7 09:29:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 1052742 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arndb.de Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44FQNM4TxPz9sMQ for ; Thu, 7 Mar 2019 20:30:43 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6F370228B4; Thu, 7 Mar 2019 09:30:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TLsjyq0cj27y; Thu, 7 Mar 2019 09:30:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 7CEC422274; Thu, 7 Mar 2019 09:30:39 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 006FB1BF2A2 for ; Thu, 7 Mar 2019 09:30:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id F09D084462 for ; Thu, 7 Mar 2019 09:30:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 23-0FX54B-Ko for ; Thu, 7 Mar 2019 09:30:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.187]) by fraxinus.osuosl.org (Postfix) with ESMTPS id CF467840B5 for ; Thu, 7 Mar 2019 09:30:37 +0000 (UTC) Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1Mq33i-1ggE2u0AMs-00n6Hn; Thu, 07 Mar 2019 10:30:22 +0100 From: Arnd Bergmann To: Jeff Kirsher , "David S. Miller" Date: Thu, 7 Mar 2019 10:29:57 +0100 Message-Id: <20190307093014.3293229-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:N3mvzSfNDVeTkiwt0IdLZpwokV6/9jud1nD98nGRX1EUJEqVPGy D2FdE55gGo8FUMjX06Bg4VZA9E54mdlygtYJUcS7FI6C/ZB1B7u0MjZegnvMLTGa5WpGGMj nd/QizUeLx5QaBZmbTJIfXJevyB6Ro4KkAPCFyr4jFi7x7eNzOKB4sWax3vGxfiVt+AfnJI XvWa8gjtxBb8xjlcZfm7A== X-UI-Out-Filterresults: notjunk:1; V03:K0:Lli521qOlkE=:PQHUQR4B0W6D5kxGg4KDai CaPaQ7rmfvijXUDElKJIpX6wIA3PMiPIyYHn6DIafsclM4zWtO6+MctLLywc11FiY+v11EXKq p4HYL3npnjPKIyYj4z6AIzgTyEy6YhjfoNtnu1FLfcgY7sGHn5OLff0gLXejiGbg/2mry0Mzh GrK8h3cn2iHBCqROZ2mPmPtsyA/g/NotVV/ZRci8zG+0r625RaxBdeyMa34TL3+vo8mikE8sB 7mDDi3rnV7QMyRDHWZmgPkvNzyx9788YsmmRJu4cUhFuLrwFEVzocaBudfWuB3VefxXNqwS3p /YoNsZas5TvgS8pllNKmEn61M3fZ+tka7qLEZCw5TIfV/Ysz0Gdtb9MwvRSh37bb6A7qlqDQp AHoCJv9foPLiiSZSehr2IVOi1wmoy6MV99YtVuV3QAwQIYQ8qqwIEdFqdY8wsS2/gHGss6lgO 5p3EQyOTIsVfpHv8aSzsN+zOtRAypuamLs7s5rDjvCQqUCUmfoYymt9SHFwGPFFyE68IAI7Qu KgQjY0hj3MyfmuGJMyvibNpR1o0MgUvVDj5Yvq4w0N+8WDQtu8ljqbvMx0ZwP6OWIipYhH320 86rBAdheiNp/nCgUpgUtxwgYUdsPqOmxFGlOO1kHYeSCKW4RiuaoMdoch7khTsVPjNsRLabN8 XPNGA7j50MKYFHD7ksAoTqapOqNcNN5kSsZDABXU44esuKPEApCQmFaqR6aGVJQjUyqfEY50R 1oR/kQiOUYuEOTFefrgNCp5QovGoM0Iq0ORYLQ== Subject: [Intel-wired-lan] [PATCH] igc: remove unused igc_priv_flags_strings array X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , netdev@vger.kernel.org, Nick Desaulniers , linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" clang points out that the igc_priv_flags_strings[] array is never referenced, aside from being used for calculating its length: drivers/net/ethernet/intel/igc/igc_ethtool.c:9:19: error: variable 'igc_priv_flags_strings' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] static const char igc_priv_flags_strings[][ETH_GSTRING_LEN] = { A similar array is present in several other intel ethernet drivers, but all the others use it in their .get_strings() callback, which igc does not implement (yet). Probably it should be implemented, but as I have no way of testing it, this does the simpler alternative of removing the array to get rid of the warning. Fixes: 8c5ad0dae93c ("igc: Add ethtool support") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/intel/igc/igc_ethtool.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index eff37a6c0afa..9e352c2be644 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -6,12 +6,9 @@ #include "igc.h" -static const char igc_priv_flags_strings[][ETH_GSTRING_LEN] = { #define IGC_PRIV_FLAGS_LEGACY_RX BIT(0) - "legacy-rx", -}; -#define IGC_PRIV_FLAGS_STR_LEN ARRAY_SIZE(igc_priv_flags_strings) +#define IGC_PRIV_FLAGS_STR_LEN 1 static void igc_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)