Re: [PATCH] IB/mlx5: Fix sparse warnings in to_mlx5_access_flags()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 30, 2019 at 04:30:51PM -0800, Bart Van Assche wrote:
> Avoid that sparse reports the following for the mlx5 driver:
> 
> drivers/infiniband/hw/mlx5/qp.c:2671:34: warning: invalid assignment: |=
> drivers/infiniband/hw/mlx5/qp.c:2671:34:    left side has type restricted __be32
> drivers/infiniband/hw/mlx5/qp.c:2671:34:    right side has type int
> drivers/infiniband/hw/mlx5/qp.c:2679:34: warning: invalid assignment: |=
> drivers/infiniband/hw/mlx5/qp.c:2679:34:    left side has type restricted __be32
> drivers/infiniband/hw/mlx5/qp.c:2679:34:    right side has type int
> drivers/infiniband/hw/mlx5/qp.c:2680:34: warning: invalid assignment: |=
> drivers/infiniband/hw/mlx5/qp.c:2680:34:    left side has type restricted __be32
> drivers/infiniband/hw/mlx5/qp.c:2680:34:    right side has type int
> drivers/infiniband/hw/mlx5/qp.c:2684:34: warning: invalid assignment: |=
> drivers/infiniband/hw/mlx5/qp.c:2684:34:    left side has type restricted __be32
> drivers/infiniband/hw/mlx5/qp.c:2684:34:    right side has type int
> drivers/infiniband/hw/mlx5/qp.c:2686:28: warning: cast from restricted __be32
> drivers/infiniband/hw/mlx5/qp.c:2686:28: warning: incorrect type in argument 1 (different base types)
> drivers/infiniband/hw/mlx5/qp.c:2686:28:    expected unsigned int [usertype] val
> drivers/infiniband/hw/mlx5/qp.c:2686:28:    got restricted __be32 [usertype]
> drivers/infiniband/hw/mlx5/qp.c:2686:28: warning: cast from restricted __be32
> drivers/infiniband/hw/mlx5/qp.c:2686:28: warning: cast from restricted __be32
> drivers/infiniband/hw/mlx5/qp.c:2686:28: warning: cast from restricted __be32
> drivers/infiniband/hw/mlx5/qp.c:2686:28: warning: cast from restricted __be32
> 
> This patch does not change any functionality.
> 
> Cc: Yonatan Cohen <yonatanc@xxxxxxxxxxxx>
> Cc: Guy Levi <guyle@xxxxxxxxxxxx>
> Cc: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> Fixes: a60109dc9a95 ("IB/mlx5: Add support for extended atomic operations") # v4.20
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> ---
>  drivers/infiniband/hw/mlx5/qp.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)

applied to for-next

Thanks,
Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux