* [PATCH -next] IB/hns: Fix return value check in hns_roce_get_cfg()
@ 2016-08-06 1:01 Wei Yongjun
[not found] ` <1470445284-28970-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Wei Yongjun @ 2016-08-06 1:01 UTC (permalink / raw)
To: Lijun Ou, Wei Hu(Xavier), Doug Ledford, Sean Hefty,
Hal Rosenstock
Cc: Wei Yongjun, linux-rdma-u79uwXL29TY76Z2rM5mHXA
In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().
Signed-off-by: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/infiniband/hw/hns/hns_roce_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c
index 5b42ec8..6ead671 100644
--- a/drivers/infiniband/hw/hns/hns_roce_main.c
+++ b/drivers/infiniband/hw/hns/hns_roce_main.c
@@ -715,8 +715,8 @@ static int hns_roce_get_cfg(struct hns_roce_dev *hr_dev)
res = platform_get_resource(hr_dev->pdev, IORESOURCE_MEM, 0);
hr_dev->reg_base = devm_ioremap_resource(dev, res);
- if (!hr_dev->reg_base)
- return -ENOMEM;
+ if (IS_ERR(hr_dev->reg_base))
+ return PTR_ERR(hr_dev->reg_base);
for (i = 0; i < HNS_ROCE_MAX_PORTS; i++) {
net_node = of_parse_phandle(np, "eth-handle", i);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 9+ messages in thread[parent not found: <1470445284-28970-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH -next] IB/hns: Fix return value check in hns_roce_get_cfg() [not found] ` <1470445284-28970-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2016-08-07 5:31 ` Leon Romanovsky [not found] ` <20160807053115.GQ27667-2ukJVAZIZ/Y@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Leon Romanovsky @ 2016-08-07 5:31 UTC (permalink / raw) To: Wei Yongjun Cc: Lijun Ou, Wei Hu(Xavier), Doug Ledford, Sean Hefty, Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 563 bytes --] On Sat, Aug 06, 2016 at 01:01:24AM +0000, Wei Yongjun wrote: > In case of error, the function devm_ioremap_resource() returns ERR_PTR() > and never returns NULL. The NULL test in the return value check should > be replaced with IS_ERR(). > > Signed-off-by: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> On which branch did you base your patch? It would be helpful to us if you followed SubmittionPatches document, section with Fixes description. In such case "git describe" will give immediate answer on my first question. Thanks [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <20160807053115.GQ27667-2ukJVAZIZ/Y@public.gmane.org>]
* Re: [PATCH -next] IB/hns: Fix return value check in hns_roce_get_cfg() [not found] ` <20160807053115.GQ27667-2ukJVAZIZ/Y@public.gmane.org> @ 2016-08-07 12:19 ` Wei Yongjun [not found] ` <087f4381-d830-fc57-ea5d-c516a1b160b5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Wei Yongjun @ 2016-08-07 12:19 UTC (permalink / raw) To: Leon Romanovsky Cc: Lijun Ou, Wei Hu(Xavier), Doug Ledford, Sean Hefty, Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA On 08/07/2016 01:31 PM, Leon Romanovsky wrote: > On Sat, Aug 06, 2016 at 01:01:24AM +0000, Wei Yongjun wrote: >> In case of error, the function devm_ioremap_resource() returns ERR_PTR() >> and never returns NULL. The NULL test in the return value check should >> be replaced with IS_ERR(). >> >> Signed-off-by: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > On which branch did you base your patch? > It would be helpful to us if you followed SubmittionPatches document, > section with Fixes description. In such case "git describe" will give > immediate answer on my first question. > This patch is based on the linux-next.git tree. Fixes: 5e43122add63 ('IB/hns: Add driver files for hns RoCE driver') -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <087f4381-d830-fc57-ea5d-c516a1b160b5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH -next] IB/hns: Fix return value check in hns_roce_get_cfg() [not found] ` <087f4381-d830-fc57-ea5d-c516a1b160b5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2016-08-07 13:14 ` Leon Romanovsky [not found] ` <20160807131419.GS27667-2ukJVAZIZ/Y@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Leon Romanovsky @ 2016-08-07 13:14 UTC (permalink / raw) To: Wei Yongjun Cc: Lijun Ou, Wei Hu(Xavier), Doug Ledford, Sean Hefty, Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1049 bytes --] On Sun, Aug 07, 2016 at 08:19:39PM +0800, Wei Yongjun wrote: > On 08/07/2016 01:31 PM, Leon Romanovsky wrote: > > On Sat, Aug 06, 2016 at 01:01:24AM +0000, Wei Yongjun wrote: > >> In case of error, the function devm_ioremap_resource() returns ERR_PTR() > >> and never returns NULL. The NULL test in the return value check should > >> be replaced with IS_ERR(). > >> > >> Signed-off-by: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > On which branch did you base your patch? > > It would be helpful to us if you followed SubmittionPatches document, > > section with Fixes description. In such case "git describe" will give > > immediate answer on my first question. > > > This patch is based on the linux-next.git tree. > Fixes: 5e43122add63 ('IB/hns: Add driver files for hns RoCE driver') This driver wasn't part of last pull request and it is worth to consult with Doug Ledford on the plans for this driver (stay in ->next, resubmit e.t.c). Right now, there is no tree to apply this patch. Thanks > [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <20160807131419.GS27667-2ukJVAZIZ/Y@public.gmane.org>]
* Re: [PATCH -next] IB/hns: Fix return value check in hns_roce_get_cfg() [not found] ` <20160807131419.GS27667-2ukJVAZIZ/Y@public.gmane.org> @ 2016-08-11 10:43 ` Wei Hu (Xavier) [not found] ` <57AC56D4.3050401-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Wei Hu (Xavier) @ 2016-08-11 10:43 UTC (permalink / raw) To: Doug Ledford Cc: Leon Romanovsky, Wei Yongjun, Lijun Ou, Sean Hefty, linux-rdma-u79uwXL29TY76Z2rM5mHXA Hi, Doug Ledford Can you give me a suggestion that what we should do? Thanks very much! Regards Wei Hu On 2016/8/7 21:14, Leon Romanovsky wrote: > On Sun, Aug 07, 2016 at 08:19:39PM +0800, Wei Yongjun wrote: >> On 08/07/2016 01:31 PM, Leon Romanovsky wrote: >>> On Sat, Aug 06, 2016 at 01:01:24AM +0000, Wei Yongjun wrote: >>>> In case of error, the function devm_ioremap_resource() returns ERR_PTR() >>>> and never returns NULL. The NULL test in the return value check should >>>> be replaced with IS_ERR(). >>>> >>>> Signed-off-by: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>> On which branch did you base your patch? >>> It would be helpful to us if you followed SubmittionPatches document, >>> section with Fixes description. In such case "git describe" will give >>> immediate answer on my first question. >>> >> This patch is based on the linux-next.git tree. >> Fixes: 5e43122add63 ('IB/hns: Add driver files for hns RoCE driver') > This driver wasn't part of last pull request and it is worth to consult > with Doug Ledford on the plans for this driver (stay in ->next, resubmit > e.t.c). > > Right now, there is no tree to apply this patch. > > Thanks -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <57AC56D4.3050401-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH -next] IB/hns: Fix return value check in hns_roce_get_cfg() [not found] ` <57AC56D4.3050401-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> @ 2016-08-22 18:15 ` Doug Ledford [not found] ` <c27a3c5f-9604-546a-5ac7-e70613d93d50-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Doug Ledford @ 2016-08-22 18:15 UTC (permalink / raw) To: Wei Hu (Xavier) Cc: Leon Romanovsky, Wei Yongjun, Lijun Ou, Sean Hefty, linux-rdma-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1.1: Type: text/plain, Size: 1960 bytes --] On 8/11/2016 6:43 AM, Wei Hu (Xavier) wrote: > Hi, Doug Ledford > > Can you give me a suggestion that what we should do? Thanks very much! I still have a branch for your driver, the hns-roce branch in my tree (only available via my github repo for now). Now that Dave Miller has taken in the most recent patch to add the needed reset function to the hns net driver, I rebased your branch in my tree on his net-next branch. I'll submit it in the next merge window. I then applied this patch on top of that branch. So, future patches to your driver need to be against my hns-roce branch in my github repo, at least until I merge it into my official k.o/for-4.9 branch. > Regards > Wei Hu > > On 2016/8/7 21:14, Leon Romanovsky wrote: >> On Sun, Aug 07, 2016 at 08:19:39PM +0800, Wei Yongjun wrote: >>> On 08/07/2016 01:31 PM, Leon Romanovsky wrote: >>>> On Sat, Aug 06, 2016 at 01:01:24AM +0000, Wei Yongjun wrote: >>>>> In case of error, the function devm_ioremap_resource() returns >>>>> ERR_PTR() >>>>> and never returns NULL. The NULL test in the return value check should >>>>> be replaced with IS_ERR(). >>>>> >>>>> Signed-off-by: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>>> On which branch did you base your patch? >>>> It would be helpful to us if you followed SubmittionPatches document, >>>> section with Fixes description. In such case "git describe" will give >>>> immediate answer on my first question. >>>> >>> This patch is based on the linux-next.git tree. >>> Fixes: 5e43122add63 ('IB/hns: Add driver files for hns RoCE driver') >> This driver wasn't part of last pull request and it is worth to consult >> with Doug Ledford on the plans for this driver (stay in ->next, resubmit >> e.t.c). >> >> Right now, there is no tree to apply this patch. >> >> Thanks > > -- Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> GPG Key ID: 0E572FDD [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 884 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <c27a3c5f-9604-546a-5ac7-e70613d93d50-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH -next] IB/hns: Fix return value check in hns_roce_get_cfg() [not found] ` <c27a3c5f-9604-546a-5ac7-e70613d93d50-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2016-08-23 1:56 ` Wei Hu (Xavier) [not found] ` <57BBAD65.6000108-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Wei Hu (Xavier) @ 2016-08-23 1:56 UTC (permalink / raw) To: Doug Ledford Cc: Wei Yongjun, Lijun Ou, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Linuxarm On 2016/8/23 2:15, Doug Ledford wrote: > On 8/11/2016 6:43 AM, Wei Hu (Xavier) wrote: >> Hi, Doug Ledford >> >> Can you give me a suggestion that what we should do? Thanks very much! > I still have a branch for your driver, the hns-roce branch in my tree > (only available via my github repo for now). Now that Dave Miller has > taken in the most recent patch to add the needed reset function to the > hns net driver, I rebased your branch in my tree on his net-next branch. > I'll submit it in the next merge window. I then applied this patch on > top of that branch. So, future patches to your driver need to be > against my hns-roce branch in my github repo, at least until I merge it > into my official k.o/for-4.9 branch. Hi, Doug Ledford Can you provide us your hns-roce branch in github repo? Many thanks Wei Hu >> Regards >> Wei Hu >> >> On 2016/8/7 21:14, Leon Romanovsky wrote: >>> On Sun, Aug 07, 2016 at 08:19:39PM +0800, Wei Yongjun wrote: >>>> On 08/07/2016 01:31 PM, Leon Romanovsky wrote: >>>>> On Sat, Aug 06, 2016 at 01:01:24AM +0000, Wei Yongjun wrote: >>>>>> In case of error, the function devm_ioremap_resource() returns >>>>>> ERR_PTR() >>>>>> and never returns NULL. The NULL test in the return value check should >>>>>> be replaced with IS_ERR(). >>>>>> >>>>>> Signed-off-by: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>>>> On which branch did you base your patch? >>>>> It would be helpful to us if you followed SubmittionPatches document, >>>>> section with Fixes description. In such case "git describe" will give >>>>> immediate answer on my first question. >>>>> >>>> This patch is based on the linux-next.git tree. >>>> Fixes: 5e43122add63 ('IB/hns: Add driver files for hns RoCE driver') >>> This driver wasn't part of last pull request and it is worth to consult >>> with Doug Ledford on the plans for this driver (stay in ->next, resubmit >>> e.t.c). >>> >>> Right now, there is no tree to apply this patch. >>> >>> Thanks >> > -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <57BBAD65.6000108-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH -next] IB/hns: Fix return value check in hns_roce_get_cfg() [not found] ` <57BBAD65.6000108-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> @ 2016-08-23 10:59 ` Leon Romanovsky [not found] ` <20160823105926.GG15065-2ukJVAZIZ/Y@public.gmane.org> 0 siblings, 1 reply; 9+ messages in thread From: Leon Romanovsky @ 2016-08-23 10:59 UTC (permalink / raw) To: Wei Hu (Xavier) Cc: Doug Ledford, Wei Yongjun, Lijun Ou, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Linuxarm [-- Attachment #1: Type: text/plain, Size: 972 bytes --] On Tue, Aug 23, 2016 at 09:56:53AM +0800, Wei Hu (Xavier) wrote: > > > On 2016/8/23 2:15, Doug Ledford wrote: > >On 8/11/2016 6:43 AM, Wei Hu (Xavier) wrote: > >>Hi, Doug Ledford > >> > >> Can you give me a suggestion that what we should do? Thanks very much! > >I still have a branch for your driver, the hns-roce branch in my tree > >(only available via my github repo for now). Now that Dave Miller has > >taken in the most recent patch to add the needed reset function to the > >hns net driver, I rebased your branch in my tree on his net-next branch. > > I'll submit it in the next merge window. I then applied this patch on > >top of that branch. So, future patches to your driver need to be > >against my hns-roce branch in my github repo, at least until I merge it > >into my official k.o/for-4.9 branch. > Hi, Doug Ledford > Can you provide us your hns-roce branch in github repo? https://github.com/dledford/linux/tree/hns-roce [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <20160823105926.GG15065-2ukJVAZIZ/Y@public.gmane.org>]
* Re: [PATCH -next] IB/hns: Fix return value check in hns_roce_get_cfg() [not found] ` <20160823105926.GG15065-2ukJVAZIZ/Y@public.gmane.org> @ 2016-08-24 1:22 ` Wei Hu (Xavier) 0 siblings, 0 replies; 9+ messages in thread From: Wei Hu (Xavier) @ 2016-08-24 1:22 UTC (permalink / raw) To: Leon Romanovsky Cc: Doug Ledford, Wei Yongjun, Lijun Ou, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Linuxarm On 2016/8/23 18:59, Leon Romanovsky wrote: > On Tue, Aug 23, 2016 at 09:56:53AM +0800, Wei Hu (Xavier) wrote: >> >> On 2016/8/23 2:15, Doug Ledford wrote: >>> On 8/11/2016 6:43 AM, Wei Hu (Xavier) wrote: >>>> Hi, Doug Ledford >>>> >>>> Can you give me a suggestion that what we should do? Thanks very much! >>> I still have a branch for your driver, the hns-roce branch in my tree >>> (only available via my github repo for now). Now that Dave Miller has >>> taken in the most recent patch to add the needed reset function to the >>> hns net driver, I rebased your branch in my tree on his net-next branch. >>> I'll submit it in the next merge window. I then applied this patch on >>> top of that branch. So, future patches to your driver need to be >>> against my hns-roce branch in my github repo, at least until I merge it >>> into my official k.o/for-4.9 branch. >> Hi, Doug Ledford >> Can you provide us your hns-roce branch in github repo? > https://github.com/dledford/linux/tree/hns-roce Thank you very much! :-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-08-24 1:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-06 1:01 [PATCH -next] IB/hns: Fix return value check in hns_roce_get_cfg() Wei Yongjun
[not found] ` <1470445284-28970-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-07 5:31 ` Leon Romanovsky
[not found] ` <20160807053115.GQ27667-2ukJVAZIZ/Y@public.gmane.org>
2016-08-07 12:19 ` Wei Yongjun
[not found] ` <087f4381-d830-fc57-ea5d-c516a1b160b5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-07 13:14 ` Leon Romanovsky
[not found] ` <20160807131419.GS27667-2ukJVAZIZ/Y@public.gmane.org>
2016-08-11 10:43 ` Wei Hu (Xavier)
[not found] ` <57AC56D4.3050401-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-08-22 18:15 ` Doug Ledford
[not found] ` <c27a3c5f-9604-546a-5ac7-e70613d93d50-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-08-23 1:56 ` Wei Hu (Xavier)
[not found] ` <57BBAD65.6000108-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-08-23 10:59 ` Leon Romanovsky
[not found] ` <20160823105926.GG15065-2ukJVAZIZ/Y@public.gmane.org>
2016-08-24 1:22 ` Wei Hu (Xavier)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox