[PATCH v2] drivers/net: use 64-bit shift and avoid signed/unsigned mismatch
Stephen Hemminger
stephen at networkplumber.org
Tue Jan 14 19:41:53 CET 2025
On Mon, 6 Jan 2025 13:16:55 -0800
Andre Muezerie <andremue at linux.microsoft.com> wrote:
> This patch avoids warnings like the ones below emitted by MSVC:
>
> 1)
> ../drivers/net/ice/base/ice_flg_rd.c(71): warning C4334: '<<':
> result of 32-bit shift implicitly converted to 64 bits
> (was 64-bit shift intended?)
>
> 2)
> ../drivers/net/ice/ice_dcf_sched.c(177): warning C4018: '>=':
> signed/unsigned mismatch
>
> The fix for (1) is to use 64-bit shifting when appropriate
> (according to what the result is used for).
>
> The fix for (2) is to explicitly cast the variables used in the
> comparison.
>
> Signed-off-by: Andre Muezerie <andremue at linux.microsoft.com>
> ---
> drivers/net/i40e/i40e_ethdev.c | 22 +++++++++++-----------
> drivers/net/iavf/iavf_ethdev.c | 2 +-
> drivers/net/iavf/iavf_rxtx.c | 2 +-
> drivers/net/iavf/iavf_vchnl.c | 2 +-
> drivers/net/ice/base/ice_flg_rd.c | 4 ++--
> drivers/net/ice/base/ice_parser_rt.c | 16 ++++++++--------
> drivers/net/ice/base/ice_xlt_kb.c | 2 +-
> drivers/net/ice/base/meson.build | 19 +++++++++++++------
Patches to base driver need to be avoided if at all possible.
Please resubmit without that part
More information about the dev
mailing list