linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource()
@ 2023-07-07  9:55 Yangtao Li
  2023-07-07  9:55 ` [PATCH v2 02/11] ata: ahci_seattle: " Yangtao Li
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Yangtao Li @ 2023-07-07  9:55 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: Yangtao Li, linux-ide, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/ata/ahci_octeon.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/ata/ahci_octeon.c b/drivers/ata/ahci_octeon.c
index e89807fa928e..9accf8923891 100644
--- a/drivers/ata/ahci_octeon.c
+++ b/drivers/ata/ahci_octeon.c
@@ -31,13 +31,11 @@ static int ahci_octeon_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *node = dev->of_node;
-	struct resource *res;
 	void __iomem *base;
 	u64 cfg;
 	int ret;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base = devm_ioremap_resource(&pdev->dev, res);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
-- 
2.39.0


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

* [PATCH v2 02/11] ata: ahci_seattle: Convert to devm_platform_ioremap_resource()
  2023-07-07  9:55 [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-07  9:55 ` Yangtao Li
  2023-07-07  9:55 ` [PATCH v2 03/11] ata: ahci_xgene: " Yangtao Li
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Yangtao Li @ 2023-07-07  9:55 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: Yangtao Li, linux-ide, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/ata/ahci_seattle.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/ata/ahci_seattle.c b/drivers/ata/ahci_seattle.c
index 2c32d58c6ae7..a64c9c4704cd 100644
--- a/drivers/ata/ahci_seattle.c
+++ b/drivers/ata/ahci_seattle.c
@@ -132,8 +132,7 @@ static const struct ata_port_info *ahci_seattle_get_port_info(
 	if (!plat_data)
 		return &ahci_port_info;
 
-	plat_data->sgpio_ctrl = devm_ioremap_resource(dev,
-			      platform_get_resource(pdev, IORESOURCE_MEM, 1));
+	plat_data->sgpio_ctrl = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(plat_data->sgpio_ctrl))
 		return &ahci_port_info;
 
-- 
2.39.0


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

* [PATCH v2 03/11] ata: ahci_xgene: Convert to devm_platform_ioremap_resource()
  2023-07-07  9:55 [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
  2023-07-07  9:55 ` [PATCH v2 02/11] ata: ahci_seattle: " Yangtao Li
@ 2023-07-07  9:55 ` Yangtao Li
  2023-07-07  9:55 ` [PATCH v2 04/11] ata: ahci_tegra: " Yangtao Li
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Yangtao Li @ 2023-07-07  9:55 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: Yangtao Li, linux-ide, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/ata/ahci_xgene.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index eb773f2e28fc..f5deaf648663 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -755,20 +755,17 @@ static int xgene_ahci_probe(struct platform_device *pdev)
 	ctx->dev = dev;
 
 	/* Retrieve the IP core resource */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	ctx->csr_core = devm_ioremap_resource(dev, res);
+	ctx->csr_core = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(ctx->csr_core))
 		return PTR_ERR(ctx->csr_core);
 
 	/* Retrieve the IP diagnostic resource */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
-	ctx->csr_diag = devm_ioremap_resource(dev, res);
+	ctx->csr_diag = devm_platform_ioremap_resource(pdev, 2);
 	if (IS_ERR(ctx->csr_diag))
 		return PTR_ERR(ctx->csr_diag);
 
 	/* Retrieve the IP AXI resource */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 3);
-	ctx->csr_axi = devm_ioremap_resource(dev, res);
+	ctx->csr_axi = devm_platform_ioremap_resource(pdev, 3);
 	if (IS_ERR(ctx->csr_axi))
 		return PTR_ERR(ctx->csr_axi);
 
-- 
2.39.0


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

