Skip to content

Commit

Permalink
RDMA/cxgb4: Annotate r2 and stag as __be32
Browse files Browse the repository at this point in the history
[ Upstream commit 7d7d065 ]

Chelsio cxgb4 HW is big-endian, hence there is need to properly
annotate r2 and stag fields as __be32 and not __u32 to fix the
following sparse warnings.

  drivers/infiniband/hw/cxgb4/qp.c:614:16:
    warning: incorrect type in assignment (different base types)
      expected unsigned int [unsigned] [usertype] r2
      got restricted __be32 [usertype] <noident>
  drivers/infiniband/hw/cxgb4/qp.c:615:18:
    warning: incorrect type in assignment (different base types)
      expected unsigned int [unsigned] [usertype] stag
      got restricted __be32 [usertype] <noident>

Cc: Steve Wise <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Reviewed-by: Steve Wise <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
rleon authored and gregkh committed Dec 17, 2017
1 parent 89a459e commit f0a7d7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/infiniband/hw/cxgb4/t4fw_ri_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,8 @@ struct fw_ri_fr_nsmr_tpte_wr {
__u16 wrid;
__u8 r1[3];
__u8 len16;
__u32 r2;
__u32 stag;
__be32 r2;
__be32 stag;
struct fw_ri_tpte tpte;
__u64 pbl[2];
};
Expand Down

0 comments on commit f0a7d7b

Please sign in to comment.