* [PATCH -next] RDMA/hns: Remove unnecessary platform_get_resource() error check
@ 2018-01-17 11:28 Wei Yongjun
[not found] ` <1516188518-147200-1-git-send-email-weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2018-01-17 11:28 UTC (permalink / raw)
To: Lijun Ou, Wei Hu(Xavier), Doug Ledford, Sean Hefty,
Hal Rosenstock
Cc: Wei Yongjun, linux-rdma-u79uwXL29TY76Z2rM5mHXA
devm_ioremap_resource() already checks if the resource is NULL, so
remove the unnecessary platform_get_resource() error check.
Signed-off-by: Wei Yongjun <weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
index 852db18..4549e43 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
@@ -4043,10 +4043,6 @@ static int hns_roce_get_cfg(struct hns_roce_dev *hr_dev)
/* get the mapped register base address */
res = platform_get_resource(hr_dev->pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(dev, "memory resource not found!\n");
- return -EINVAL;
- }
hr_dev->reg_base = devm_ioremap_resource(dev, res);
if (IS_ERR(hr_dev->reg_base))
return PTR_ERR(hr_dev->reg_base);
--
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] 3+ messages in thread[parent not found: <1516188518-147200-1-git-send-email-weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH -next] RDMA/hns: Remove unnecessary platform_get_resource() error check [not found] ` <1516188518-147200-1-git-send-email-weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> @ 2018-01-17 11:45 ` Leon Romanovsky 2018-01-17 21:17 ` Doug Ledford 1 sibling, 0 replies; 3+ messages in thread From: Leon Romanovsky @ 2018-01-17 11:45 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: 461 bytes --] On Wed, Jan 17, 2018 at 11:28:38AM +0000, Wei Yongjun wrote: > devm_ioremap_resource() already checks if the resource is NULL, so > remove the unnecessary platform_get_resource() error check. > > Signed-off-by: Wei Yongjun <weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> > --- > drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 4 ---- > 1 file changed, 4 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] RDMA/hns: Remove unnecessary platform_get_resource() error check [not found] ` <1516188518-147200-1-git-send-email-weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> 2018-01-17 11:45 ` Leon Romanovsky @ 2018-01-17 21:17 ` Doug Ledford 1 sibling, 0 replies; 3+ messages in thread From: Doug Ledford @ 2018-01-17 21:17 UTC (permalink / raw) To: Wei Yongjun, Lijun Ou, Wei Hu(Xavier), Sean Hefty, Hal Rosenstock Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 473 bytes --] On Wed, 2018-01-17 at 11:28 +0000, Wei Yongjun wrote: > devm_ioremap_resource() already checks if the resource is NULL, so > remove the unnecessary platform_get_resource() error check. > > Signed-off-by: Wei Yongjun <weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> Thanks, applied. -- Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-17 21:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-17 11:28 [PATCH -next] RDMA/hns: Remove unnecessary platform_get_resource() error check Wei Yongjun
[not found] ` <1516188518-147200-1-git-send-email-weiyongjun1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-17 11:45 ` Leon Romanovsky
2018-01-17 21:17 ` Doug Ledford
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox