linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irqchip: uniphier-aidet: use devm_platform_ioremap_resource()
@ 2019-09-05  3:49 Masahiro Yamada
  2019-09-05  8:29 ` Marc Zyngier
  2019-09-06 11:08 ` [tip: irq/core] irqchip/uniphier-aidet: Use devm_platform_ioremap_resource() tip-bot2 for Masahiro Yamada
  0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2019-09-05  3:49 UTC (permalink / raw)
  To: Marc Zyngier, Thomas Gleixner, Jason Cooper
  Cc: Masahiro Yamada, linux-arm-kernel, linux-kernel

Replace the chain of platform_get_resource() and devm_ioremap_resource()
with devm_platform_ioremap_resource().

This allows to remove the local variable for (struct resource *), and
have one function call less.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/irqchip/irq-uniphier-aidet.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-uniphier-aidet.c b/drivers/irqchip/irq-uniphier-aidet.c
index ed7b4f47ff3f..89121b39be26 100644
--- a/drivers/irqchip/irq-uniphier-aidet.c
+++ b/drivers/irqchip/irq-uniphier-aidet.c
@@ -166,7 +166,6 @@ static int uniphier_aidet_probe(struct platform_device *pdev)
 	struct device_node *parent_np;
 	struct irq_domain *parent_domain;
 	struct uniphier_aidet_priv *priv;
-	struct resource *res;
 
 	parent_np = of_irq_find_parent(dev->of_node);
 	if (!parent_np)
@@ -181,8 +180,7 @@ static int uniphier_aidet_probe(struct platform_device *pdev)
 	if (!priv)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->reg_base = devm_ioremap_resource(dev, res);
+	priv->reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->reg_base))
 		return PTR_ERR(priv->reg_base);
 
-- 
2.17.1


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

* Re: [PATCH] irqchip: uniphier-aidet: use devm_platform_ioremap_resource()
  2019-09-05  3:49 [PATCH] irqchip: uniphier-aidet: use devm_platform_ioremap_resource() Masahiro Yamada
@ 2019-09-05  8:29 ` Marc Zyngier
  2019-09-06 11:08 ` [tip: irq/core] irqchip/uniphier-aidet: Use devm_platform_ioremap_resource() tip-bot2 for Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2019-09-05  8:29 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Thomas Gleixner, Jason Cooper, linux-arm-kernel, linux-kernel

On Thu, 05 Sep 2019 04:49:32 +0100,
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> 
> Replace the chain of platform_get_resource() and devm_ioremap_resource()
> with devm_platform_ioremap_resource().
> 
> This allows to remove the local variable for (struct resource *), and
> have one function call less.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
>  drivers/irqchip/irq-uniphier-aidet.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Applied to irqchip-next.

Thanks,

	M.

-- 
Jazz is not dead, it just smells funny.

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

* [tip: irq/core] irqchip/uniphier-aidet: Use devm_platform_ioremap_resource()
  2019-09-05  3:49 [PATCH] irqchip: uniphier-aidet: use devm_platform_ioremap_resource() Masahiro Yamada
  2019-09-05  8:29 ` Marc Zyngier
@ 2019-09-06 11:08 ` tip-bot2 for Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Masahiro Yamada @ 2019-09-06 11:08 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Masahiro Yamada, Marc Zyngier, Ingo Molnar, Borislav Petkov,
	linux-kernel

The following commit has been merged into the irq/core branch of tip:

Commit-ID:     e89327f659dd517f30b6232b1fabd6f6c6777c3e
Gitweb:        https://git.kernel.org/tip/e89327f659dd517f30b6232b1fabd6f6c6777c3e
Author:        Masahiro Yamada <yamada.masahiro@socionext.com>
AuthorDate:    Thu, 05 Sep 2019 12:49:32 +09:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Thu, 05 Sep 2019 09:28:13 +01:00

irqchip/uniphier-aidet: Use devm_platform_ioremap_resource()

Replace the chain of platform_get_resource() and devm_ioremap_resource()
with devm_platform_ioremap_resource().

This allows to remove the local variable for (struct resource *), and
have one function call less.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20190905034932.12587-1-yamada.masahiro@socionext.com
---
 drivers/irqchip/irq-uniphier-aidet.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-uniphier-aidet.c b/drivers/irqchip/irq-uniphier-aidet.c
index ed7b4f4..89121b3 100644
--- a/drivers/irqchip/irq-uniphier-aidet.c
+++ b/drivers/irqchip/irq-uniphier-aidet.c
@@ -166,7 +166,6 @@ static int uniphier_aidet_probe(struct platform_device *pdev)
 	struct device_node *parent_np;
 	struct irq_domain *parent_domain;
 	struct uniphier_aidet_priv *priv;
-	struct resource *res;
 
 	parent_np = of_irq_find_parent(dev->of_node);
 	if (!parent_np)
@@ -181,8 +180,7 @@ static int uniphier_aidet_probe(struct platform_device *pdev)
 	if (!priv)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->reg_base = devm_ioremap_resource(dev, res);
+	priv->reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->reg_base))
 		return PTR_ERR(priv->reg_base);
 

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

end of thread, other threads:[~2019-09-06 11:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05  3:49 [PATCH] irqchip: uniphier-aidet: use devm_platform_ioremap_resource() Masahiro Yamada
2019-09-05  8:29 ` Marc Zyngier
2019-09-06 11:08 ` [tip: irq/core] irqchip/uniphier-aidet: Use devm_platform_ioremap_resource() tip-bot2 for Masahiro Yamada

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).