net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c
PATCH 1/1 net/mlx5e: Move mlx5e_priv_flags into en_ethtool.c
Move the definition of mlx5e_priv_flags into en_ethtool.c because it's only used there.
--- drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 ------- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/en.h +0 -7
@@ -208,13 +208,6 @@ struct mlx5e_umr_wqe {extern const char mlx5e_self_tests[][ETH_GSTRING_LEN ]; -static const char mlx5e_priv_flags[][ETH_GSTRING_LEN ] = { -"rx_cqe_moder" , -"tx_cqe_moder" , -"rx_cqe_compress" , -"rx_striding_rq" , -}; -enum mlx5e_priv_flag {MLX5E_PFLAG_RX_CQE_BASED_MODER = (1 <<0 ),MLX5E_PFLAG_TX_CQE_BASED_MODER = (1 <<1 ),
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +7 -0
@@ -33,6 +33,13 @@#include "en.h" #include "en/port.h" +static const char mlx5e_priv_flags[][ETH_GSTRING_LEN ] = { +"rx_cqe_moder" , +"tx_cqe_moder" , +"rx_cqe_compress" , +"rx_striding_rq" , +}; +void mlx5e_ethtool_get_drvinfo (struct mlx5e_priv *priv,struct ethtool_drvinfo *drvinfo) {
Signature · 1 line
2.14.4
Quoted 6 lines · Kamal Heib
Move the definition of
mlx5e_priv_flagsintoen_ethtool.cbecause it's only used there.Fixes 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure")Signed-off-by Kamal Heib <[email protected]>---
LGTM, but why to net ?
this patch should go to net-next.
Quoted 43 lines
drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 ------- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-)drivers/net/ethernet/mellanox/mlx5/core/en.h +0
-7@@ -208,13 +208,6 @@ struct mlx5e_umr_wqe {extern const char mlx5e_self_tests[][ETH_GSTRING_LEN ]; -static const char mlx5e_priv_flags[][ETH_GSTRING_LEN ] = { -"rx_cqe_moder" , -"tx_cqe_moder" , -"rx_cqe_compress" , -"rx_striding_rq" , -}; -enum mlx5e_priv_flag {MLX5E_PFLAG_RX_CQE_BASED_MODER = (1 <<0 ),MLX5E_PFLAG_TX_CQE_BASED_MODER = (1 <<1 ),drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +7
-1@@ -33,6 +33,13 @@#include "en.h" #include "en/port.h" +static const char mlx5e_priv_flags[][ETH_GSTRING_LEN ] = { +"rx_cqe_moder" , +"tx_cqe_moder" , +"rx_cqe_compress" , +"rx_striding_rq" , +}; +void mlx5e_ethtool_get_drvinfo (struct mlx5e_priv *priv,struct ethtool_drvinfo *drvinfo) { --2.14.4
Quoted 4 lines · Saeed Mahameed
Quoted 3 lines · Kamal Heib
Move the definition of
mlx5e_priv_flagsintoen_ethtool.cbecause it's only used there.
Quoted 8 lines
Quoted 3 lines
Fixes 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure")Signed-off-by Kamal Heib <[email protected]>---
LGTM, but why to net ?
this patch should go to net-next.
It was sent to net because it fixes an existing commit, but I'm fine with net-next too.
Thanks,
Kamal
Quoted 43 lines
Quoted 43 lines
drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 ------- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-)drivers/net/ethernet/mellanox/mlx5/core/en.h +0
-7@@ -208,13 +208,6 @@ struct mlx5e_umr_wqe {extern const char mlx5e_self_tests[][ETH_GSTRING_LEN ]; -static const char mlx5e_priv_flags[][ETH_GSTRING_LEN ] = { -"rx_cqe_moder" , -"tx_cqe_moder" , -"rx_cqe_compress" , -"rx_striding_rq" , -}; -enum mlx5e_priv_flag {MLX5E_PFLAG_RX_CQE_BASED_MODER = (1 <<0 ),MLX5E_PFLAG_TX_CQE_BASED_MODER = (1 <<1 ),drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +7
-1@@ -33,6 +33,13 @@#include "en.h" #include "en/port.h" +static const char mlx5e_priv_flags[][ETH_GSTRING_LEN ] = { +"rx_cqe_moder" , +"tx_cqe_moder" , +"rx_cqe_compress" , +"rx_striding_rq" , +}; +void mlx5e_ethtool_get_drvinfo (struct mlx5e_priv *priv,struct ethtool_drvinfo *drvinfo) { --2.14.4
Quoted 15 lines · Kamal Heib
Move the definition of
mlx5e_priv_flagsintoen_ethtool.cbecause it's only used there.Fixes 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure")Signed-off-by Kamal Heib <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 ------- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-)drivers/net/ethernet/mellanox/mlx5/core/en.h +0
-0
drivers/net/ethernet/mellanox/mlx5/core/en.h struct mlx5e_umr_wqe { · line 217
Quoted 10 lines
drivers/net/ethernet/mellanox/mlx5/core/en.h +0
-7@@ -208,13 +208,6 @@ struct mlx5e_umr_wqe {extern const char mlx5e_self_tests[][ETH_GSTRING_LEN ]; -static const char mlx5e_priv_flags[][ETH_GSTRING_LEN ] = { -"rx_cqe_moder" , -"tx_cqe_moder" , -"rx_cqe_compress" , -"rx_striding_rq" , -}; -
Hi Kamal, on a second thought, i would like to drop this change and keep mlx5e_priv_flags close/local to the below mlx5e_priv_flag.
Please let me know.
Quoted 24 lines
drivers/net/ethernet/mellanox/mlx5/core/en.h +0
-0enum mlx5e_priv_flag {MLX5E_PFLAG_RX_CQE_BASED_MODER = (1 <<0 ),MLX5E_PFLAG_TX_CQE_BASED_MODER = (1 <<1 ),drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +7
-1@@ -33,6 +33,13 @@#include "en.h" #include "en/port.h" +static const char mlx5e_priv_flags[][ETH_GSTRING_LEN ] = { +"rx_cqe_moder" , +"tx_cqe_moder" , +"rx_cqe_compress" , +"rx_striding_rq" , +}; +void mlx5e_ethtool_get_drvinfo (struct mlx5e_priv *priv,struct ethtool_drvinfo *drvinfo) { --2.14.4
Quoted 30 lines · Saeed Mahameed
Quoted 15 lines · Kamal Heib
Move the definition of
mlx5e_priv_flagsintoen_ethtool.cbecause it's only used there.Fixes 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure")Signed-off-by Kamal Heib <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 ------- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-)drivers/net/ethernet/mellanox/mlx5/core/en.h +0
-0drivers/net/ethernet/mellanox/mlx5/core/en.h struct mlx5e_umr_wqe { · line 217
Quoted 10 lines
drivers/net/ethernet/mellanox/mlx5/core/en.h +0
-7@@ -208,13 +208,6 @@ struct mlx5e_umr_wqe {extern const char mlx5e_self_tests[][ETH_GSTRING_LEN ]; -static const char mlx5e_priv_flags[][ETH_GSTRING_LEN ] = { -"rx_cqe_moder" , -"tx_cqe_moder" , -"rx_cqe_compress" , -"rx_striding_rq" , -}; -Hi Kamal, on a second thought, i would like to drop this change and keep
mlx5e_priv_flagsclose/local to the belowmlx5e_priv_flag.
Quoted 2 lines
Please let me know.
Hi,
Basically this change came to avoid the following warning when compiling the mlx5 driver with "W=1" flag and this error will appear for each file that include the "en.h".
So, I suggest not drop this change.
In file included from drivers/net/ethernet/mellanox/mlx5/core//en_main.c:40:0:
drivers/net/ethernet/mellanox/mlx5/core//en.h:206:19: warning: ‘mlx5e_priv_flags’ defined but not used [-Wunused-const-variable=]
static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
Thanks,
Kamal
Quoted 24 lines
Quoted 24 lines
drivers/net/ethernet/mellanox/mlx5/core/en.h +0
-0enum mlx5e_priv_flag {MLX5E_PFLAG_RX_CQE_BASED_MODER = (1 <<0 ),MLX5E_PFLAG_TX_CQE_BASED_MODER = (1 <<1 ),drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +7
-1@@ -33,6 +33,13 @@#include "en.h" #include "en/port.h" +static const char mlx5e_priv_flags[][ETH_GSTRING_LEN ] = { +"rx_cqe_moder" , +"tx_cqe_moder" , +"rx_cqe_compress" , +"rx_striding_rq" , +}; +void mlx5e_ethtool_get_drvinfo (struct mlx5e_priv *priv,struct ethtool_drvinfo *drvinfo) { --2.14.4
Quoted 40 lines · Kamal Heib
Quoted 30 lines · Saeed Mahameed
Quoted 15 lines · Kamal Heib
Move the definition of
mlx5e_priv_flagsintoen_ethtool.cbecause it's only used there.Fixes 4e59e2888139 ("net/mlx5e: Introduce net device priv flags infrastructure")Signed-off-by Kamal Heib <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 ------- drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-)drivers/net/ethernet/mellanox/mlx5/core/en.h +0
-0drivers/net/ethernet/mellanox/mlx5/core/en.h struct mlx5e_umr_wqe { · line 217
Quoted 10 lines
drivers/net/ethernet/mellanox/mlx5/core/en.h +0
-7@@ -208,13 +208,6 @@ struct mlx5e_umr_wqe {extern const char mlx5e_self_tests[][ETH_GSTRING_LEN ]; -static const char mlx5e_priv_flags[][ETH_GSTRING_LEN ] = { -"rx_cqe_moder" , -"tx_cqe_moder" , -"rx_cqe_compress" , -"rx_striding_rq" , -}; -Hi Kamal, on a second thought, i would like to drop this change and keep
mlx5e_priv_flagsclose/local to the belowmlx5e_priv_flag.Quoted 2 lines
Please let me know.
Hi,
Basically this change came to avoid the following warning when compiling the mlx5 driver with "W=1" flag and this error will appear for each file that include the "
en.h".
Quoted 6 lines
So, I suggest not drop this change.
In file included from drivers/net/ethernet/mellanox/mlx5/core//en_main.c:40:0:
drivers/net/ethernet/mellanox/mlx5/core//en.h:206:19: warning: ‘mlx5e_priv_flags’ defined but not used [-Wunused-const-variable=]
static const char mlx5e_priv_flags[][ETH_GSTRING_LEN] = {
Ok Kamal,
Patch applied to net-next-mlx5.
Thank you !