diff mbox series

[for-next,7/9] RDMA/hns: Add void conversion for function whose return value is not used

Message ID 20211119140208.40416-8-liangwenpeng@huawei.com (mailing list archive)
State Changes Requested
Delegated to: Jason Gunthorpe
Headers show
Series RDMA/hns: Cleanup for clearing static warnings | expand

Commit Message

Wenpeng Liang Nov. 19, 2021, 2:02 p.m. UTC
From: Xinhao Liu <liuxinhao5@hisilicon.com>

If the return value of the function is not used, then void should be added.

Signed-off-by: Xinhao Liu <liuxinhao5@hisilicon.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jason Gunthorpe Nov. 19, 2021, 5:28 p.m. UTC | #1
On Fri, Nov 19, 2021 at 10:02:06PM +0800, Wenpeng Liang wrote:
> From: Xinhao Liu <liuxinhao5@hisilicon.com>
> 
> If the return value of the function is not used, then void should be
> added.

AFAIK we don't do this in the kernel

Jason
Wenpeng Liang Nov. 24, 2021, 4:04 a.m. UTC | #2
On 2021/11/20 1:28, Jason Gunthorpe wrote:
> On Fri, Nov 19, 2021 at 10:02:06PM +0800, Wenpeng Liang wrote:
>> From: Xinhao Liu <liuxinhao5@hisilicon.com>
>>
>> If the return value of the function is not used, then void should be
>> added.
> 
> AFAIK we don't do this in the kernel
> 
> Jason
> .
> 

Thanks for your comments, I will fix it in v2.

Thanks
Wenpeng
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index d8788819b827..978913fc7587 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -1509,7 +1509,7 @@  static void hns_roce_free_vf_resource(struct hns_roce_dev *hr_dev, int vf_id)
 	desc[0].flag |= cpu_to_le16(HNS_ROCE_CMD_FLAG_NEXT);
 	hns_roce_cmq_setup_basic_desc(&desc[1], opcode, false);
 	hr_reg_write(req_a, FUNC_RES_A_VF_ID, vf_id);
-	hns_roce_cmq_send(hr_dev, desc, 2);
+	(void)hns_roce_cmq_send(hr_dev, desc, 2);
 }
 
 static void hns_roce_function_clear(struct hns_roce_dev *hr_dev)