* [PATCH] pci: use newly introduced devm_ioremap_resource()
@ 2013-03-11 15:24 Silviu-Mihai Popescu
2013-03-11 17:14 ` Gabor Juhos
2013-03-11 19:07 ` Sergei Shtylyov
0 siblings, 2 replies; 3+ messages in thread
From: Silviu-Mihai Popescu @ 2013-03-11 15:24 UTC (permalink / raw)
To: linux-mips
Cc: ralf, juhosg, blogic, kaloz, linux-kernel, Silviu-Mihai Popescu
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
---
arch/mips/pci/pci-ar71xx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/mips/pci/pci-ar71xx.c b/arch/mips/pci/pci-ar71xx.c
index 412ec02..18517dd 100644
--- a/arch/mips/pci/pci-ar71xx.c
+++ b/arch/mips/pci/pci-ar71xx.c
@@ -366,9 +366,9 @@ static int ar71xx_pci_probe(struct platform_device *pdev)
if (!res)
return -EINVAL;
- apc->cfg_base = devm_request_and_ioremap(&pdev->dev, res);
- if (!apc->cfg_base)
- return -ENOMEM;
+ apc->cfg_base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(apc->cfg_base))
+ return PTR_ERR(apc->cfg_base);
apc->irq = platform_get_irq(pdev, 0);
if (apc->irq < 0)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pci: use newly introduced devm_ioremap_resource()
2013-03-11 15:24 [PATCH] pci: use newly introduced devm_ioremap_resource() Silviu-Mihai Popescu
@ 2013-03-11 17:14 ` Gabor Juhos
2013-03-11 19:07 ` Sergei Shtylyov
1 sibling, 0 replies; 3+ messages in thread
From: Gabor Juhos @ 2013-03-11 17:14 UTC (permalink / raw)
To: Silviu-Mihai Popescu; +Cc: linux-mips, ralf, blogic, kaloz, linux-kernel
2013.03.11. 16:24 keltezéssel, Silviu-Mihai Popescu írta:
> Convert all uses of devm_request_and_ioremap() to the newly introduced
> devm_ioremap_resource() which provides more consistent error handling.
>
> devm_ioremap_resource() provides its own error messages so all explicit
> error messages can be removed from the failure code paths.
>
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Acked-by: Gabor Juhos <juhosg@openwrt.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pci: use newly introduced devm_ioremap_resource()
2013-03-11 15:24 [PATCH] pci: use newly introduced devm_ioremap_resource() Silviu-Mihai Popescu
2013-03-11 17:14 ` Gabor Juhos
@ 2013-03-11 19:07 ` Sergei Shtylyov
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2013-03-11 19:07 UTC (permalink / raw)
To: Silviu-Mihai Popescu
Cc: linux-mips, ralf, juhosg, blogic, kaloz, linux-kernel
Hello.
On 03/11/2013 06:24 PM, Silviu-Mihai Popescu wrote:
> Convert all uses of devm_request_and_ioremap() to the newly introduced
> devm_ioremap_resource() which provides more consistent error handling.
>
> devm_ioremap_resource() provides its own error messages so all explicit
> error messages can be removed from the failure code paths.
>
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
> ---
> arch/mips/pci/pci-ar71xx.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
I think the idea was to combine changes to the 2 files in one patch.
Then the subject will truly reflect what it's doing...
WBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-11 18:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 15:24 [PATCH] pci: use newly introduced devm_ioremap_resource() Silviu-Mihai Popescu
2013-03-11 17:14 ` Gabor Juhos
2013-03-11 19:07 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox