Skip to content

Commit a5531e9

Browse files
larrchjgunthorpe
authored andcommitted
RDMA/hns: Delete unnecessary memset when allocating VF resource
The hns_roce_cmq_setup_basic_desc() can clear the whole desc, so removes these redundant memset operations. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lang Cheng <[email protected]> Signed-off-by: Weihang Li <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent eaaa98d commit a5531e9

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/infiniband/hw/hns/hns_roce_hw_v2.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,8 +1514,6 @@ static int hns_roce_alloc_vf_resource(struct hns_roce_dev *hr_dev)
15141514

15151515
req_a = (struct hns_roce_vf_res_a *)desc[0].data;
15161516
req_b = (struct hns_roce_vf_res_b *)desc[1].data;
1517-
memset(req_a, 0, sizeof(*req_a));
1518-
memset(req_b, 0, sizeof(*req_b));
15191517
for (i = 0; i < 2; i++) {
15201518
hns_roce_cmq_setup_basic_desc(&desc[i],
15211519
HNS_ROCE_OPC_ALLOC_VF_RES, false);

0 commit comments

Comments
 (0)