* [PATCH] igc: remove unused igc_priv_flags_strings array
@ 2019-03-07 9:29 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2019-03-07 9:29 UTC (permalink / raw)
To: Jeff Kirsher, David S. Miller
Cc: Nick Desaulniers, Arnd Bergmann, Sasha Neftin, intel-wired-lan,
netdev, linux-kernel
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 <arnd@arndb.de>
---
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)
--
2.20.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Intel-wired-lan] [PATCH] igc: remove unused igc_priv_flags_strings array
@ 2019-03-07 9:29 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2019-03-07 9:29 UTC (permalink / raw)
To: 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 <arnd@arndb.de>
---
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)
--
2.20.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] igc: remove unused igc_priv_flags_strings array
2019-03-07 9:29 ` [Intel-wired-lan] " Arnd Bergmann
@ 2019-03-07 17:29 ` David Miller
-1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2019-03-07 17:29 UTC (permalink / raw)
To: arnd
Cc: jeffrey.t.kirsher, ndesaulniers, sasha.neftin, intel-wired-lan,
netdev, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 7 Mar 2019 10:29:57 +0100
> 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 <arnd@arndb.de>
Jeff, I assume you will pick this up.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Intel-wired-lan] [PATCH] igc: remove unused igc_priv_flags_strings array
@ 2019-03-07 17:29 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2019-03-07 17:29 UTC (permalink / raw)
To: intel-wired-lan
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 7 Mar 2019 10:29:57 +0100
> 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 <arnd@arndb.de>
Jeff, I assume you will pick this up.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] igc: remove unused igc_priv_flags_strings array
2019-03-07 17:29 ` [Intel-wired-lan] " David Miller
@ 2019-03-07 17:37 ` Neftin, Sasha
-1 siblings, 0 replies; 6+ messages in thread
From: Neftin, Sasha @ 2019-03-07 17:37 UTC (permalink / raw)
To: David Miller, arnd
Cc: jeffrey.t.kirsher, ndesaulniers, intel-wired-lan, netdev, linux-kernel
On 3/7/2019 09:29, David Miller wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Thu, 7 Mar 2019 10:29:57 +0100
>
>> 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 <arnd@arndb.de>
>
> Jeff, I assume you will pick this up.
>
I've submitted igc: Add support for statistics commit
7aa2547613233a232b9b2e1942d67da4997e6ad0. This patch in Jeff's Kirsher
next-queue and used igc_priv_flags_strings.
Thanks,
Sasha
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Intel-wired-lan] [PATCH] igc: remove unused igc_priv_flags_strings array
@ 2019-03-07 17:37 ` Neftin, Sasha
0 siblings, 0 replies; 6+ messages in thread
From: Neftin, Sasha @ 2019-03-07 17:37 UTC (permalink / raw)
To: intel-wired-lan
On 3/7/2019 09:29, David Miller wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Thu, 7 Mar 2019 10:29:57 +0100
>
>> 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 <arnd@arndb.de>
>
> Jeff, I assume you will pick this up.
>
I've submitted igc: Add support for statistics commit
7aa2547613233a232b9b2e1942d67da4997e6ad0. This patch in Jeff's Kirsher
next-queue and used igc_priv_flags_strings.
Thanks,
Sasha
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-03-07 17:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 9:29 [PATCH] igc: remove unused igc_priv_flags_strings array Arnd Bergmann
2019-03-07 9:29 ` [Intel-wired-lan] " Arnd Bergmann
2019-03-07 17:29 ` David Miller
2019-03-07 17:29 ` [Intel-wired-lan] " David Miller
2019-03-07 17:37 ` Neftin, Sasha
2019-03-07 17:37 ` [Intel-wired-lan] " Neftin, Sasha
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.