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: 159809 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp7215032jad; Thu, 7 Mar 2019 01:30:38 -0800 (PST) X-Google-Smtp-Source: APXvYqy9ieYcVW5OyPAaRRGsjh644hOzPUXE6JPSLqfAjZRc0wu54N4JrheHkOe3TrlJQaeQdryu X-Received: by 2002:a17:902:20eb:: with SMTP id v40mr11993184plg.20.1551951038719; Thu, 07 Mar 2019 01:30:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551951038; cv=none; d=google.com; s=arc-20160816; b=azV72eRmELWC+d0zE5OgP3z2ybaz0aqrMda/TGe1O7veRfPx1Yt1Y0gdlV7DpLkLLM Bd0snQ4nJwsq3EgD/2PWTfqXGBh4bIR/pDxT4Fux5pqZBsCHpm5v/SLF6+J6VWrWO9sJ +K5Lp1xqtHMia/CzE1rclGJ708JuqUbi+ndLVR7ba5y6CorSV0S6tXFEcsP83fVyXlJo y8dMLG65UxRVm8IIXFGCNyLV+ESvIE2lmEDysuIODDe1ITi2Wb5PZrABuKlHPt3p3fHU FRHeGo9MUdTqZvSUshANHcb0Q5DFxqwVPbJGPwqm3H5tGK1ftr89ZBdwDjO9nSQXWV1/ 4i4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=4+pcoo9nsg/3q3ynljVs/BHVGJuO7jXvESBi3wwY7sw=; b=Tvfi1RNtpkqjIld5Hanyct+GeD3MXRm/dpjZ8XvIeWI6UXknLLIFRGrfoynn2d0ZPm 3eTPYd95rI6HWRxLkCuGc2a536vOhWNzxRFajNpkYksGIYs32kP7fyFMsgaKn8mdp4Lu HnyTnCoA7IWkII8sXOrAPRwY0sflE5SikufWZnBRu8yACOPiuEntCU20ffBkxZG90ul8 MgaSpD29l6eCOequJ0WKhgCiZGllEPBPb1ByGoNsW6ULRkMoXx9GVtHQ0o8AL1tEerra F7d0b9k+2L9Mx+nO9P2JwD9Zui+Rgoj850zxk/0RwlYXhagP9MSiul8UFZIsoeiKAtFf XkuQ== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 15si3623491pgt.261.2019.03.07.01.30.38; Thu, 07 Mar 2019 01:30:38 -0800 (PST) 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 S1726281AbfCGJag (ORCPT + 31 others); Thu, 7 Mar 2019 04:30:36 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:39459 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726136AbfCGJaf (ORCPT ); Thu, 7 Mar 2019 04:30:35 -0500 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" Cc: Nick Desaulniers , Arnd Bergmann , Sasha Neftin , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] igc: remove unused igc_priv_flags_strings array 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-Spam-Flag: NO 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== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.20.0 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)