* [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource()
@ 2023-07-10 2:45 Yangtao Li
2023-07-10 2:45 ` [PATCH v3 02/11] ata: ahci_seattle: " Yangtao Li
` (10 more replies)
0 siblings, 11 replies; 16+ messages in thread
From: Yangtao Li @ 2023-07-10 2:45 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] 16+ messages in thread
* [PATCH v3 02/11] ata: ahci_seattle: Convert to devm_platform_ioremap_resource()
2023-07-10 2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-10 2:45 ` Yangtao Li
2023-07-10 2:45 ` [PATCH v3 03/11] ata: ahci_xgene: " Yangtao Li
` (9 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Yangtao Li @ 2023-07-10 2:45 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] 16+ messages in thread
* [PATCH v3 03/11] ata: ahci_xgene: Convert to devm_platform_ioremap_resource()
2023-07-10 2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-10 2:45 ` [PATCH v3 02/11] ata: ahci_seattle: " Yangtao Li
@ 2023-07-10 2:45 ` Yangtao Li
2023-07-10 2:45 ` [PATCH v3 04/11] ata: ahci_tegra: " Yangtao Li
` (8 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Yangtao Li @ 2023-07-10 2:45 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] 16+ messages in thread
* [PATCH v3 04/11] ata: ahci_tegra: Convert to devm_platform_ioremap_resource()
2023-07-10 2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-10 2:45 ` [PATCH v3 02/11] ata: ahci_seattle: " Yangtao Li
2023-07-10 2:45 ` [PATCH v3 03/11] ata: ahci_xgene: " Yangtao Li
@ 2023-07-10 2:45 ` Yangtao Li
2023-07-10 2:45 ` [PATCH v3 05/11] ata: sata_rcar: drop useless initializer Yangtao Li
` (7 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Yangtao Li @ 2023-07-10 2:45 UTC (permalink / raw)
To: Damien Le Moal, Thierry Reding, Jonathan Hunter
Cc: Yangtao Li, Thierry Reding, linux-ide, linux-tegra, linux-kernel
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Acked-by: Thierry Reding <treding@nvidia.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] 16+ messages in thread
* [PATCH v3 05/11] ata: sata_rcar: drop useless initializer
2023-07-10 2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
` (2 preceding siblings ...)
2023-07-10 2:45 ` [PATCH v3 04/11] ata: ahci_tegra: " Yangtao Li
@ 2023-07-10 2:45 ` Yangtao Li
2023-07-10 12:28 ` Geert Uytterhoeven
2023-07-10 2:45 ` [PATCH v3 06/11] ata: sata_rcar: Remove unnecessary return value check Yangtao Li
` (6 subsequent siblings)
10 siblings, 1 reply; 16+ messages in thread
From: Yangtao Li @ 2023-07-10 2:45 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.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
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] 16+ messages in thread
* [PATCH v3 06/11] ata: sata_rcar: Remove unnecessary return value check
2023-07-10 2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
` (3 preceding siblings ...)
2023-07-10 2:45 ` [PATCH v3 05/11] ata: sata_rcar: drop useless initializer Yangtao Li
@ 2023-07-10 2:45 ` Yangtao Li
2023-07-10 12:29 ` Geert Uytterhoeven
2023-07-10 2:45 ` [PATCH v3 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource() Yangtao Li
` (5 subsequent siblings)
10 siblings, 1 reply; 16+ messages in thread
From: Yangtao Li @ 2023-07-10 2:45 UTC (permalink / raw)
To: Sergey Shtylyov, Damien Le Moal
Cc: Yangtao Li, linux-ide, linux-renesas-soc, linux-kernel
As commit ce753ad1549c ("platform: finally disallow IRQ0 in
platform_get_irq() and its ilk") 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>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
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] 16+ messages in thread
* [PATCH v3 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource()
2023-07-10 2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
` (4 preceding siblings ...)
2023-07-10 2:45 ` [PATCH v3 06/11] ata: sata_rcar: Remove unnecessary return value check Yangtao Li
@ 2023-07-10 2:45 ` Yangtao Li
2023-07-10 12:29 ` Geert Uytterhoeven
2023-07-10 2:45 ` [PATCH v3 08/11] ata: pata_ixp4xx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
` (4 subsequent siblings)
10 siblings, 1 reply; 16+ messages in thread
From: Yangtao Li @ 2023-07-10 2:45 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>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
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] 16+ messages in thread
* [PATCH v3 08/11] ata: pata_ixp4xx: Use devm_platform_get_and_ioremap_resource()
2023-07-10 2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
` (5 preceding siblings ...)
2023-07-10 2:45 ` [PATCH v3 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-10 2:45 ` Yangtao Li
2023-07-10 2:45 ` [PATCH v3 09/11] ata: pata_ixp4xx: Remove unnecessary return value check Yangtao Li
` (3 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Yangtao Li @ 2023-07-10 2:45 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>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
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] 16+ messages in thread
* [PATCH v3 09/11] ata: pata_ixp4xx: Remove unnecessary return value check
2023-07-10 2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
` (6 preceding siblings ...)
2023-07-10 2:45 ` [PATCH v3 08/11] ata: pata_ixp4xx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
@ 2023-07-10 2:45 ` Yangtao Li
2023-07-10 2:45 ` [PATCH v3 10/11] ata: pata_ftide010: Use devm_platform_get_and_ioremap_resource() Yangtao Li
` (2 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Yangtao Li @ 2023-07-10 2:45 UTC (permalink / raw)
To: Sergey Shtylyov, Damien Le Moal; +Cc: Yangtao Li, linux-ide, linux-kernel
As commit ce753ad1549c ("platform: finally disallow IRQ0 in
platform_get_irq() and its ilk") 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>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
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] 16+ messages in thread
* [PATCH v3 10/11] ata: pata_ftide010: Use devm_platform_get_and_ioremap_resource()
2023-07-10 2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
` (7 preceding siblings ...)
2023-07-10 2:45 ` [PATCH v3 09/11] ata: pata_ixp4xx: Remove unnecessary return value check Yangtao Li
@ 2023-07-10 2:45 ` Yangtao Li
2023-07-10 2:45 ` Yangtao Li
2023-07-17 0:44 ` [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Damien Le Moal
10 siblings, 0 replies; 16+ messages in thread
From: Yangtao Li @ 2023-07-10 2:45 UTC (permalink / raw)
To: Sergey Shtylyov, Linus Walleij, 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] 16+ messages in thread
* [PATCH v3 11/11] ata: pata_imx: Use devm_platform_get_and_ioremap_resource()
2023-07-10 2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-10 2:45 ` Yangtao Li
2023-07-10 2:45 ` [PATCH v3 03/11] ata: ahci_xgene: " Yangtao Li
` (9 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: Yangtao Li @ 2023-07-10 2:45 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 11/11] ata: pata_imx: Use devm_platform_get_and_ioremap_resource()
@ 2023-07-10 2:45 ` Yangtao Li
0 siblings, 0 replies; 16+ messages in thread
From: Yangtao Li @ 2023-07-10 2:45 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] 16+ messages in thread
* Re: [PATCH v3 05/11] ata: sata_rcar: drop useless initializer
2023-07-10 2:45 ` [PATCH v3 05/11] ata: sata_rcar: drop useless initializer Yangtao Li
@ 2023-07-10 12:28 ` Geert Uytterhoeven
0 siblings, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2023-07-10 12:28 UTC (permalink / raw)
To: Yangtao Li
Cc: Sergey Shtylyov, Damien Le Moal, linux-ide, linux-renesas-soc,
linux-kernel
On Mon, Jul 10, 2023 at 4:47 AM Yangtao Li <frank.li@vivo.com> wrote:
> There is no need to initialize the variable ret.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3 06/11] ata: sata_rcar: Remove unnecessary return value check
2023-07-10 2:45 ` [PATCH v3 06/11] ata: sata_rcar: Remove unnecessary return value check Yangtao Li
@ 2023-07-10 12:29 ` Geert Uytterhoeven
0 siblings, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2023-07-10 12:29 UTC (permalink / raw)
To: Yangtao Li
Cc: Sergey Shtylyov, Damien Le Moal, linux-ide, linux-renesas-soc,
linux-kernel
On Mon, Jul 10, 2023 at 4:47 AM Yangtao Li <frank.li@vivo.com> wrote:
> As commit ce753ad1549c ("platform: finally disallow IRQ0 in
> platform_get_irq() and its ilk") 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>
> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource()
2023-07-10 2:45 ` [PATCH v3 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource() Yangtao Li
@ 2023-07-10 12:29 ` Geert Uytterhoeven
0 siblings, 0 replies; 16+ messages in thread
From: Geert Uytterhoeven @ 2023-07-10 12:29 UTC (permalink / raw)
To: Yangtao Li
Cc: Sergey Shtylyov, Damien Le Moal, linux-ide, linux-renesas-soc,
linux-kernel
On Mon, Jul 10, 2023 at 4:47 AM Yangtao Li <frank.li@vivo.com> 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>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource()
2023-07-10 2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
` (9 preceding siblings ...)
2023-07-10 2:45 ` Yangtao Li
@ 2023-07-17 0:44 ` Damien Le Moal
10 siblings, 0 replies; 16+ messages in thread
From: Damien Le Moal @ 2023-07-17 0:44 UTC (permalink / raw)
To: Yangtao Li; +Cc: linux-ide, linux-kernel
On 7/10/23 11:45, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Applied the series to for-6.6. Thanks !
(next time, please add a cover letter for a multi-patch series)
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2023-07-17 0:44 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10 2:45 [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-10 2:45 ` [PATCH v3 02/11] ata: ahci_seattle: " Yangtao Li
2023-07-10 2:45 ` [PATCH v3 03/11] ata: ahci_xgene: " Yangtao Li
2023-07-10 2:45 ` [PATCH v3 04/11] ata: ahci_tegra: " Yangtao Li
2023-07-10 2:45 ` [PATCH v3 05/11] ata: sata_rcar: drop useless initializer Yangtao Li
2023-07-10 12:28 ` Geert Uytterhoeven
2023-07-10 2:45 ` [PATCH v3 06/11] ata: sata_rcar: Remove unnecessary return value check Yangtao Li
2023-07-10 12:29 ` Geert Uytterhoeven
2023-07-10 2:45 ` [PATCH v3 07/11] ata: sata_rcar: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-10 12:29 ` Geert Uytterhoeven
2023-07-10 2:45 ` [PATCH v3 08/11] ata: pata_ixp4xx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-10 2:45 ` [PATCH v3 09/11] ata: pata_ixp4xx: Remove unnecessary return value check Yangtao Li
2023-07-10 2:45 ` [PATCH v3 10/11] ata: pata_ftide010: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-10 2:45 ` [PATCH v3 11/11] ata: pata_imx: " Yangtao Li
2023-07-10 2:45 ` Yangtao Li
2023-07-17 0:44 ` [PATCH v3 01/11] ata: ahci_octeon: Convert to devm_platform_ioremap_resource() Damien Le Moal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.