RDMA/irdma: Remove the redundant return
Subsystems (2)
PATCH 1/1 RDMA/irdma: Remove the redundant return
From: Zhu Yanjun <[email protected]>
The type of the function i40iw_remove is void. So remove the unnecessary return.
--- drivers/infiniband/hw/irdma/i40iw_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/irdma/i40iw_if.c +1 -1
@@ -198,7 +198,7 @@ static void i40iw_remove(struct auxiliary_device *aux_dev) aux_dev);struct i40e_info *cdev_info = i40e_adev->ldev; -return i40e_client_device_unregister (cdev_info); +i40e_client_device_unregister (cdev_info); }static const struct auxiliary_device_id i40iw_auxiliary_id_table[] = {
Signature · 1 line
2.27.0
Quoted 15 lines · On Mon, Jan 10, 2022 at 02:37:33AM -0500, [email protected] wrote:
From: Zhu Yanjun <[email protected]>
The type of the function
i40iw_removeis void. So remove the unnecessary return.Signed-off-by Zhu Yanjun <[email protected]>--- drivers/infiniband/hw/irdma/i40iw_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/infiniband/hw/irdma/i40iw_if.c +0
-0
drivers/infiniband/hw/irdma/i40iw_if.c static void i40iw_remove(struct auxiliary_device *aux_dev) · line 201
Quoted 5 lines
drivers/infiniband/hw/irdma/i40iw_if.c +1
-1@@ -198,7 +198,7 @@ static void i40iw_remove(struct auxiliary_device *aux_dev) aux_dev);struct i40e_info *cdev_info = i40e_adev->ldev; -return i40e_client_device_unregister (cdev_info); +i40e_client_device_unregister (cdev_info);
I'm surprised that compiler didn't warn about extra parameter to return.
Thanks,
Quoted 17 lines · Leon Romanovsky
Quoted 16 lines · On Mon, Jan 10, 2022 at 02:37:33AM -0500, [email protected] wrote:
From: Zhu Yanjun <[email protected]>
The type of the function
i40iw_removeis void. So remove the unnecessary return.Signed-off-by Zhu Yanjun <[email protected]>drivers/infiniband/hw/irdma/i40iw_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/infiniband/hw/irdma/i40iw_if.c +1
-0+++ b/drivers/infiniband/hw/irdma/i40iw_if.c@@ -198,7 +198,7 @@ static void i40iw_remove(struct auxiliary_device *aux_dev) aux_dev);struct i40e_info *cdev_info = i40e_adev->ldev;
Quoted 4 lines
drivers/infiniband/hw/irdma/i40iw_if.c static void i40iw_remove(struct auxiliary_device *aux_dev) · line 201
Quoted 2 lines
drivers/infiniband/hw/irdma/i40iw_if.c +1
-1-return i40e_client_device_unregister (cdev_info); +i40e_client_device_unregister (cdev_info);I'm surprised that compiler didn't warn about extra parameter to return.
It is odd, but valid, C to return void like this..
Jason
Quoted 18 lines · Jason Gunthorpe
Quoted 17 lines · Leon Romanovsky
Quoted 16 lines · On Mon, Jan 10, 2022 at 02:37:33AM -0500, [email protected] wrote:
From: Zhu Yanjun <[email protected]>
The type of the function
i40iw_removeis void. So remove the unnecessary return.Signed-off-by Zhu Yanjun <[email protected]>drivers/infiniband/hw/irdma/i40iw_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/infiniband/hw/irdma/i40iw_if.c +1
-0+++ b/drivers/infiniband/hw/irdma/i40iw_if.c@@ -198,7 +198,7 @@ static void i40iw_remove(struct auxiliary_device *aux_dev) aux_dev);struct i40e_info *cdev_info = i40e_adev->ldev;
Quoted 6 lines
Quoted 4 lines
drivers/infiniband/hw/irdma/i40iw_if.c static void i40iw_remove(struct auxiliary_device *aux_dev) · line 201
Quoted 2 lines
drivers/infiniband/hw/irdma/i40iw_if.c +1
-1-return i40e_client_device_unregister (cdev_info); +i40e_client_device_unregister (cdev_info);I'm surprised that compiler didn't warn about extra parameter to return.
It is odd, but valid, C to return void like this..
Any idea where such C expression can be useful?
Thanks
Quoted 2 lines
Jason
Quoted 11 lines
Subject: [PATCH 1/1] RDMA/irdma: Remove the redundant return
From: Zhu Yanjun <[email protected]>
The type of the function
i40iw_removeis void. So remove the unnecessary return.Signed-off-by Zhu Yanjun <[email protected]>--- drivers/infiniband/hw/irdma/i40iw_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines · On Mon, Jan 10, 2022 at 02:37:33AM -0500, [email protected] wrote:
From: Zhu Yanjun <[email protected]>
The type of the function
i40iw_removeis void. So remove the unnecessary return.Signed-off-by Zhu Yanjun <[email protected]>Reviewed-by Leon Romanovsky <[email protected]>Acked-by Shiraz Saleem <[email protected]>--- drivers/infiniband/hw/irdma/i40iw_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-next, thanks
Jason