lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190722.120901.1770656295609872438.davem@davemloft.net>
Date:   Mon, 22 Jul 2019 12:09:01 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     cai@....pw
Cc:     saeedm@...lanox.com, leonro@...lanox.com, yishaih@...lanox.com,
        netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net/mlx5: fix -Wtype-limits compilation warnings

From: Qian Cai <cai@....pw>
Date: Mon, 22 Jul 2019 14:34:42 -0400

> 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>

Saeed, I am assuming that you will take this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