* [PATCH v2 04/11] ata: ahci_tegra: Convert to devm_platform_ioremap_resource()
  2023-07-07  9:55 [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
  2023-07-07  9:55 ` [PATCH v2 02/11] ata: ahci_seattle: " Yangtao Li
  2023-07-07  9:55 ` [PATCH v2 03/11] ata: ahci_xgene: " Yangtao Li
@ 2023-07-07  9:55 ` Yangtao Li
  2023-07-07 12:49   ` Thierry Reding
  2023-07-07  9:55 ` [PATCH v2 05/11] ata: sata_rcar: drop useless initializer Yangtao Li
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Yangtao Li @ 2023-07-07  9:55 UTC (permalink / raw)
  To: Damien Le Moal, Thierry Reding, Jonathan Hunter
  Cc: Yangtao Li, linux-ide, linux-tegra, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/ata/ahci_tegra.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
index 21c20793e517..d1a35da7e824 100644
--- a/drivers/ata/ahci_tegra.c
+++ b/drivers/ata/ahci_tegra.c
@@ -530,8 +530,7 @@ static int tegra_ahci_probe(struct platform_device *pdev)
 	tegra->pdev = pdev;
 	tegra->soc = of_device_get_match_data(&pdev->dev);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	tegra->sata_regs = devm_ioremap_resource(&pdev->dev, res);
+	tegra->sata_regs = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(tegra->sata_regs))
 		return PTR_ERR(tegra->sata_regs);
 
-- 
2.39.0


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

* [PATCH v2 05/11] ata: sata_rcar: drop useless initializer
  2023-07-07  9:55 [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
                   ` (2 preceding siblings ...)
  2023-07-07  9:55 ` [PATCH v2 04/11] ata: ahci_tegra: " Yangtao Li
@ 2023-07-07  9:55 ` Yangtao Li
  2023-07-07 19:02   ` Sergey Shtylyov
  2023-07-07  9:55 ` [PATCH v2 06/11] ata: sata_rcar: Remove unnecessary return value check Yangtao Li
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Yangtao Li @ 2023-07-07  9:55 UTC (permalink / raw)
  To: Sergey Shtylyov, Damien Le Moal
  Cc: Yangtao Li, linux-ide, linux-renesas-soc, linux-kernel

There is no need to initialize the variable ret, let's drop it.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/ata/sata_rcar.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index 34790f15c1b8..f299b41ab3e6 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -862,8 +862,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
 	struct ata_host *host;
 	struct sata_rcar_priv *priv;
 	struct resource *mem;
-	int irq;
-	int ret = 0;
+	int irq, ret;
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-- 
2.39.0


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

* [PATCH v2 06/11] ata: sata_rcar: Remove unnecessary return value check
  2023-07-07  9:55 [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
                   ` (3 preceding siblings ...)
  2023-07-07  9:55 ` [PATCH v2 05/11] ata: sata_rcar: drop useless initializer Yangtao Li
@ 2023-07-07  9:55 ` Yangtao Li
  2023-07-07 19:06   ` Sergey Shtylyov
  2023-07-07  9:55 ` [PATCH v2 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource() Yangtao Li
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Yangtao Li @ 2023-07-07  9:55 UTC (permalink / raw)
  To: Sergey Shtylyov, Damien Le Moal
  Cc: Yangtao Li, linux-ide, linux-renesas-soc, linux-kernel

As commit a85a6c86c25b ("driver core: platform: Clarify that IRQ 0
is invalid") says, there is no need to check if the platform_get_irq
return value is 0. Let's remove it.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/ata/sata_rcar.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index f299b41ab3e6..43c55ac89daa 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -867,8 +867,6 @@ static int sata_rcar_probe(struct platform_device *pdev)
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
 		return irq;
-	if (!irq)
-		return -EINVAL;
 
 	priv = devm_kzalloc(dev, sizeof(struct sata_rcar_priv), GFP_KERNEL);
 	if (!priv)
-- 
2.39.0


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

* [PATCH v2 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource()
  2023-07-07  9:55 [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
                   ` (4 preceding siblings ...)
  2023-07-07  9:55 ` [PATCH v2 06/11] ata: sata_rcar: Remove unnecessary return value check Yangtao Li
@ 2023-07-07  9:55 ` Yangtao Li
  2023-07-07 19:10   ` Sergey Shtylyov
  2023-07-07  9:55 ` [PATCH v2 08/11] ata: pata_ixp4xx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Yangtao Li @ 2023-07-07  9:55 UTC (permalink / raw)
  To: Sergey Shtylyov, Damien Le Moal
  Cc: Yangtao Li, linux-ide, linux-renesas-soc, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/ata/sata_rcar.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index 43c55ac89daa..63f8337c2a98 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -861,7 +861,6 @@ static int sata_rcar_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct ata_host *host;
 	struct sata_rcar_priv *priv;
-	struct resource *mem;
 	int irq, ret;
 
 	irq = platform_get_irq(pdev, 0);
@@ -887,8 +886,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
 
 	host->private_data = priv;
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->base = devm_ioremap_resource(dev, mem);
+	priv->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->base)) {
 		ret = PTR_ERR(priv->base);
 		goto err_pm_put;
-- 
2.39.0


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

* [PATCH v2 08/11] ata: pata_ixp4xx: Use devm_platform_get_and_ioremap_resource()
  2023-07-07  9:55 [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
                   ` (5 preceding siblings ...)
  2023-07-07  9:55 ` [PATCH v2 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-07  9:55 ` Yangtao Li
  2023-07-07 19:38   ` Sergey Shtylyov
  2023-07-07  9:55 ` [PATCH v2 09/11] ata: pata_ixp4xx: Remove unnecessary return value check Yangtao Li
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Yangtao Li @ 2023-07-07  9:55 UTC (permalink / raw)
  To: Sergey Shtylyov, Damien Le Moal; +Cc: Yangtao Li, linux-ide, linux-kernel

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/ata/pata_ixp4xx_cf.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index b1daa4d3fcd9..1b9f67e16864 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -242,12 +242,6 @@ static int ixp4xx_pata_probe(struct platform_device *pdev)
 	int ret;
 	int irq;
 
-	cmd = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	ctl = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-
-	if (!cmd || !ctl)
-		return -EINVAL;
-
 	ixpp = devm_kzalloc(dev, sizeof(*ixpp), GFP_KERNEL);
 	if (!ixpp)
 		return -ENOMEM;
@@ -271,10 +265,13 @@ static int ixp4xx_pata_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	ixpp->cmd = devm_ioremap_resource(dev, cmd);
-	ixpp->ctl = devm_ioremap_resource(dev, ctl);
-	if (IS_ERR(ixpp->cmd) || IS_ERR(ixpp->ctl))
-		return -ENOMEM;
+	ixpp->cmd = devm_platform_get_and_ioremap_resource(pdev, 0, &cmd);
+	if (IS_ERR(ixpp->cmd))
+		return PTR_ERR(ixpp->cmd);
+
+	ixpp->ctl = devm_platform_get_and_ioremap_resource(pdev, 1, &ctl);
+	if (IS_ERR(ixpp->ctl))
+		return PTR_ERR(ixpp->ctl);
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq > 0)
-- 
2.39.0


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

* [PATCH v2 09/11] ata: pata_ixp4xx: Remove unnecessary return value check
  2023-07-07  9:55 [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
                   ` (6 preceding siblings ...)
  2023-07-07  9:55 ` [PATCH v2 08/11] ata: pata_ixp4xx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-07-07  9:55 ` Yangtao Li
  2023-07-07 19:43   ` Sergey Shtylyov
  2023-07-07  9:55 ` [PATCH v2 10/11] ata: pata_ftide010: Use devm_platform_get_and_ioremap_resource() Yangtao Li
  2023-07-07  9:55 ` [PATCH v2 11/11] ata: pata_imx: " Yangtao Li
  9 siblings, 1 reply; 17+ messages in thread
From: Yangtao Li @ 2023-07-07  9:55 UTC (permalink / raw)
  To: Sergey Shtylyov, Damien Le Moal; +Cc: Yangtao Li, linux-ide, linux-kernel

As commit a85a6c86c25b ("driver core: platform: Clarify that IRQ 0
is invalid") says, there is no need to check if the platform_get_irq
return value is 0. Let's remove it.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/ata/pata_ixp4xx_cf.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index 1b9f67e16864..246bb4f8f1f7 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -274,12 +274,9 @@ static int ixp4xx_pata_probe(struct platform_device *pdev)
 		return PTR_ERR(ixpp->ctl);
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq > 0)
-		irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
-	else if (irq < 0)
+	if (irq < 0)
 		return irq;
-	else
-		return -EINVAL;
+	irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
 
 	/* Just one port to set up */
 	ixp4xx_setup_port(ixpp->host->ports[0], ixpp, cmd->start, ctl->start);
-- 
2.39.0


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

* [PATCH v2 10/11] ata: pata_ftide010: Use devm_platform_get_and_ioremap_resource()
  2023-07-07  9:55 [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
                   ` (7 preceding siblings ...)
  2023-07-07  9:55 ` [PATCH v2 09/11] ata: pata_ixp4xx: Remove unnecessary return value check Yangtao Li
@ 2023-07-07  9:55 ` Yangtao Li
  2023-07-07  9:55 ` [PATCH v2 11/11] ata: pata_imx: " Yangtao Li
  9 siblings, 0 replies; 17+ messages in thread
From: Yangtao Li @ 2023-07-07  9:55 UTC (permalink / raw)
  To: Linus Walleij, Sergey Shtylyov, Damien Le Moal
  Cc: Yangtao Li, linux-ide, linux-kernel

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/ata/pata_ftide010.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/ata/pata_ftide010.c b/drivers/ata/pata_ftide010.c
index 6f6734c09b11..c6f60f1a908f 100644
--- a/drivers/ata/pata_ftide010.c
+++ b/drivers/ata/pata_ftide010.c
@@ -470,11 +470,7 @@ static int pata_ftide010_probe(struct platform_device *pdev)
 	if (irq < 0)
 		return irq;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-
-	ftide->base = devm_ioremap_resource(dev, res);
+	ftide->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(ftide->base))
 		return PTR_ERR(ftide->base);
 
-- 
2.39.0


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

* [PATCH v2 11/11] ata: pata_imx: Use devm_platform_get_and_ioremap_resource()
  2023-07-07  9:55 [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
                   ` (8 preceding siblings ...)
  2023-07-07  9:55 ` [PATCH v2 10/11] ata: pata_ftide010: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-07-07  9:55 ` Yangtao Li
  9 siblings, 0 replies; 17+ messages in thread
From: Yangtao Li @ 2023-07-07  9:55 UTC (permalink / raw)
  To: Sergey Shtylyov, Damien Le Moal, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: Yangtao Li, linux-ide, linux-arm-kernel, linux-kernel

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 drivers/ata/pata_imx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
index 4013f28679a9..65d09ec94c12 100644
--- a/drivers/ata/pata_imx.c
+++ b/drivers/ata/pata_imx.c
@@ -164,8 +164,7 @@ static int pata_imx_probe(struct platform_device *pdev)
 	ap->pio_mask = ATA_PIO4;
 	ap->flags |= ATA_FLAG_SLAVE_POSS;
 
-	io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->host_regs = devm_ioremap_resource(&pdev->dev, io_res);
+	priv->host_regs = devm_platform_get_and_ioremap_resource(pdev, 0, &io_res);
 	if (IS_ERR(priv->host_regs)) {
 		ret = PTR_ERR(priv->host_regs);
 		goto err;
-- 
2.39.0


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

* Re: [PATCH v2 04/11] ata: ahci_tegra: Convert to devm_platform_ioremap_resource()
  2023-07-07  9:55 ` [PATCH v2 04/11] ata: ahci_tegra: " Yangtao Li
@ 2023-07-07 12:49   ` Thierry Reding
  0 siblings, 0 replies; 17+ messages in thread
From: Thierry Reding @ 2023-07-07 12:49 UTC (permalink / raw)
  To: Yangtao Li
  Cc: Damien Le Moal, Jonathan Hunter, linux-ide, linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

On Fri, Jul 07, 2023 at 05:55:06PM +0800, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  drivers/ata/ahci_tegra.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v2 05/11] ata: sata_rcar: drop useless initializer
  2023-07-07  9:55 ` [PATCH v2 05/11] ata: sata_rcar: drop useless initializer Yangtao Li
@ 2023-07-07 19:02   ` Sergey Shtylyov
  0 siblings, 0 replies; 17+ messages in thread
From: Sergey Shtylyov @ 2023-07-07 19:02 UTC (permalink / raw)
  To: Yangtao Li, Damien Le Moal; +Cc: linux-ide, linux-renesas-soc, linux-kernel

On 7/7/23 12:55 PM, Yangtao Li wrote:

> There is no need to initialize the variable ret, let's drop it.

   Drop what, the variable? :-)

> Signed-off-by: Yangtao Li <frank.li@vivo.com>

   Aside from that:

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>

[...]

MBR, Sergey

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

* Re: [PATCH v2 06/11] ata: sata_rcar: Remove unnecessary return value check
  2023-07-07  9:55 ` [PATCH v2 06/11] ata: sata_rcar: Remove unnecessary return value check Yangtao Li
@ 2023-07-07 19:06   ` Sergey Shtylyov
  0 siblings, 0 replies; 17+ messages in thread
From: Sergey Shtylyov @ 2023-07-07 19:06 UTC (permalink / raw)
  To: Yangtao Li, Damien Le Moal; +Cc: linux-ide, linux-renesas-soc, linux-kernel

On 7/7/23 12:55 PM, Yangtao Li wrote:

> As commit a85a6c86c25b ("driver core: platform: Clarify that IRQ 0
> is invalid") says, there is no need to check if the platform_get_irq
> return value is 0. Let's remove it.

   No, that patch still allows returning IRQ0, actually you need:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce753ad1549cbe9ccaea4c06a1f5fa47432c8289

> Signed-off-by: Yangtao Li <frank.li@vivo.com>

   Aside from that:

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>

[...]

MBR, Sergey

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

* Re: [PATCH v2 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource()
  2023-07-07  9:55 ` [PATCH v2 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-07 19:10   ` Sergey Shtylyov
  0 siblings, 0 replies; 17+ messages in thread
From: Sergey Shtylyov @ 2023-07-07 19:10 UTC (permalink / raw)
  To: Yangtao Li, Damien Le Moal; +Cc: linux-ide, linux-renesas-soc, linux-kernel

On 7/7/23 12:55 PM, Yangtao Li wrote:

> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>

[...]

MBR, Sergey

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

* Re: [PATCH v2 08/11] ata: pata_ixp4xx: Use devm_platform_get_and_ioremap_resource()
  2023-07-07  9:55 ` [PATCH v2 08/11] ata: pata_ixp4xx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-07-07 19:38   ` Sergey Shtylyov
  0 siblings, 0 replies; 17+ messages in thread
From: Sergey Shtylyov @ 2023-07-07 19:38 UTC (permalink / raw)
  To: Yangtao Li, Damien Le Moal; +Cc: linux-ide, linux-kernel

On 7/7/23 12:55 PM, Yangtao Li wrote:

> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>

[...]

MBR, Sergey

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

* Re: [PATCH v2 09/11] ata: pata_ixp4xx: Remove unnecessary return value check
  2023-07-07  9:55 ` [PATCH v2 09/11] ata: pata_ixp4xx: Remove unnecessary return value check Yangtao Li
@ 2023-07-07 19:43   ` Sergey Shtylyov
  0 siblings, 0 replies; 17+ messages in thread
From: Sergey Shtylyov @ 2023-07-07 19:43 UTC (permalink / raw)
  To: Yangtao Li, Damien Le Moal; +Cc: linux-ide, linux-kernel

On 7/7/23 12:55 PM, Yangtao Li wrote:

> As commit a85a6c86c25b ("driver core: platform: Clarify that IRQ 0
> is invalid") says, there is no need to check if the platform_get_irq
> return value is 0. Let's remove it.

  Again, you refer to a wrong coommit, you need:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce753ad1549cbe9ccaea4c06a1f5fa47432c8289

> Signed-off-by: Yangtao Li <frank.li@vivo.com>

   Aside from that:

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>

[...]

MBR, Sergey


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

end of thread, other threads:[~2023-07-07 19:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-07  9:55 [PATCH v2 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-07  9:55 ` [PATCH v2 02/11] ata: ahci_seattle: " Yangtao Li
2023-07-07  9:55 ` [PATCH v2 03/11] ata: ahci_xgene: " Yangtao Li
2023-07-07  9:55 ` [PATCH v2 04/11] ata: ahci_tegra: " Yangtao Li
2023-07-07 12:49   ` Thierry Reding
2023-07-07  9:55 ` [PATCH v2 05/11] ata: sata_rcar: drop useless initializer Yangtao Li
2023-07-07 19:02   ` Sergey Shtylyov
2023-07-07  9:55 ` [PATCH v2 06/11] ata: sata_rcar: Remove unnecessary return value check Yangtao Li
2023-07-07 19:06   ` Sergey Shtylyov
2023-07-07  9:55 ` [PATCH v2 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-07 19:10   ` Sergey Shtylyov
2023-07-07  9:55 ` [PATCH v2 08/11] ata: pata_ixp4xx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-07 19:38   ` Sergey Shtylyov
2023-07-07  9:55 ` [PATCH v2 09/11] ata: pata_ixp4xx: Remove unnecessary return value check Yangtao Li
2023-07-07 19:43   ` Sergey Shtylyov
2023-07-07  9:55 ` [PATCH v2 10/11] ata: pata_ftide010: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-07  9:55 ` [PATCH v2 11/11] ata: pata_imx: " Yangtao Li

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