mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-06 17:35:20 +02:00
RDMA/hns: Fix restricted __le16 degrades to integer issue
[ Upstream commitf4ccc0a2a0
] Fix sparse warnings: restricted __le16 degrades to integer. Fixes:5a87279591
("RDMA/hns: Support hns HW stats") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202409080508.g4mNSLwy-lkp@intel.com/ Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Link: https://patch.msgid.link/20240909065331.3950268-1-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b3b7ff0767
commit
e8721e9ba1
|
@ -1653,8 +1653,8 @@ static int hns_roce_hw_v2_query_counter(struct hns_roce_dev *hr_dev,
|
|||
|
||||
for (i = 0; i < HNS_ROCE_HW_CNT_TOTAL && i < *num_counters; i++) {
|
||||
bd_idx = i / CNT_PER_DESC;
|
||||
if (!(desc[bd_idx].flag & HNS_ROCE_CMD_FLAG_NEXT) &&
|
||||
bd_idx != HNS_ROCE_HW_CNT_TOTAL / CNT_PER_DESC)
|
||||
if (bd_idx != HNS_ROCE_HW_CNT_TOTAL / CNT_PER_DESC &&
|
||||
!(desc[bd_idx].flag & cpu_to_le16(HNS_ROCE_CMD_FLAG_NEXT)))
|
||||
break;
|
||||
|
||||
cnt_data = (__le64 *)&desc[bd_idx].data[0];
|
||||
|
|
Loading…
Reference in New Issue
Block a user