mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH] PCI: meson: fix ptr_ret.cocci warnings
Date: Tue, 18 Sep 2018 15:35:54 +0100	[thread overview]
Message-ID: <20180918143554.GC32243@e107981-ln.cambridge.arm.com> (raw)
In-Reply-To: <20180814114518.GA82641@lkp-ib04>

On Tue, Aug 14, 2018 at 07:45:18PM +0800, kbuild test robot wrote:
> From: kbuild test robot <fengguang.wu@intel.com>
> 
> drivers/pci/controller/dwc/pci-meson.c:121: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: b43bb00f7533 ("PCI: meson: add the Amlogic Meson PCIe controller driver")
> CC: Yue Wang <yue.wang@amlogic.com>
> Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
> ---
> 
>  pci-meson.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

I have dropped this patch from the PCI patch queue since it was
taken into account in updated patches versions, thanks for sending
it.

Thanks,
Lorenzo

> --- a/drivers/pci/controller/dwc/pci-meson.c
> +++ b/drivers/pci/controller/dwc/pci-meson.c
> @@ -118,10 +118,7 @@ static int meson_pcie_get_mem(struct pla
>  		return -ENODEV;
>  
>  	mp->mem_res.cfg_base = devm_ioremap_resource(dev, res);
> -	if (IS_ERR(mp->mem_res.cfg_base))
> -		return PTR_ERR(mp->mem_res.cfg_base);
> -
> -	return 0;
> +	return PTR_ERR_OR_ZERO(mp->mem_res.cfg_base);
>  }
>  
>  static int meson_pcie_init_clk(struct meson_pcie *mp)

  reply	other threads:[~2018-09-18 14:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-14  6:18 [PATCH 0/2] add the Amlogic Meson PCIe controller driver Hanjie Lin
2018-08-14  6:18 ` [PATCH 1/2] dt-bindings: PCI: meson: add DT bindings for Amlogic Meson PCIe controller Hanjie Lin
2018-08-14 10:41   ` Jerome Brunet
2018-08-16  3:11     ` Hanjie Lin
2018-08-14 22:53   ` Rob Herring
2018-08-16  3:14     ` Hanjie Lin
2018-08-14  6:18 ` [PATCH 2/2] PCI: meson: add the Amlogic Meson PCIe controller driver Hanjie Lin
2018-08-14 10:41   ` Jerome Brunet
2018-08-16  3:22     ` Hanjie Lin
2018-08-14 11:45   ` [PATCH] PCI: meson: fix ptr_ret.cocci warnings kbuild test robot
2018-09-18 14:35     ` Lorenzo Pieralisi [this message]
2018-08-14 11:45   ` [PATCH 2/2] PCI: meson: add the Amlogic Meson PCIe controller driver kbuild test robot

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=20180918143554.GC32243@e107981-ln.cambridge.arm.com \
    --to=lorenzo.pieralisi@arm.com \
    --cc=linus-amlogic@lists.infradead.org \
    /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®