From: Saeed Mahameed <saeedm@mellanox.com>
To: "cai@lca.pw" <cai@lca.pw>, Leon Romanovsky <leonro@mellanox.com>
Cc: Yishai Hadas <yishaih@mellanox.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net/mlx5: fix -Wtype-limits compilation warnings
Date: Mon, 29 Jul 2019 18:51:38 +0000 [thread overview]
Message-ID: <dc0c3064e253c4fdf2a2a8351995ff061d722588.camel@mellanox.com> (raw)
In-Reply-To: <1563820482-10302-1-git-send-email-cai@lca.pw>
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@lca.pw>
>
Applied to mlx5-next.
Thanks,
Saeed.
prev parent reply other threads:[~2019-07-29 18:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 18:34 Qian Cai
2019-07-22 19:09 ` David Miller
2019-07-22 19:42 ` Saeed Mahameed
2019-07-29 18:51 ` Saeed Mahameed [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dc0c3064e253c4fdf2a2a8351995ff061d722588.camel@mellanox.com \
--to=saeedm@mellanox.com \
--cc=cai@lca.pw \
--cc=davem@davemloft.net \
--cc=leonro@mellanox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yishaih@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®