Fix W=1 compilation warnings
Subsystems (5)
cover Fix W=1 compilation warnings
From: Leon Romanovsky <[email protected]>
Hi Saeed,
This short series fixes two small compilation warnings which are visible while compiling with W=1.
Thanks
Leon Romanovsky (2):
net/mlx5e: Add missing static function annotation net/mlx5: Delete unused FPGA QPN variable
drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
PATCH 1/2 net/mlx5e: Add missing static function annotation
From: Leon Romanovsky <[email protected]>
Compilation with W=1 produces following warning:
drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c:69:6:
warning: no previous prototype for _mlx5e_monitor_counter_start_ [-Wmissing-prototypes]
void mlx5e_monitor_counter_start(struct mlx5e_priv *priv)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
Avoid it by declaring mlx5e_monitor_counter_start() as a static function.
--- drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c +1 -1
@@ -66,7 +66,7 @@ static int mlx5e_monitor_event_handler(struct notifier_block *nb,return NOTIFY_OK ; } -void mlx5e_monitor_counter_start (struct mlx5e_priv *priv) +static void mlx5e_monitor_counter_start (struct mlx5e_priv *priv) {MLX5_NB_INIT (&priv->monitor_counters_nb, mlx5e_monitor_event_handler,MONITOR_COUNTER );
PATCH 2/2 net/mlx5: Delete unused FPGA QPN variable
In reply to Leon RomanovskyFrom: Leon Romanovsky <[email protected]>
fpga_qpn was assigned but never used and compilation with W=1 produced the following warning:
drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c: In function _mlx5_fpga_event_:drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c:320:6: warning:
variable _fpga_qpn_ set but not used [-Wunused-but-set-variable]
u32 fpga_qpn;
^~~~~~~~--- drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c +0 -2
@@ -317,7 +317,6 @@ static int mlx5_fpga_event(struct mlx5_fpga_device *fdev,const char *event_name;bool teardown = false;unsigned long flags; -u32 fpga_qpn;u8 syndrome;switch (event) {
@@ -328,7 +327,6 @@ static int mlx5_fpga_event(struct mlx5_fpga_device *fdev,case MLX5_EVENT_TYPE_FPGA_QP_ERROR : syndrome =MLX5_GET (fpga_qp_error_event, data, syndrome); event_name =mlx5_fpga_qp_syndrome_to_string (syndrome); - fpga_qpn =MLX5_GET (fpga_qp_error_event, data, fpga_qpn);break ;default :return NOTIFY_DONE ;
Quoted 14 lines · Leon Romanovsky
From: Leon Romanovsky <[email protected]>
Hi Saeed,
This short series fixes two small compilation warnings which are visible
while compiling with W=1.Thanks
Leon Romanovsky (2):
net/mlx5e: Add missing static function annotation net/mlx5: Delete unused FPGA QPN variable
Quoted 7 lines
drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)--
2.19.1
Series applied to net-next-mlx5
Thanks Leon!