mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/pci/controller/dwc/pci-exynos.c:95:1-3: WARNING: PTR_ERR_OR_ZERO can be used
@ 2020-01-05  7:21 kbuild test robot
  2020-01-05  7:21 ` [PATCH] PCI: fix ptr_ret.cocci warnings kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2020-01-05  7:21 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: kbuild-all, linux-kernel, Bjorn Helgaas, Michal Simek

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   36487907f34131c7e3df5b1e6b30b4e3dfcdc0af
commit: 191d6f91f283dfb007499bb8529d54c3ac434bd7 PCI: Remove PCI_MSI_IRQ_DOMAIN architecture whitelist
date:   6 weeks ago

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/pci/controller/dwc/pci-exynos.c:95:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] PCI: fix ptr_ret.cocci warnings
  2020-01-05  7:21 drivers/pci/controller/dwc/pci-exynos.c:95:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
@ 2020-01-05  7:21 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2020-01-05  7:21 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: kbuild-all, linux-kernel, Bjorn Helgaas, Michal Simek,
	Jingoo Han, Lorenzo Pieralisi, Andrew Murray, Kukjin Kim,
	Krzysztof Kozlowski, linux-pci, linux-arm-kernel

From: kbuild test robot <lkp@intel.com>

drivers/pci/controller/dwc/pci-exynos.c:95:1-3: WARNING: PTR_ERR_OR_ZERO can be used


 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: 191d6f91f283 ("PCI: Remove PCI_MSI_IRQ_DOMAIN architecture whitelist")
CC: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   36487907f34131c7e3df5b1e6b30b4e3dfcdc0af
commit: 191d6f91f283dfb007499bb8529d54c3ac434bd7 PCI: Remove PCI_MSI_IRQ_DOMAIN architecture whitelist

 pci-exynos.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/pci/controller/dwc/pci-exynos.c
+++ b/drivers/pci/controller/dwc/pci-exynos.c
@@ -92,10 +92,7 @@ static int exynos5440_pcie_get_mem_resou
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	ep->mem_res->elbi_base = devm_ioremap_resource(dev, res);
-	if (IS_ERR(ep->mem_res->elbi_base))
-		return PTR_ERR(ep->mem_res->elbi_base);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(ep->mem_res->elbi_base);
 }
 
 static int exynos5440_pcie_get_clk_resources(struct exynos_pcie *ep)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-05  7:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-05  7:21 drivers/pci/controller/dwc/pci-exynos.c:95:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2020-01-05  7:21 ` [PATCH] PCI: fix ptr_ret.cocci warnings kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®