linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] staging: mt7621-pci: Use PTR_ERR_OR_ZERO in mt7621_pcie_parse_dt()
@ 2018-09-12  2:50 YueHaibing
  2018-09-12  5:35 ` Sergio Paracuellos
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-09-12  2:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman, matthias.bgg, blogic, sergio.paracuellos,
	neil, peter.vernia, oliver.huebers
  Cc: YueHaibing, devel, linux-arm-kernel, linux-mediatek,
	linux-kernel, kernel-janitors

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

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/staging/mt7621-pci/pci-mt7621.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index ba1f117..d2cb910 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -396,10 +396,7 @@ static int mt7621_pcie_parse_dt(struct mt7621_pcie *pcie)
 	}
 
 	pcie->base = devm_ioremap_resource(dev, &regs);
-	if (IS_ERR(pcie->base))
-		return PTR_ERR(pcie->base);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(pcie->base);
 }
 
 static int mt7621_pcie_request_resources(struct mt7621_pcie *pcie,




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

* Re: [PATCH -next] staging: mt7621-pci: Use PTR_ERR_OR_ZERO in mt7621_pcie_parse_dt()
  2018-09-12  2:50 [PATCH -next] staging: mt7621-pci: Use PTR_ERR_OR_ZERO in mt7621_pcie_parse_dt() YueHaibing
@ 2018-09-12  5:35 ` Sergio Paracuellos
  0 siblings, 0 replies; 2+ messages in thread
From: Sergio Paracuellos @ 2018-09-12  5:35 UTC (permalink / raw)
  To: YueHaibing
  Cc: Greg Kroah-Hartman, matthias.bgg, blogic, neil, peter.vernia,
	oliver.huebers, devel, linux-arm-kernel, linux-mediatek,
	linux-kernel, kernel-janitors

On Wed, Sep 12, 2018 at 02:50:08AM +0000, YueHaibing wrote:
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/staging/mt7621-pci/pci-mt7621.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
> index ba1f117..d2cb910 100644
> --- a/drivers/staging/mt7621-pci/pci-mt7621.c
> +++ b/drivers/staging/mt7621-pci/pci-mt7621.c
> @@ -396,10 +396,7 @@ static int mt7621_pcie_parse_dt(struct mt7621_pcie *pcie)
>  	}
>  
>  	pcie->base = devm_ioremap_resource(dev, &regs);
> -	if (IS_ERR(pcie->base))
> -		return PTR_ERR(pcie->base);
> -
> -	return 0;
> +	return PTR_ERR_OR_ZERO(pcie->base);
>  }

This patch looks good but the 'mt7621_pcie_parse_dt' function is not completed at all.
There is a lot of missing for each pci node to be parsed yet and some patch series which
are doing this have not been tested yet so those patches are not included.

Please see: 
    http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-September/125937.html

Best regards,
    Sergio Paracuellos

>  
>  static int mt7621_pcie_request_resources(struct mt7621_pcie *pcie,
> 
> 
> 

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

end of thread, other threads:[~2018-09-12  5:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-12  2:50 [PATCH -next] staging: mt7621-pci: Use PTR_ERR_OR_ZERO in mt7621_pcie_parse_dt() YueHaibing
2018-09-12  5:35 ` Sergio Paracuellos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).