* [PATCH net-next 0/2] Fix W=1 compilation warnings
@ 2019-02-17 13:21 Leon Romanovsky
2019-02-17 13:21 ` [PATCH net-next 1/2] net/mlx5e: Add missing static function annotation Leon Romanovsky
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Leon Romanovsky @ 2019-02-17 13:21 UTC (permalink / raw)
To: Saeed Mahameed, David S . Miller
Cc: Leon Romanovsky, RDMA mailing list, Eyal Davidovich, linux-netdev
From: Leon Romanovsky <leonro@mellanox.com>
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(-)
--
2.19.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next 1/2] net/mlx5e: Add missing static function annotation
2019-02-17 13:21 [PATCH net-next 0/2] Fix W=1 compilation warnings Leon Romanovsky
@ 2019-02-17 13:21 ` Leon Romanovsky
2019-02-17 13:21 ` [PATCH net-next 2/2] net/mlx5: Delete unused FPGA QPN variable Leon Romanovsky
2019-02-19 18:13 ` [PATCH net-next 0/2] Fix W=1 compilation warnings Saeed Mahameed
2 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2019-02-17 13:21 UTC (permalink / raw)
To: Saeed Mahameed, David S . Miller
Cc: Leon Romanovsky, RDMA mailing list, Eyal Davidovich, linux-netdev
From: Leon Romanovsky <leonro@mellanox.com>
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.
Fixes: 5c7e8bbb0257 ("net/mlx5e: Use monitor counters for update stats")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c b/drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c
index 2ce420851e77..7cd5b02e0f10 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/monitor_stats.c
@@ -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);
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next 2/2] net/mlx5: Delete unused FPGA QPN variable
2019-02-17 13:21 [PATCH net-next 0/2] Fix W=1 compilation warnings Leon Romanovsky
2019-02-17 13:21 ` [PATCH net-next 1/2] net/mlx5e: Add missing static function annotation Leon Romanovsky
@ 2019-02-17 13:21 ` Leon Romanovsky
2019-02-19 18:13 ` [PATCH net-next 0/2] Fix W=1 compilation warnings Saeed Mahameed
2 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2019-02-17 13:21 UTC (permalink / raw)
To: Saeed Mahameed, David S . Miller
Cc: Leon Romanovsky, RDMA mailing list, Eyal Davidovich, linux-netdev
From: Leon Romanovsky <leonro@mellanox.com>
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;
^~~~~~~~
Fixes: 98db16bab59f ("net/mlx5: FPGA, Handle QP error event")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c
index 27c5f6c7d36a..d046d1ec2a86 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c
@@ -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;
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next 0/2] Fix W=1 compilation warnings
2019-02-17 13:21 [PATCH net-next 0/2] Fix W=1 compilation warnings Leon Romanovsky
2019-02-17 13:21 ` [PATCH net-next 1/2] net/mlx5e: Add missing static function annotation Leon Romanovsky
2019-02-17 13:21 ` [PATCH net-next 2/2] net/mlx5: Delete unused FPGA QPN variable Leon Romanovsky
@ 2019-02-19 18:13 ` Saeed Mahameed
2 siblings, 0 replies; 4+ messages in thread
From: Saeed Mahameed @ 2019-02-19 18:13 UTC (permalink / raw)
To: davem, leon; +Cc: netdev, Leon Romanovsky, linux-rdma, Eyal Davidovich
On Sun, 2019-02-17 at 15:21 +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
>
> 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(-)
>
> --
> 2.19.1
>
Series applied to net-next-mlx5
Thanks Leon!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-19 18:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-17 13:21 [PATCH net-next 0/2] Fix W=1 compilation warnings Leon Romanovsky
2019-02-17 13:21 ` [PATCH net-next 1/2] net/mlx5e: Add missing static function annotation Leon Romanovsky
2019-02-17 13:21 ` [PATCH net-next 2/2] net/mlx5: Delete unused FPGA QPN variable Leon Romanovsky
2019-02-19 18:13 ` [PATCH net-next 0/2] Fix W=1 compilation warnings Saeed Mahameed
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).