[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dc0c3064e253c4fdf2a2a8351995ff061d722588.camel@mellanox.com>
Date: Mon, 29 Jul 2019 18:51:38 +0000
From: Saeed Mahameed <saeedm@...lanox.com>
To: "cai@....pw" <cai@....pw>, Leon Romanovsky <leonro@...lanox.com>
CC: Yishai Hadas <yishaih@...lanox.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net/mlx5: fix -Wtype-limits compilation warnings
On Mon, 2019-07-22 at 14:34 -0400, Qian Cai wrote:
> The commit b9a7ba556207 ("net/mlx5: Use event mask based on device
> capabilities") introduced a few compilation warnings due to it bumps
> MLX5_EVENT_TYPE_MAX from 0x27 to 0x100 which is always greater than
> an "struct {mlx5_eqe|mlx5_nb}.type" that is an "u8".
>
> drivers/net/ethernet/mellanox/mlx5/core/eq.c: In function
> 'mlx5_eq_notifier_register':
> drivers/net/ethernet/mellanox/mlx5/core/eq.c:948:21: warning:
> comparison
> is always false due to limited range of data type [-Wtype-limits]
> if (nb->event_type >= MLX5_EVENT_TYPE_MAX)
> ^~
> drivers/net/ethernet/mellanox/mlx5/core/eq.c: In function
> 'mlx5_eq_notifier_unregister':
> drivers/net/ethernet/mellanox/mlx5/core/eq.c:959:21: warning:
> comparison
> is always false due to limited range of data type [-Wtype-limits]
> if (nb->event_type >= MLX5_EVENT_TYPE_MAX)
>
> Fix them by removing unnecessary checkings.
>
> Fixes: b9a7ba556207 ("net/mlx5: Use event mask based on device
> capabilities")
> Signed-off-by: Qian Cai <cai@....pw>
>
Applied to mlx5-next.
Thanks,
Saeed.
Powered by blists - more mailing lists