mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Palmer Dabbelt <palmer@sifive.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Bjorn Helgaas <helgaas@kernel.org>,
	Michal Simek <monstr@monstr.eu>,
	Jingoo Han <jingoohan1@gmail.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Andrew Murray <andrew.murray@arm.com>,
	Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PCI: fix ptr_ret.cocci warnings
Date: Sun, 5 Jan 2020 15:21:46 +0800	[thread overview]
Message-ID: <20200105072146.umt5eiq2qbbxrwus@f53c9c00458a> (raw)
In-Reply-To: <202001051538.1jMWp6L9%lkp@intel.com>

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)

  reply	other threads:[~2020-01-05  7:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-12-27 12:18 drivers/pci/controller/pci-tegra.c:1365:1-3: " kbuild test robot
2019-12-27 12:18 ` [PATCH] PCI: fix ptr_ret.cocci warnings kbuild test robot
2018-07-19 23:42 drivers/pci/controller/dwc/pcie-kirin.c:141:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2018-07-19 23:42 ` [PATCH] PCI: fix ptr_ret.cocci warnings kbuild test robot
2018-09-18 14:21   ` Lorenzo Pieralisi
2018-09-19  0:40     ` Songxiaowei (Kirin_DRV)
2018-07-11 23:30 drivers/pci/controller/pci-tegra.c:1132:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2018-07-11 23:30 ` [PATCH] PCI: fix ptr_ret.cocci warnings kbuild test robot
2018-09-18 14:18   ` Lorenzo Pieralisi
2018-09-18 14:47     ` Thierry Reding
2018-09-18 16:30       ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200105072146.umt5eiq2qbbxrwus@f53c9c00458a \
    --to=lkp@intel.com \
    --cc=andrew.murray@arm.com \
    --cc=helgaas@kernel.org \
    --cc=jingoohan1@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=monstr@monstr.eu \
    --cc=palmer@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®