* [PATCH] IB/hfi1: fix error return code in hfi1_init_dd()
@ 2020-11-13 6:42 Zhang Changzhong
2020-11-13 16:12 ` Mike Marciniszyn
2020-11-13 16:36 ` Jason Gunthorpe
0 siblings, 2 replies; 5+ messages in thread
From: Zhang Changzhong @ 2020-11-13 6:42 UTC (permalink / raw)
To: mike.marciniszyn, dennis.dalessandro, dledford, jgg,
sadanand.warrier, grzegorz.andrejczuk
Cc: linux-rdma, linux-kernel
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
---
drivers/infiniband/hw/hfi1/chip.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c
index 7eaf9953..c87b94e 100644
--- a/drivers/infiniband/hw/hfi1/chip.c
+++ b/drivers/infiniband/hw/hfi1/chip.c
@@ -15245,7 +15245,8 @@ int hfi1_init_dd(struct hfi1_devdata *dd)
& CCE_REVISION_SW_MASK);
/* alloc netdev data */
- if (hfi1_netdev_alloc(dd))
+ ret = hfi1_netdev_alloc(dd);
+ if (ret)
goto bail_cleanup;
ret = set_up_context_variables(dd);
--
2.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] IB/hfi1: fix error return code in hfi1_init_dd()
2020-11-13 6:42 [PATCH] IB/hfi1: fix error return code in hfi1_init_dd() Zhang Changzhong
@ 2020-11-13 16:12 ` Mike Marciniszyn
2020-11-13 16:36 ` Jason Gunthorpe
1 sibling, 0 replies; 5+ messages in thread
From: Mike Marciniszyn @ 2020-11-13 16:12 UTC (permalink / raw)
To: Zhang Changzhong, dennis.dalessandro, dledford, jgg,
sadanand.warrier, grzegorz.andrejczuk
Cc: linux-rdma, linux-kernel
On 11/13/2020 1:42 AM, Zhang Changzhong wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
We actually have this exact patch queued but have not yet sent it.
You saved us the trouble!
Mike
Acked-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] IB/hfi1: fix error return code in hfi1_init_dd()
2020-11-13 6:42 [PATCH] IB/hfi1: fix error return code in hfi1_init_dd() Zhang Changzhong
2020-11-13 16:12 ` Mike Marciniszyn
@ 2020-11-13 16:36 ` Jason Gunthorpe
1 sibling, 0 replies; 5+ messages in thread
From: Jason Gunthorpe @ 2020-11-13 16:36 UTC (permalink / raw)
To: Zhang Changzhong
Cc: mike.marciniszyn, dennis.dalessandro, dledford, sadanand.warrier,
grzegorz.andrejczuk, linux-rdma, linux-kernel
On Fri, Nov 13, 2020 at 02:42:27PM +0800, Zhang Changzhong wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
> Acked-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
> ---
> drivers/infiniband/hw/hfi1/chip.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to for-rc, thanks
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] IB/hfi1: Fix error return code in hfi1_init_dd()
2020-11-15 8:25 [PATCH] IB/hfi1: Fix " Wang ShaoBo
@ 2020-11-15 9:29 ` Leon Romanovsky
0 siblings, 0 replies; 5+ messages in thread
From: Leon Romanovsky @ 2020-11-15 9:29 UTC (permalink / raw)
To: Wang ShaoBo
Cc: jgg, dennis.dalessandro, mike.marciniszyn, linux-rdma,
linux-kernel, huawei.libin, cj.chengjian
On Sun, Nov 15, 2020 at 04:25:48PM +0800, Wang ShaoBo wrote:
> Fix to return the error code from hfi1_netdev_alloc() instaed of 0
> in hfi1_init_dd(), as done elsewhere in this function.
>
> Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
> Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
> ---
> drivers/infiniband/hw/hfi1/chip.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
It was already handled, thanks
https://lore.kernel.org/lkml/1605249747-17942-1-git-send-email-zhangchangzhong@huawei.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] IB/hfi1: Fix error return code in hfi1_init_dd()
@ 2020-11-15 8:25 Wang ShaoBo
2020-11-15 9:29 ` Leon Romanovsky
0 siblings, 1 reply; 5+ messages in thread
From: Wang ShaoBo @ 2020-11-15 8:25 UTC (permalink / raw)
To: jgg
Cc: dennis.dalessandro, mike.marciniszyn, linux-rdma, linux-kernel,
huawei.libin, cj.chengjian
Fix to return the error code from hfi1_netdev_alloc() instaed of 0
in hfi1_init_dd(), as done elsewhere in this function.
Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
---
drivers/infiniband/hw/hfi1/chip.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c
index 7eaf99538216..c87b94ea2939 100644
--- a/drivers/infiniband/hw/hfi1/chip.c
+++ b/drivers/infiniband/hw/hfi1/chip.c
@@ -15245,7 +15245,8 @@ int hfi1_init_dd(struct hfi1_devdata *dd)
& CCE_REVISION_SW_MASK);
/* alloc netdev data */
- if (hfi1_netdev_alloc(dd))
+ ret = hfi1_netdev_alloc(dd);
+ if (ret)
goto bail_cleanup;
ret = set_up_context_variables(dd);
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-15 9:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 6:42 [PATCH] IB/hfi1: fix error return code in hfi1_init_dd() Zhang Changzhong
2020-11-13 16:12 ` Mike Marciniszyn
2020-11-13 16:36 ` Jason Gunthorpe
2020-11-15 8:25 [PATCH] IB/hfi1: Fix " Wang ShaoBo
2020-11-15 9:29 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).