diff options
author | Yury Norov <yury.norov@gmail.com> | 2022-07-01 05:54:25 -0700 |
---|---|---|
committer | Yury Norov <yury.norov@gmail.com> | 2022-07-15 06:35:54 -0700 |
commit | 4dea97f8636d0514befc9fc5cf342b351b7d0e20 (patch) | |
tree | 229c6eb22cd7c99bbe8d942a8f1b84465199a2fa /drivers/net/ethernet/mellanox/mlx4 | |
parent | e2863a78593d638d3924a6f67900c4820034f349 (diff) | |
download | linux-4dea97f8636d0514befc9fc5cf342b351b7d0e20.tar.bz2 |
lib/bitmap: change type of bitmap_weight to unsigned long
bitmap_weight() doesn't return negative values, so change it's type
to unsigned long. It may help compiler to generate better code and
catch bugs.
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/fw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index 42c96c9d7fb1..af054a3808ca 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c @@ -463,7 +463,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, field = min( bitmap_weight(actv_ports.ports, dev->caps.num_ports), - dev->caps.num_ports); + (unsigned long)dev->caps.num_ports); MLX4_PUT(outbox->buf, field, QUERY_FUNC_CAP_NUM_PORTS_OFFSET); size = dev->caps.function_caps; /* set PF behaviours */ |