Skip to content

Commit f4ccc0a

Browse files
Junxian Huangrleon
authored andcommitted
RDMA/hns: Fix restricted __le16 degrades to integer issue
Fix sparse warnings: restricted __le16 degrades to integer. Fixes: 5a87279 ("RDMA/hns: Support hns HW stats") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Junxian Huang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 9cd3031 commit f4ccc0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/infiniband/hw/hns/hns_roce_hw_v2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,8 +1681,8 @@ static int hns_roce_hw_v2_query_counter(struct hns_roce_dev *hr_dev,
16811681

16821682
for (i = 0; i < HNS_ROCE_HW_CNT_TOTAL && i < *num_counters; i++) {
16831683
bd_idx = i / CNT_PER_DESC;
1684-
if (!(desc[bd_idx].flag & HNS_ROCE_CMD_FLAG_NEXT) &&
1685-
bd_idx != HNS_ROCE_HW_CNT_TOTAL / CNT_PER_DESC)
1684+
if (bd_idx != HNS_ROCE_HW_CNT_TOTAL / CNT_PER_DESC &&
1685+
!(desc[bd_idx].flag & cpu_to_le16(HNS_ROCE_CMD_FLAG_NEXT)))
16861686
break;
16871687

16881688
cnt_data = (__le64 *)&desc[bd_idx].data[0];

0 commit comments

Comments
 (0)