Linux-Amlogic Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code
@ 2019-09-04 13:58 YueHaibing
  2019-09-04 13:58 ` [PATCH -next 01/36] spi: altera: " YueHaibing
                   ` (35 more replies)
  0 siblings, 36 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

devm_platform_ioremap_resource() internally have platform_get_resource()
and devm_ioremap_resource() in it. So instead of calling them separately
use devm_platform_ioremap_resource() directly.

YueHaibing (36):
  spi: altera: use devm_platform_ioremap_resource() to simplify code
  spi: a3700: use devm_platform_ioremap_resource() to simplify code
  spi: ath79: use devm_platform_ioremap_resource() to simplify code
  spi: spi-axi: use devm_platform_ioremap_resource() to simplify code
  spi: bcm2835aux: use devm_platform_ioremap_resource() to simplify code
  spi: bcm2835: use devm_platform_ioremap_resource() to simplify code
  spi: bcm63xx-hsspi: use devm_platform_ioremap_resource() to simplify
    code
  spi: cadence: use devm_platform_ioremap_resource() to simplify code
  spi: octeon: use devm_platform_ioremap_resource() to simplify code
  spi: clps711x: use devm_platform_ioremap_resource() to simplify code
  spi: coldfire-qspi: use devm_platform_ioremap_resource() to simplify
    code
  spi: dw-mmio: use devm_platform_ioremap_resource() to simplify code
  spi: spi-geni-qcom: use devm_platform_ioremap_resource() to simplify
    code
  spi: lp-8841: use devm_platform_ioremap_resource() to simplify code
  spi: meson-spicc: use devm_platform_ioremap_resource() to simplify
    code
  spi: spi-meson-spifc: use devm_platform_ioremap_resource() to simplify
    code
  spi: mt7621: use devm_platform_ioremap_resource() to simplify code
  spi: mxs: use devm_platform_ioremap_resource() to simplify code
  spi: npcm: use devm_platform_ioremap_resource() to simplify code
  spi: nuc900: use devm_platform_ioremap_resource() to simplify code
  spi: oc-tiny: use devm_platform_ioremap_resource() to simplify code
  spi: pic32-sqi: use devm_platform_ioremap_resource() to simplify code
  spi: spi-qcom-qspi: use devm_platform_ioremap_resource() to simplify
    code
  spi: rb4xx: use devm_platform_ioremap_resource() to simplify code
  spi: s3c24xx: use devm_platform_ioremap_resource() to simplify code
  spi: sifive: use devm_platform_ioremap_resource() to simplify code
  spi: sirf: use devm_platform_ioremap_resource() to simplify code
  spi: st-ssc4: use devm_platform_ioremap_resource() to simplify code
  spi: sun4i: use devm_platform_ioremap_resource() to simplify code
  spi: sun6i: use devm_platform_ioremap_resource() to simplify code
  spi: tegra: use devm_platform_ioremap_resource() to simplify code
  spi: uniphier: use devm_platform_ioremap_resource() to simplify code
  spi: xlp: use devm_platform_ioremap_resource() to simplify code
  spi: zynqmp: use devm_platform_ioremap_resource() to simplify code
  spi: zynq-qspi: use devm_platform_ioremap_resource() to simplify code
  spi: fsl-spi: use devm_platform_ioremap_resource() to simplify code

 drivers/spi/spi-altera.c         | 4 +---
 drivers/spi/spi-armada-3700.c    | 4 +---
 drivers/spi/spi-ath79.c          | 4 +---
 drivers/spi/spi-axi-spi-engine.c | 4 +---
 drivers/spi/spi-bcm2835.c        | 4 +---
 drivers/spi/spi-bcm2835aux.c     | 4 +---
 drivers/spi/spi-bcm63xx-hsspi.c  | 4 +---
 drivers/spi/spi-cadence.c        | 4 +---
 drivers/spi/spi-cavium-octeon.c  | 4 +---
 drivers/spi/spi-clps711x.c       | 4 +---
 drivers/spi/spi-coldfire-qspi.c  | 4 +---
 drivers/spi/spi-dw-mmio.c        | 4 +---
 drivers/spi/spi-fsl-cpm.c        | 6 ++----
 drivers/spi/spi-geni-qcom.c      | 4 +---
 drivers/spi/spi-lp8841-rtc.c     | 4 +---
 drivers/spi/spi-meson-spicc.c    | 4 +---
 drivers/spi/spi-meson-spifc.c    | 4 +---
 drivers/spi/spi-mt7621.c         | 4 +---
 drivers/spi/spi-mxs.c            | 4 +---
 drivers/spi/spi-npcm-pspi.c      | 4 +---
 drivers/spi/spi-nuc900.c         | 4 +---
 drivers/spi/spi-oc-tiny.c        | 4 +---
 drivers/spi/spi-pic32-sqi.c      | 4 +---
 drivers/spi/spi-qcom-qspi.c      | 4 +---
 drivers/spi/spi-rb4xx.c          | 4 +---
 drivers/spi/spi-s3c24xx.c        | 4 +---
 drivers/spi/spi-sifive.c         | 4 +---
 drivers/spi/spi-sirf.c           | 4 +---
 drivers/spi/spi-st-ssc4.c        | 4 +---
 drivers/spi/spi-sun4i.c          | 4 +---
 drivers/spi/spi-sun6i.c          | 4 +---
 drivers/spi/spi-tegra20-sflash.c | 4 +---
 drivers/spi/spi-uniphier.c       | 4 +---
 drivers/spi/spi-xlp.c            | 4 +---
 drivers/spi/spi-zynq-qspi.c      | 4 +---
 drivers/spi/spi-zynqmp-gqspi.c   | 4 +---
 36 files changed, 37 insertions(+), 109 deletions(-)

-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 01/36] spi: altera: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 13:58 ` [PATCH -next 02/36] spi: a3700: " YueHaibing
                   ` (34 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-altera.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
index ea160f11..41d71ba 100644
--- a/drivers/spi/spi-altera.c
+++ b/drivers/spi/spi-altera.c
@@ -170,7 +170,6 @@ static int altera_spi_probe(struct platform_device *pdev)
 {
 	struct altera_spi *hw;
 	struct spi_master *master;
-	struct resource *res;
 	int err = -ENODEV;
 
 	master = spi_alloc_master(&pdev->dev, sizeof(struct altera_spi));
@@ -189,8 +188,7 @@ static int altera_spi_probe(struct platform_device *pdev)
 	hw = spi_master_get_devdata(master);
 
 	/* find and map our resources */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hw->base = devm_ioremap_resource(&pdev->dev, res);
+	hw->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(hw->base)) {
 		err = PTR_ERR(hw->base);
 		goto exit;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 02/36] spi: a3700: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
  2019-09-04 13:58 ` [PATCH -next 01/36] spi: altera: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 13:58 ` [PATCH -next 03/36] spi: ath79: " YueHaibing
                   ` (33 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-armada-3700.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-armada-3700.c b/drivers/spi/spi-armada-3700.c
index 119ae87..e450ee1 100644
--- a/drivers/spi/spi-armada-3700.c
+++ b/drivers/spi/spi-armada-3700.c
@@ -817,7 +817,6 @@ static int a3700_spi_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *of_node = dev->of_node;
-	struct resource *res;
 	struct spi_master *master;
 	struct a3700_spi *spi;
 	u32 num_cs = 0;
@@ -855,8 +854,7 @@ static int a3700_spi_probe(struct platform_device *pdev)
 
 	spi->master = master;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	spi->base = devm_ioremap_resource(dev, res);
+	spi->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(spi->base)) {
 		ret = PTR_ERR(spi->base);
 		goto error;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 03/36] spi: ath79: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
  2019-09-04 13:58 ` [PATCH -next 01/36] spi: altera: " YueHaibing
  2019-09-04 13:58 ` [PATCH -next 02/36] spi: a3700: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 13:58 ` [PATCH -next 04/36] spi: spi-axi: " YueHaibing
                   ` (32 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-ath79.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c
index 032a615..eb9a243 100644
--- a/drivers/spi/spi-ath79.c
+++ b/drivers/spi/spi-ath79.c
@@ -139,7 +139,6 @@ static int ath79_spi_probe(struct platform_device *pdev)
 	struct spi_master *master;
 	struct ath79_spi *sp;
 	struct ath79_spi_platform_data *pdata;
-	struct resource	*r;
 	unsigned long rate;
 	int ret;
 
@@ -169,8 +168,7 @@ static int ath79_spi_probe(struct platform_device *pdev)
 	sp->bitbang.txrx_word[SPI_MODE_0] = ath79_spi_txrx_mode0;
 	sp->bitbang.flags = SPI_CS_HIGH;
 
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	sp->base = devm_ioremap_resource(&pdev->dev, r);
+	sp->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(sp->base)) {
 		ret = PTR_ERR(sp->base);
 		goto err_put_master;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 04/36] spi: spi-axi: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (2 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 03/36] spi: ath79: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 13:58 ` [PATCH -next 05/36] spi: bcm2835aux: " YueHaibing
                   ` (31 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-axi-spi-engine.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-axi-spi-engine.c b/drivers/spi/spi-axi-spi-engine.c
index 3b1833e..74842f6 100644
--- a/drivers/spi/spi-axi-spi-engine.c
+++ b/drivers/spi/spi-axi-spi-engine.c
@@ -460,7 +460,6 @@ static int spi_engine_probe(struct platform_device *pdev)
 	struct spi_engine *spi_engine;
 	struct spi_master *master;
 	unsigned int version;
-	struct resource *res;
 	int irq;
 	int ret;
 
@@ -480,8 +479,7 @@ static int spi_engine_probe(struct platform_device *pdev)
 
 	spin_lock_init(&spi_engine->lock);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	spi_engine->base = devm_ioremap_resource(&pdev->dev, res);
+	spi_engine->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(spi_engine->base)) {
 		ret = PTR_ERR(spi_engine->base);
 		goto err_put_master;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 05/36] spi: bcm2835aux: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (3 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 04/36] spi: spi-axi: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-05 18:38   ` Stefan Wahren
  2019-09-04 13:58 ` [PATCH -next 06/36] spi: bcm2835: " YueHaibing
                   ` (30 subsequent siblings)
  35 siblings, 1 reply; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-bcm2835aux.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-bcm2835aux.c b/drivers/spi/spi-bcm2835aux.c
index b18ce69..a2162ff 100644
--- a/drivers/spi/spi-bcm2835aux.c
+++ b/drivers/spi/spi-bcm2835aux.c
@@ -491,7 +491,6 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)
 {
 	struct spi_master *master;
 	struct bcm2835aux_spi *bs;
-	struct resource *res;
 	unsigned long clk_hz;
 	int err;
 
@@ -524,8 +523,7 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)
 	bs = spi_master_get_devdata(master);
 
 	/* the main area */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	bs->regs = devm_ioremap_resource(&pdev->dev, res);
+	bs->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(bs->regs)) {
 		err = PTR_ERR(bs->regs);
 		goto out_master_put;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 06/36] spi: bcm2835: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (4 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 05/36] spi: bcm2835aux: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-05 18:39   ` Stefan Wahren
  2019-09-04 13:58 ` [PATCH -next 07/36] spi: bcm63xx-hsspi: " YueHaibing
                   ` (29 subsequent siblings)
  35 siblings, 1 reply; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-bcm2835.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c
index fd2bfb4..fbd6d1a 100644
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -1001,7 +1001,6 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
 {
 	struct spi_controller *ctlr;
 	struct bcm2835_spi *bs;
-	struct resource *res;
 	int err;
 
 	ctlr = spi_alloc_master(&pdev->dev, sizeof(*bs));
@@ -1022,8 +1021,7 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
 
 	bs = spi_controller_get_devdata(ctlr);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	bs->regs = devm_ioremap_resource(&pdev->dev, res);
+	bs->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(bs->regs)) {
 		err = PTR_ERR(bs->regs);
 		goto out_controller_put;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 07/36] spi: bcm63xx-hsspi: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (5 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 06/36] spi: bcm2835: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 22:10   ` Florian Fainelli
  2019-09-04 13:58 ` [PATCH -next 08/36] spi: cadence: " YueHaibing
                   ` (28 subsequent siblings)
  35 siblings, 1 reply; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-bcm63xx-hsspi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-bcm63xx-hsspi.c b/drivers/spi/spi-bcm63xx-hsspi.c
index 373cb53..c6836a9 100644
--- a/drivers/spi/spi-bcm63xx-hsspi.c
+++ b/drivers/spi/spi-bcm63xx-hsspi.c
@@ -330,7 +330,6 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev)
 {
 	struct spi_master *master;
 	struct bcm63xx_hsspi *bs;
-	struct resource *res_mem;
 	void __iomem *regs;
 	struct device *dev = &pdev->dev;
 	struct clk *clk, *pll_clk = NULL;
@@ -341,8 +340,7 @@ static int bcm63xx_hsspi_probe(struct platform_device *pdev)
 	if (irq < 0)
 		return irq;
 
-	res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	regs = devm_ioremap_resource(dev, res_mem);
+	regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(regs))
 		return PTR_ERR(regs);
 
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 08/36] spi: cadence: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (6 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 07/36] spi: bcm63xx-hsspi: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 13:58 ` [PATCH -next 09/36] spi: octeon: " YueHaibing
                   ` (27 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-cadence.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index 1c35eaa..c36587b 100644
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -474,7 +474,6 @@ static int cdns_spi_probe(struct platform_device *pdev)
 	int ret = 0, irq;
 	struct spi_master *master;
 	struct cdns_spi *xspi;
-	struct resource *res;
 	u32 num_cs;
 
 	master = spi_alloc_master(&pdev->dev, sizeof(*xspi));
@@ -485,8 +484,7 @@ static int cdns_spi_probe(struct platform_device *pdev)
 	master->dev.of_node = pdev->dev.of_node;
 	platform_set_drvdata(pdev, master);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	xspi->regs = devm_ioremap_resource(&pdev->dev, res);
+	xspi->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(xspi->regs)) {
 		ret = PTR_ERR(xspi->regs);
 		goto remove_master;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 09/36] spi: octeon: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (7 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 08/36] spi: cadence: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 13:58 ` [PATCH -next 10/36] spi: clps711x: " YueHaibing
                   ` (26 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-cavium-octeon.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-cavium-octeon.c b/drivers/spi/spi-cavium-octeon.c
index ee4703e..1a2de6c 100644
--- a/drivers/spi/spi-cavium-octeon.c
+++ b/drivers/spi/spi-cavium-octeon.c
@@ -18,7 +18,6 @@
 
 static int octeon_spi_probe(struct platform_device *pdev)
 {
-	struct resource *res_mem;
 	void __iomem *reg_base;
 	struct spi_master *master;
 	struct octeon_spi *p;
@@ -30,8 +29,7 @@ static int octeon_spi_probe(struct platform_device *pdev)
 	p = spi_master_get_devdata(master);
 	platform_set_drvdata(pdev, master);
 
-	res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	reg_base = devm_ioremap_resource(&pdev->dev, res_mem);
+	reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(reg_base)) {
 		err = PTR_ERR(reg_base);
 		goto fail;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 10/36] spi: clps711x: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (8 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 09/36] spi: octeon: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 13:58 ` [PATCH -next 11/36] spi: coldfire-qspi: " YueHaibing
                   ` (25 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-clps711x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-clps711x.c b/drivers/spi/spi-clps711x.c
index 4daba12..5e900f2 100644
--- a/drivers/spi/spi-clps711x.c
+++ b/drivers/spi/spi-clps711x.c
@@ -91,7 +91,6 @@ static int spi_clps711x_probe(struct platform_device *pdev)
 {
 	struct spi_clps711x_data *hw;
 	struct spi_master *master;
-	struct resource *res;
 	int irq, ret;
 
 	irq = platform_get_irq(pdev, 0);
@@ -125,8 +124,7 @@ static int spi_clps711x_probe(struct platform_device *pdev)
 		goto err_out;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hw->syncio = devm_ioremap_resource(&pdev->dev, res);
+	hw->syncio = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(hw->syncio)) {
 		ret = PTR_ERR(hw->syncio);
 		goto err_out;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 11/36] spi: coldfire-qspi: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (9 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 10/36] spi: clps711x: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 13:58 ` [PATCH -next 12/36] spi: dw-mmio: " YueHaibing
                   ` (24 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-coldfire-qspi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c
index 5ff48ab..f80e06c 100644
--- a/drivers/spi/spi-coldfire-qspi.c
+++ b/drivers/spi/spi-coldfire-qspi.c
@@ -339,7 +339,6 @@ static int mcfqspi_probe(struct platform_device *pdev)
 {
 	struct spi_master *master;
 	struct mcfqspi *mcfqspi;
-	struct resource *res;
 	struct mcfqspi_platform_data *pdata;
 	int status;
 
@@ -362,8 +361,7 @@ static int mcfqspi_probe(struct platform_device *pdev)
 
 	mcfqspi = spi_master_get_devdata(master);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mcfqspi->iobase = devm_ioremap_resource(&pdev->dev, res);
+	mcfqspi->iobase = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mcfqspi->iobase)) {
 		status = PTR_ERR(mcfqspi->iobase);
 		goto fail0;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 12/36] spi: dw-mmio: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (10 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 11/36] spi: coldfire-qspi: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 13:58 ` [PATCH -next 13/36] spi: spi-geni-qcom: " YueHaibing
                   ` (23 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-dw-mmio.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c
index edb3cf6..bd46fca 100644
--- a/drivers/spi/spi-dw-mmio.c
+++ b/drivers/spi/spi-dw-mmio.c
@@ -79,14 +79,12 @@ static int dw_spi_mscc_init(struct platform_device *pdev,
 			    const char *cpu_syscon, u32 if_si_owner_offset)
 {
 	struct dw_spi_mscc *dwsmscc;
-	struct resource *res;
 
 	dwsmscc = devm_kzalloc(&pdev->dev, sizeof(*dwsmscc), GFP_KERNEL);
 	if (!dwsmscc)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	dwsmscc->spi_mst = devm_ioremap_resource(&pdev->dev, res);
+	dwsmscc->spi_mst = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(dwsmscc->spi_mst)) {
 		dev_err(&pdev->dev, "SPI_MST region map failed\n");
 		return PTR_ERR(dwsmscc->spi_mst);
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 13/36] spi: spi-geni-qcom: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (11 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 12/36] spi: dw-mmio: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 20:44   ` Bjorn Andersson
  2019-09-04 13:58 ` [PATCH -next 14/36] spi: lp-8841: " YueHaibing
                   ` (22 subsequent siblings)
  35 siblings, 1 reply; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-geni-qcom.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index 242b6c8..6f3d64a 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -534,7 +534,6 @@ static int spi_geni_probe(struct platform_device *pdev)
 	int ret, irq;
 	struct spi_master *spi;
 	struct spi_geni_master *mas;
-	struct resource *res;
 	void __iomem *base;
 	struct clk *clk;
 
@@ -542,8 +541,7 @@ static int spi_geni_probe(struct platform_device *pdev)
 	if (irq < 0)
 		return irq;
 
-	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.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 14/36] spi: lp-8841: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (12 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 13/36] spi: spi-geni-qcom: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 13:58 ` [PATCH -next 15/36] spi: meson-spicc: " YueHaibing
                   ` (21 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-lp8841-rtc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-lp8841-rtc.c b/drivers/spi/spi-lp8841-rtc.c
index f50779f..2d43654 100644
--- a/drivers/spi/spi-lp8841-rtc.c
+++ b/drivers/spi/spi-lp8841-rtc.c
@@ -185,7 +185,6 @@ spi_lp8841_rtc_probe(struct platform_device *pdev)
 	int				ret;
 	struct spi_master		*master;
 	struct spi_lp8841_rtc		*data;
-	void				*iomem;
 
 	master = spi_alloc_master(&pdev->dev, sizeof(*data));
 	if (!master)
@@ -207,8 +206,7 @@ spi_lp8841_rtc_probe(struct platform_device *pdev)
 
 	data = spi_master_get_devdata(master);
 
-	iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	data->iomem = devm_ioremap_resource(&pdev->dev, iomem);
+	data->iomem = devm_platform_ioremap_resource(pdev, 0);
 	ret = PTR_ERR_OR_ZERO(data->iomem);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to get IO address\n");
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 15/36] spi: meson-spicc: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (13 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 14/36] spi: lp-8841: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 14:13   ` Neil Armstrong
  2019-09-04 13:58 ` [PATCH -next 16/36] spi: spi-meson-spifc: " YueHaibing
                   ` (20 subsequent siblings)
  35 siblings, 1 reply; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-meson-spicc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c
index 7fe4488..f3f1044 100644
--- a/drivers/spi/spi-meson-spicc.c
+++ b/drivers/spi/spi-meson-spicc.c
@@ -503,7 +503,6 @@ static int meson_spicc_probe(struct platform_device *pdev)
 {
 	struct spi_master *master;
 	struct meson_spicc_device *spicc;
-	struct resource *res;
 	int ret, irq, rate;
 
 	master = spi_alloc_master(&pdev->dev, sizeof(*spicc));
@@ -517,8 +516,7 @@ static int meson_spicc_probe(struct platform_device *pdev)
 	spicc->pdev = pdev;
 	platform_set_drvdata(pdev, spicc);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	spicc->base = devm_ioremap_resource(&pdev->dev, res);
+	spicc->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(spicc->base)) {
 		dev_err(&pdev->dev, "io resource mapping failed\n");
 		ret = PTR_ERR(spicc->base);
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 16/36] spi: spi-meson-spifc: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (14 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 15/36] spi: meson-spicc: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 14:14   ` Neil Armstrong
  2019-09-04 13:58 ` [PATCH -next 17/36] spi: mt7621: " YueHaibing
                   ` (19 subsequent siblings)
  35 siblings, 1 reply; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-meson-spifc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-meson-spifc.c b/drivers/spi/spi-meson-spifc.c
index f7fe9b1..c7b0399 100644
--- a/drivers/spi/spi-meson-spifc.c
+++ b/drivers/spi/spi-meson-spifc.c
@@ -286,7 +286,6 @@ static int meson_spifc_probe(struct platform_device *pdev)
 {
 	struct spi_master *master;
 	struct meson_spifc *spifc;
-	struct resource *res;
 	void __iomem *base;
 	unsigned int rate;
 	int ret = 0;
@@ -300,8 +299,7 @@ static int meson_spifc_probe(struct platform_device *pdev)
 	spifc = spi_master_get_devdata(master);
 	spifc->dev = &pdev->dev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base = devm_ioremap_resource(spifc->dev, res);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base)) {
 		ret = PTR_ERR(base);
 		goto out_err;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 17/36] spi: mt7621: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (15 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 16/36] spi: spi-meson-spifc: " YueHaibing
@ 2019-09-04 13:58 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 18/36] spi: mxs: " YueHaibing
                   ` (18 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:58 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-mt7621.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-mt7621.c b/drivers/spi/spi-mt7621.c
index ff85982..2c3b7a2 100644
--- a/drivers/spi/spi-mt7621.c
+++ b/drivers/spi/spi-mt7621.c
@@ -327,7 +327,6 @@ static int mt7621_spi_probe(struct platform_device *pdev)
 	struct spi_controller *master;
 	struct mt7621_spi *rs;
 	void __iomem *base;
-	struct resource *r;
 	int status = 0;
 	struct clk *clk;
 	int ret;
@@ -336,8 +335,7 @@ static int mt7621_spi_probe(struct platform_device *pdev)
 	if (!match)
 		return -EINVAL;
 
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base = devm_ioremap_resource(&pdev->dev, r);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 18/36] spi: mxs: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (16 preceding siblings ...)
  2019-09-04 13:58 ` [PATCH -next 17/36] spi: mt7621: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 19/36] spi: npcm: " YueHaibing
                   ` (17 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-mxs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index 7bf53cf..996c1c8 100644
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -532,7 +532,6 @@ static int mxs_spi_probe(struct platform_device *pdev)
 	struct spi_master *master;
 	struct mxs_spi *spi;
 	struct mxs_ssp *ssp;
-	struct resource *iores;
 	struct clk *clk;
 	void __iomem *base;
 	int devid, clk_freq;
@@ -545,12 +544,11 @@ static int mxs_spi_probe(struct platform_device *pdev)
 	 */
 	const int clk_freq_default = 160000000;
 
-	iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	irq_err = platform_get_irq(pdev, 0);
 	if (irq_err < 0)
 		return irq_err;
 
-	base = devm_ioremap_resource(&pdev->dev, iores);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 19/36] spi: npcm: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (17 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 18/36] spi: mxs: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 20/36] spi: nuc900: " YueHaibing
                   ` (16 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-npcm-pspi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-npcm-pspi.c b/drivers/spi/spi-npcm-pspi.c
index 5c56cae..b191d57 100644
--- a/drivers/spi/spi-npcm-pspi.c
+++ b/drivers/spi/spi-npcm-pspi.c
@@ -341,7 +341,6 @@ static int npcm_pspi_probe(struct platform_device *pdev)
 {
 	struct npcm_pspi *priv;
 	struct spi_master *master;
-	struct resource *res;
 	unsigned long clk_hz;
 	struct device_node *np = pdev->dev.of_node;
 	int num_cs, i;
@@ -368,8 +367,7 @@ static int npcm_pspi_probe(struct platform_device *pdev)
 	priv->is_save_param = false;
 	priv->id = pdev->id;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->base = devm_ioremap_resource(&pdev->dev, res);
+	priv->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->base)) {
 		ret = PTR_ERR(priv->base);
 		goto out_master_put;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 20/36] spi: nuc900: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (18 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 19/36] spi: npcm: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 21/36] spi: oc-tiny: " YueHaibing
                   ` (15 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-nuc900.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c
index f65a029e..6140035 100644
--- a/drivers/spi/spi-nuc900.c
+++ b/drivers/spi/spi-nuc900.c
@@ -327,7 +327,6 @@ static int nuc900_spi_probe(struct platform_device *pdev)
 {
 	struct nuc900_spi *hw;
 	struct spi_master *master;
-	struct resource *res;
 	int err = 0;
 
 	master = spi_alloc_master(&pdev->dev, sizeof(struct nuc900_spi));
@@ -358,8 +357,7 @@ static int nuc900_spi_probe(struct platform_device *pdev)
 	hw->bitbang.chipselect     = nuc900_spi_chipsel;
 	hw->bitbang.txrx_bufs      = nuc900_spi_txrx;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hw->regs = devm_ioremap_resource(&pdev->dev, res);
+	hw->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(hw->regs)) {
 		err = PTR_ERR(hw->regs);
 		goto err_pdata;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 21/36] spi: oc-tiny: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (19 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 20/36] spi: nuc900: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 22/36] spi: pic32-sqi: " YueHaibing
                   ` (14 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-oc-tiny.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c
index bbc4ba6..e2331eb 100644
--- a/drivers/spi/spi-oc-tiny.c
+++ b/drivers/spi/spi-oc-tiny.c
@@ -240,7 +240,6 @@ static int tiny_spi_probe(struct platform_device *pdev)
 	struct tiny_spi_platform_data *platp = dev_get_platdata(&pdev->dev);
 	struct tiny_spi *hw;
 	struct spi_master *master;
-	struct resource *res;
 	unsigned int i;
 	int err = -ENODEV;
 
@@ -264,8 +263,7 @@ static int tiny_spi_probe(struct platform_device *pdev)
 	hw->bitbang.txrx_bufs = tiny_spi_txrx_bufs;
 
 	/* find and map our resources */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hw->base = devm_ioremap_resource(&pdev->dev, res);
+	hw->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(hw->base)) {
 		err = PTR_ERR(hw->base);
 		goto exit;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 22/36] spi: pic32-sqi: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (20 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 21/36] spi: oc-tiny: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 23/36] spi: spi-qcom-qspi: " YueHaibing
                   ` (13 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-pic32-sqi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-pic32-sqi.c b/drivers/spi/spi-pic32-sqi.c
index 11b6929..86ad175 100644
--- a/drivers/spi/spi-pic32-sqi.c
+++ b/drivers/spi/spi-pic32-sqi.c
@@ -570,7 +570,6 @@ static int pic32_sqi_probe(struct platform_device *pdev)
 {
 	struct spi_master *master;
 	struct pic32_sqi *sqi;
-	struct resource *reg;
 	int ret;
 
 	master = spi_alloc_master(&pdev->dev, sizeof(*sqi));
@@ -580,8 +579,7 @@ static int pic32_sqi_probe(struct platform_device *pdev)
 	sqi = spi_master_get_devdata(master);
 	sqi->master = master;
 
-	reg = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	sqi->regs = devm_ioremap_resource(&pdev->dev, reg);
+	sqi->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(sqi->regs)) {
 		ret = PTR_ERR(sqi->regs);
 		goto err_free_master;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 23/36] spi: spi-qcom-qspi: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (21 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 22/36] spi: pic32-sqi: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 20:46   ` Bjorn Andersson
  2019-09-04 13:59 ` [PATCH -next 24/36] spi: rb4xx: " YueHaibing
                   ` (12 subsequent siblings)
  35 siblings, 1 reply; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-qcom-qspi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-qcom-qspi.c b/drivers/spi/spi-qcom-qspi.c
index a0ad73f..250fd60 100644
--- a/drivers/spi/spi-qcom-qspi.c
+++ b/drivers/spi/spi-qcom-qspi.c
@@ -424,7 +424,6 @@ static int qcom_qspi_probe(struct platform_device *pdev)
 {
 	int ret;
 	struct device *dev;
-	struct resource *res;
 	struct spi_master *master;
 	struct qcom_qspi *ctrl;
 
@@ -440,8 +439,7 @@ static int qcom_qspi_probe(struct platform_device *pdev)
 
 	spin_lock_init(&ctrl->lock);
 	ctrl->dev = dev;
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	ctrl->base = devm_ioremap_resource(dev, res);
+	ctrl->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(ctrl->base)) {
 		ret = PTR_ERR(ctrl->base);
 		goto exit_probe_master_put;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 24/36] spi: rb4xx: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (22 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 23/36] spi: spi-qcom-qspi: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 25/36] spi: s3c24xx: " YueHaibing
                   ` (11 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-rb4xx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-rb4xx.c b/drivers/spi/spi-rb4xx.c
index 51f03d9..4c9620e 100644
--- a/drivers/spi/spi-rb4xx.c
+++ b/drivers/spi/spi-rb4xx.c
@@ -135,12 +135,10 @@ static int rb4xx_spi_probe(struct platform_device *pdev)
 	struct spi_master *master;
 	struct clk *ahb_clk;
 	struct rb4xx_spi *rbspi;
-	struct resource *r;
 	int err;
 	void __iomem *spi_base;
 
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	spi_base = devm_ioremap_resource(&pdev->dev, r);
+	spi_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(spi_base))
 		return PTR_ERR(spi_base);
 
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 25/36] spi: s3c24xx: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (23 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 24/36] spi: rb4xx: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 14:28   ` Krzysztof Kozlowski
       [not found]   ` <CGME20190905100902eucas1p1ce36a6d769640de92f9ff880728a3d26@eucas1p1.samsung.com>
  2019-09-04 13:59 ` [PATCH -next 26/36] spi: sifive: " YueHaibing
                   ` (10 subsequent siblings)
  35 siblings, 2 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-s3c24xx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
index aea8fd9..2d6e37f 100644
--- a/drivers/spi/spi-s3c24xx.c
+++ b/drivers/spi/spi-s3c24xx.c
@@ -487,7 +487,6 @@ static int s3c24xx_spi_probe(struct platform_device *pdev)
 	struct s3c2410_spi_info *pdata;
 	struct s3c24xx_spi *hw;
 	struct spi_master *master;
-	struct resource *res;
 	int err = 0;
 
 	master = spi_alloc_master(&pdev->dev, sizeof(struct s3c24xx_spi));
@@ -536,8 +535,7 @@ static int s3c24xx_spi_probe(struct platform_device *pdev)
 	dev_dbg(hw->dev, "bitbang at %p\n", &hw->bitbang);
 
 	/* find and map our resources */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	hw->regs = devm_ioremap_resource(&pdev->dev, res);
+	hw->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(hw->regs)) {
 		err = PTR_ERR(hw->regs);
 		goto err_no_pdata;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 26/36] spi: sifive: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (24 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 25/36] spi: s3c24xx: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 22:20   ` Paul Walmsley
  2019-09-04 13:59 ` [PATCH -next 27/36] spi: sirf: " YueHaibing
                   ` (9 subsequent siblings)
  35 siblings, 1 reply; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-sifive.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-sifive.c b/drivers/spi/spi-sifive.c
index 5bf2b57..35254bd 100644
--- a/drivers/spi/spi-sifive.c
+++ b/drivers/spi/spi-sifive.c
@@ -292,7 +292,6 @@ sifive_spi_transfer_one(struct spi_master *master, struct spi_device *device,
 static int sifive_spi_probe(struct platform_device *pdev)
 {
 	struct sifive_spi *spi;
-	struct resource *res;
 	int ret, irq, num_cs;
 	u32 cs_bits, max_bits_per_word;
 	struct spi_master *master;
@@ -307,8 +306,7 @@ static int sifive_spi_probe(struct platform_device *pdev)
 	init_completion(&spi->done);
 	platform_set_drvdata(pdev, master);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	spi->regs = devm_ioremap_resource(&pdev->dev, res);
+	spi->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(spi->regs)) {
 		ret = PTR_ERR(spi->regs);
 		goto put_master;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 27/36] spi: sirf: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (25 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 26/36] spi: sifive: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 28/36] spi: st-ssc4: " YueHaibing
                   ` (8 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-sirf.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c
index 71b882a..e1e6391 100644
--- a/drivers/spi/spi-sirf.c
+++ b/drivers/spi/spi-sirf.c
@@ -1070,7 +1070,6 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 {
 	struct sirfsoc_spi *sspi;
 	struct spi_master *master;
-	struct resource *mem_res;
 	const struct sirf_spi_comp_data *spi_comp_data;
 	int irq;
 	int ret;
@@ -1097,8 +1096,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
 	sspi->fifo_level_chk_mask = (sspi->fifo_size / 4) - 1;
 	sspi->dat_max_frm_len = spi_comp_data->dat_max_frm_len;
 	sspi->fifo_size = spi_comp_data->fifo_size;
-	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	sspi->base = devm_ioremap_resource(&pdev->dev, mem_res);
+	sspi->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(sspi->base)) {
 		ret = PTR_ERR(sspi->base);
 		goto free_master;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 28/36] spi: st-ssc4: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (26 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 27/36] spi: sirf: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 29/36] spi: sun4i: " YueHaibing
                   ` (7 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-st-ssc4.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-st-ssc4.c b/drivers/spi/spi-st-ssc4.c
index 840a6bf..0c24c49 100644
--- a/drivers/spi/spi-st-ssc4.c
+++ b/drivers/spi/spi-st-ssc4.c
@@ -298,7 +298,6 @@ static int spi_st_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct spi_master *master;
-	struct resource *res;
 	struct spi_st *spi_st;
 	int irq, ret = 0;
 	u32 var;
@@ -331,8 +330,7 @@ static int spi_st_probe(struct platform_device *pdev)
 	init_completion(&spi_st->done);
 
 	/* Get resources */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	spi_st->base = devm_ioremap_resource(&pdev->dev, res);
+	spi_st->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(spi_st->base)) {
 		ret = PTR_ERR(spi_st->base);
 		goto clk_disable;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 29/36] spi: sun4i: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (27 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 28/36] spi: st-ssc4: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 30/36] spi: sun6i: " YueHaibing
                   ` (6 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-sun4i.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index 92e5c66..cbfac65 100644
--- a/drivers/spi/spi-sun4i.c
+++ b/drivers/spi/spi-sun4i.c
@@ -428,7 +428,6 @@ static int sun4i_spi_probe(struct platform_device *pdev)
 {
 	struct spi_master *master;
 	struct sun4i_spi *sspi;
-	struct resource	*res;
 	int ret = 0, irq;
 
 	master = spi_alloc_master(&pdev->dev, sizeof(struct sun4i_spi));
@@ -440,8 +439,7 @@ static int sun4i_spi_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, master);
 	sspi = spi_master_get_devdata(master);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	sspi->base_addr = devm_ioremap_resource(&pdev->dev, res);
+	sspi->base_addr = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(sspi->base_addr)) {
 		ret = PTR_ERR(sspi->base_addr);
 		goto err_free_master;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 30/36] spi: sun6i: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (28 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 29/36] spi: sun4i: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 31/36] spi: tegra: " YueHaibing
                   ` (5 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-sun6i.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c
index 1cf3051..ec7967b 100644
--- a/drivers/spi/spi-sun6i.c
+++ b/drivers/spi/spi-sun6i.c
@@ -435,7 +435,6 @@ static int sun6i_spi_probe(struct platform_device *pdev)
 {
 	struct spi_master *master;
 	struct sun6i_spi *sspi;
-	struct resource	*res;
 	int ret = 0, irq;
 
 	master = spi_alloc_master(&pdev->dev, sizeof(struct sun6i_spi));
@@ -447,8 +446,7 @@ static int sun6i_spi_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, master);
 	sspi = spi_master_get_devdata(master);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	sspi->base_addr = devm_ioremap_resource(&pdev->dev, res);
+	sspi->base_addr = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(sspi->base_addr)) {
 		ret = PTR_ERR(sspi->base_addr);
 		goto err_free_master;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 31/36] spi: tegra: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (29 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 30/36] spi: sun6i: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 32/36] spi: uniphier: " YueHaibing
                   ` (4 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-tegra20-sflash.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c
index cd714a4..a841a72 100644
--- a/drivers/spi/spi-tegra20-sflash.c
+++ b/drivers/spi/spi-tegra20-sflash.c
@@ -419,7 +419,6 @@ static int tegra_sflash_probe(struct platform_device *pdev)
 {
 	struct spi_master	*master;
 	struct tegra_sflash_data	*tsd;
-	struct resource		*r;
 	int ret;
 	const struct of_device_id *match;
 
@@ -451,8 +450,7 @@ static int tegra_sflash_probe(struct platform_device *pdev)
 				 &master->max_speed_hz))
 		master->max_speed_hz = 25000000; /* 25MHz */
 
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	tsd->base = devm_ioremap_resource(&pdev->dev, r);
+	tsd->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(tsd->base)) {
 		ret = PTR_ERR(tsd->base);
 		goto exit_free_master;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 32/36] spi: uniphier: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (30 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 31/36] spi: tegra: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 33/36] spi: xlp: " YueHaibing
                   ` (3 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-uniphier.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-uniphier.c b/drivers/spi/spi-uniphier.c
index c1e6f32..e10eeff 100644
--- a/drivers/spi/spi-uniphier.c
+++ b/drivers/spi/spi-uniphier.c
@@ -419,7 +419,6 @@ static int uniphier_spi_probe(struct platform_device *pdev)
 {
 	struct uniphier_spi_priv *priv;
 	struct spi_master *master;
-	struct resource *res;
 	unsigned long clk_rate;
 	int irq;
 	int ret;
@@ -434,8 +433,7 @@ static int uniphier_spi_probe(struct platform_device *pdev)
 	priv->master = master;
 	priv->is_save_param = false;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->base = devm_ioremap_resource(&pdev->dev, res);
+	priv->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->base)) {
 		ret = PTR_ERR(priv->base);
 		goto out_master_put;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 33/36] spi: xlp: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (31 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 32/36] spi: uniphier: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 34/36] spi: zynqmp: " YueHaibing
                   ` (2 subsequent siblings)
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-xlp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-xlp.c b/drivers/spi/spi-xlp.c
index 4eb5bc9..797ac0e 100644
--- a/drivers/spi/spi-xlp.c
+++ b/drivers/spi/spi-xlp.c
@@ -370,7 +370,6 @@ static int xlp_spi_probe(struct platform_device *pdev)
 {
 	struct spi_master *master;
 	struct xlp_spi_priv *xspi;
-	struct resource *res;
 	struct clk *clk;
 	int irq, err;
 
@@ -378,8 +377,7 @@ static int xlp_spi_probe(struct platform_device *pdev)
 	if (!xspi)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	xspi->base = devm_ioremap_resource(&pdev->dev, res);
+	xspi->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(xspi->base))
 		return PTR_ERR(xspi->base);
 
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 34/36] spi: zynqmp: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (32 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 33/36] spi: xlp: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-05  5:19   ` Michal Simek
  2019-09-04 13:59 ` [PATCH -next 35/36] spi: zynq-qspi: " YueHaibing
  2019-09-04 13:59 ` [PATCH -next 36/36] spi: fsl-spi: " YueHaibing
  35 siblings, 1 reply; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-zynqmp-gqspi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index 5e9ea8a..60c4de4 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -1016,7 +1016,6 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
 	int ret = 0;
 	struct spi_master *master;
 	struct zynqmp_qspi *xqspi;
-	struct resource *res;
 	struct device *dev = &pdev->dev;
 
 	eemi_ops = zynqmp_pm_get_eemi_ops();
@@ -1031,8 +1030,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
 	master->dev.of_node = pdev->dev.of_node;
 	platform_set_drvdata(pdev, master);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	xqspi->regs = devm_ioremap_resource(&pdev->dev, res);
+	xqspi->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(xqspi->regs)) {
 		ret = PTR_ERR(xqspi->regs);
 		goto remove_master;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 35/36] spi: zynq-qspi: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (33 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 34/36] spi: zynqmp: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  2019-09-05  5:19   ` Michal Simek
  2019-09-04 13:59 ` [PATCH -next 36/36] spi: fsl-spi: " YueHaibing
  35 siblings, 1 reply; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-zynq-qspi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-zynq-qspi.c b/drivers/spi/spi-zynq-qspi.c
index 4a5326c..5cf6993 100644
--- a/drivers/spi/spi-zynq-qspi.c
+++ b/drivers/spi/spi-zynq-qspi.c
@@ -620,7 +620,6 @@ static int zynq_qspi_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct device_node *np = dev->of_node;
 	struct zynq_qspi *xqspi;
-	struct resource *res;
 	u32 num_cs;
 
 	ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
@@ -630,8 +629,7 @@ static int zynq_qspi_probe(struct platform_device *pdev)
 	xqspi = spi_controller_get_devdata(ctlr);
 	xqspi->dev = dev;
 	platform_set_drvdata(pdev, xqspi);
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	xqspi->regs = devm_ioremap_resource(&pdev->dev, res);
+	xqspi->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(xqspi->regs)) {
 		ret = PTR_ERR(xqspi->regs);
 		goto remove_master;
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH -next 36/36] spi: fsl-spi: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
                   ` (34 preceding siblings ...)
  2019-09-04 13:59 ` [PATCH -next 35/36] spi: zynq-qspi: " YueHaibing
@ 2019-09-04 13:59 ` " YueHaibing
  35 siblings, 0 replies; 54+ messages in thread
From: YueHaibing @ 2019-09-04 13:59 UTC (permalink / raw)
  To: broonie, f.fainelli, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, YueHaibing, linux-arm-msm, openbmc,
	linux-mediatek, linux-kernel, linux-spi,
	bcm-kernel-feedback-list, linux-rpi-kernel, linux-tegra,
	linux-amlogic, linux-riscv, linux-arm-kernel

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/spi/spi-fsl-cpm.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-fsl-cpm.c b/drivers/spi/spi-fsl-cpm.c
index e967ac5..858f054 100644
--- a/drivers/spi/spi-fsl-cpm.c
+++ b/drivers/spi/spi-fsl-cpm.c
@@ -305,12 +305,10 @@ int fsl_spi_cpm_init(struct mpc8xxx_spi *mspi)
 	}
 
 	if (mspi->flags & SPI_CPM1) {
-		struct resource *res;
 		void *pram;
 
-		res = platform_get_resource(to_platform_device(dev),
-					    IORESOURCE_MEM, 1);
-		pram = devm_ioremap_resource(dev, res);
+		pram = devm_platform_ioremap_resource(to_platform_device(dev),
+						      1);
 		if (IS_ERR(pram))
 			mspi->pram = NULL;
 		else
-- 
2.7.4



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 15/36] spi: meson-spicc: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 ` [PATCH -next 15/36] spi: meson-spicc: " YueHaibing
@ 2019-09-04 14:13   ` Neil Armstrong
  0 siblings, 0 replies; 54+ messages in thread
From: Neil Armstrong @ 2019-09-04 14:13 UTC (permalink / raw)
  To: YueHaibing, broonie, f.fainelli, rjui, sbranden, eric, wahrenst,
	shc_work, agross, khilman, matthias.bgg, shawnguo, s.hauer,
	kernel, festevam, linux-imx, avifishman70, tmaimon77,
	tali.perry1, venture, yuenn, benjaminfair, kgene, krzk, andi,
	palmer, paul.walmsley, baohua, mripard, wens, ldewangan,
	thierry.reding, jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, linux-arm-msm, openbmc, linux-kernel,
	linux-spi, linux-mediatek, linux-rpi-kernel, linux-amlogic,
	linux-tegra, bcm-kernel-feedback-list, linux-riscv,
	linux-arm-kernel

On 04/09/2019 15:58, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/spi/spi-meson-spicc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c
> index 7fe4488..f3f1044 100644
> --- a/drivers/spi/spi-meson-spicc.c
> +++ b/drivers/spi/spi-meson-spicc.c
> @@ -503,7 +503,6 @@ static int meson_spicc_probe(struct platform_device *pdev)
>  {
>  	struct spi_master *master;
>  	struct meson_spicc_device *spicc;
> -	struct resource *res;
>  	int ret, irq, rate;
>  
>  	master = spi_alloc_master(&pdev->dev, sizeof(*spicc));
> @@ -517,8 +516,7 @@ static int meson_spicc_probe(struct platform_device *pdev)
>  	spicc->pdev = pdev;
>  	platform_set_drvdata(pdev, spicc);
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	spicc->base = devm_ioremap_resource(&pdev->dev, res);
> +	spicc->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(spicc->base)) {
>  		dev_err(&pdev->dev, "io resource mapping failed\n");
>  		ret = PTR_ERR(spicc->base);
> 

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 16/36] spi: spi-meson-spifc: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 ` [PATCH -next 16/36] spi: spi-meson-spifc: " YueHaibing
@ 2019-09-04 14:14   ` Neil Armstrong
  0 siblings, 0 replies; 54+ messages in thread
From: Neil Armstrong @ 2019-09-04 14:14 UTC (permalink / raw)
  To: YueHaibing, broonie, f.fainelli, rjui, sbranden, eric, wahrenst,
	shc_work, agross, khilman, matthias.bgg, shawnguo, s.hauer,
	kernel, festevam, linux-imx, avifishman70, tmaimon77,
	tali.perry1, venture, yuenn, benjaminfair, kgene, krzk, andi,
	palmer, paul.walmsley, baohua, mripard, wens, ldewangan,
	thierry.reding, jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, linux-arm-msm, openbmc, linux-kernel,
	linux-spi, linux-mediatek, linux-rpi-kernel, linux-amlogic,
	linux-tegra, bcm-kernel-feedback-list, linux-riscv,
	linux-arm-kernel

On 04/09/2019 15:58, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/spi/spi-meson-spifc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-meson-spifc.c b/drivers/spi/spi-meson-spifc.c
> index f7fe9b1..c7b0399 100644
> --- a/drivers/spi/spi-meson-spifc.c
> +++ b/drivers/spi/spi-meson-spifc.c
> @@ -286,7 +286,6 @@ static int meson_spifc_probe(struct platform_device *pdev)
>  {
>  	struct spi_master *master;
>  	struct meson_spifc *spifc;
> -	struct resource *res;
>  	void __iomem *base;
>  	unsigned int rate;
>  	int ret = 0;
> @@ -300,8 +299,7 @@ static int meson_spifc_probe(struct platform_device *pdev)
>  	spifc = spi_master_get_devdata(master);
>  	spifc->dev = &pdev->dev;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	base = devm_ioremap_resource(spifc->dev, res);
> +	base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(base)) {
>  		ret = PTR_ERR(base);
>  		goto out_err;
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 25/36] spi: s3c24xx: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:59 ` [PATCH -next 25/36] spi: s3c24xx: " YueHaibing
@ 2019-09-04 14:28   ` Krzysztof Kozlowski
  2019-09-04 14:39     ` Mark Brown
  2019-09-04 14:42     ` Yuehaibing
       [not found]   ` <CGME20190905100902eucas1p1ce36a6d769640de92f9ff880728a3d26@eucas1p1.samsung.com>
  1 sibling, 2 replies; 54+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-04 14:28 UTC (permalink / raw)
  To: YueHaibing
  Cc: tmaimon77, palmer, tali.perry1, eric, ldewangan, linux-riscv,
	festevam, linux-samsung-soc, f.fainelli, benjaminfair, shc_work,
	khilman, openbmc, michal.simek, jonathanh, yuenn, wens, agross,
	bcm-kernel-feedback-list, linux-imx, linux-arm-msm, linux-tegra,
	Andi Shyti, rjui, s.hauer, mripard, broonie, linux-mediatek,
	linux-rpi-kernel, paul.walmsley, matthias.bgg, linux-amlogic,
	linux-arm-kernel, baohua, sbranden, yamada.masahiro,
	avifishman70, venture, linux-kernel, linux-spi, thierry.reding,
	wahrenst, kernel, kgene, shawnguo

On Wed, 4 Sep 2019 at 16:00, YueHaibing <yuehaibing@huawei.com> wrote:
>
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>

This tag does not look real... First of all where is the report?
Second, it was reported by coccinelle.
Reported-by should be use to give real credits.

Best regards,
Krzysztof

> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/spi/spi-s3c24xx.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
> index aea8fd9..2d6e37f 100644
> --- a/drivers/spi/spi-s3c24xx.c
> +++ b/drivers/spi/spi-s3c24xx.c
> @@ -487,7 +487,6 @@ static int s3c24xx_spi_probe(struct platform_device *pdev)
>         struct s3c2410_spi_info *pdata;
>         struct s3c24xx_spi *hw;
>         struct spi_master *master;
> -       struct resource *res;
>         int err = 0;
>
>         master = spi_alloc_master(&pdev->dev, sizeof(struct s3c24xx_spi));
> @@ -536,8 +535,7 @@ static int s3c24xx_spi_probe(struct platform_device *pdev)
>         dev_dbg(hw->dev, "bitbang at %p\n", &hw->bitbang);
>
>         /* find and map our resources */
> -       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       hw->regs = devm_ioremap_resource(&pdev->dev, res);
> +       hw->regs = devm_platform_ioremap_resource(pdev, 0);
>         if (IS_ERR(hw->regs)) {
>                 err = PTR_ERR(hw->regs);
>                 goto err_no_pdata;
> --
> 2.7.4
>
>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 25/36] spi: s3c24xx: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 14:28   ` Krzysztof Kozlowski
@ 2019-09-04 14:39     ` Mark Brown
  2019-09-04 15:09       ` Krzysztof Kozlowski
  2019-09-04 14:42     ` Yuehaibing
  1 sibling, 1 reply; 54+ messages in thread
From: Mark Brown @ 2019-09-04 14:39 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: tmaimon77, palmer, tali.perry1, eric, ldewangan, linux-riscv,
	festevam, f.fainelli, benjaminfair, shc_work, khilman, openbmc,
	YueHaibing, michal.simek, jonathanh, yuenn, wens, agross,
	bcm-kernel-feedback-list, linux-imx, linux-arm-msm, linux-tegra,
	Andi Shyti, rjui, s.hauer, mripard, linux-samsung-soc,
	linux-mediatek, linux-rpi-kernel, paul.walmsley, matthias.bgg,
	linux-amlogic, linux-arm-kernel, baohua, sbranden,
	yamada.masahiro, avifishman70, venture, linux-kernel, linux-spi,
	thierry.reding, wahrenst, kernel, kgene, shawnguo

[-- Attachment #1.1: Type: text/plain, Size: 578 bytes --]

On Wed, Sep 04, 2019 at 04:28:29PM +0200, Krzysztof Kozlowski wrote:
> On Wed, 4 Sep 2019 at 16:00, YueHaibing <yuehaibing@huawei.com> wrote:

> > Reported-by: Hulk Robot <hulkci@huawei.com>

> This tag does not look real... First of all where is the report?
> Second, it was reported by coccinelle.
> Reported-by should be use to give real credits.

I think it's reasonable, it's giving credit to the automated system
they've got running coccinelle (which they do mention in their commit
logs).  It doesn't really hurt anyone and lets people see their system
is finding stuff.

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

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 25/36] spi: s3c24xx: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 14:28   ` Krzysztof Kozlowski
  2019-09-04 14:39     ` Mark Brown
@ 2019-09-04 14:42     ` Yuehaibing
  2019-09-07 23:38       ` Andi Shyti
  1 sibling, 1 reply; 54+ messages in thread
From: Yuehaibing @ 2019-09-04 14:42 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: tmaimon77, palmer, tali.perry1, eric, ldewangan, linux-riscv,
	festevam, linux-samsung-soc, f.fainelli, benjaminfair, shc_work,
	khilman, openbmc, michal.simek, jonathanh, yuenn, wens, agross,
	bcm-kernel-feedback-list, linux-imx, linux-arm-msm, linux-tegra,
	Andi Shyti, rjui, s.hauer, mripard, broonie, linux-mediatek,
	linux-rpi-kernel, paul.walmsley, matthias.bgg, linux-amlogic,
	linux-arm-kernel, baohua, sbranden, yamada.masahiro,
	avifishman70, venture, linux-kernel, linux-spi, thierry.reding,
	wahrenst, kernel, kgene, shawnguo

On 2019/9/4 22:28, Krzysztof Kozlowski wrote:
> On Wed, 4 Sep 2019 at 16:00, YueHaibing <yuehaibing@huawei.com> wrote:
>>
>> Use devm_platform_ioremap_resource() to simplify the code a bit.
>> This is detected by coccinelle.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
> 
> This tag does not look real... First of all where is the report?

It is our internal CI robot, which is unavailable to external temporarily.

> Second, it was reported by coccinelle.
> Reported-by should be use to give real credits.
> 
> Best regards,
> Krzysztof
> 
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>  drivers/spi/spi-s3c24xx.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
>> index aea8fd9..2d6e37f 100644
>> --- a/drivers/spi/spi-s3c24xx.c
>> +++ b/drivers/spi/spi-s3c24xx.c
>> @@ -487,7 +487,6 @@ static int s3c24xx_spi_probe(struct platform_device *pdev)
>>         struct s3c2410_spi_info *pdata;
>>         struct s3c24xx_spi *hw;
>>         struct spi_master *master;
>> -       struct resource *res;
>>         int err = 0;
>>
>>         master = spi_alloc_master(&pdev->dev, sizeof(struct s3c24xx_spi));
>> @@ -536,8 +535,7 @@ static int s3c24xx_spi_probe(struct platform_device *pdev)
>>         dev_dbg(hw->dev, "bitbang at %p\n", &hw->bitbang);
>>
>>         /* find and map our resources */
>> -       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> -       hw->regs = devm_ioremap_resource(&pdev->dev, res);
>> +       hw->regs = devm_platform_ioremap_resource(pdev, 0);
>>         if (IS_ERR(hw->regs)) {
>>                 err = PTR_ERR(hw->regs);
>>                 goto err_no_pdata;
>> --
>> 2.7.4
>>
>>
> 
> .
> 


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 25/36] spi: s3c24xx: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 14:39     ` Mark Brown
@ 2019-09-04 15:09       ` Krzysztof Kozlowski
  2019-09-04 16:13         ` Mark Brown
  0 siblings, 1 reply; 54+ messages in thread
From: Krzysztof Kozlowski @ 2019-09-04 15:09 UTC (permalink / raw)
  To: Mark Brown
  Cc: tmaimon77, palmer, tali.perry1, eric, ldewangan, linux-riscv,
	festevam, f.fainelli, benjaminfair, shc_work, khilman, openbmc,
	YueHaibing, michal.simek, jonathanh, yuenn, wens, agross,
	bcm-kernel-feedback-list, linux-imx, linux-arm-msm, linux-tegra,
	Andi Shyti, rjui, s.hauer, mripard, linux-samsung-soc,
	linux-mediatek, linux-rpi-kernel, paul.walmsley, matthias.bgg,
	linux-amlogic, linux-arm-kernel, baohua, sbranden,
	yamada.masahiro, avifishman70, venture, linux-kernel, linux-spi,
	thierry.reding, wahrenst, kernel, kgene, shawnguo

On Wed, 4 Sep 2019 at 16:39, Mark Brown <broonie@kernel.org> wrote:
>
> On Wed, Sep 04, 2019 at 04:28:29PM +0200, Krzysztof Kozlowski wrote:
> > On Wed, 4 Sep 2019 at 16:00, YueHaibing <yuehaibing@huawei.com> wrote:
>
> > > Reported-by: Hulk Robot <hulkci@huawei.com>
>
> > This tag does not look real... First of all where is the report?
> > Second, it was reported by coccinelle.
> > Reported-by should be use to give real credits.
>
> I think it's reasonable, it's giving credit to the automated system
> they've got running coccinelle (which they do mention in their commit
> logs).  It doesn't really hurt anyone and lets people see their system
> is finding stuff.

Running internally coccinelle is already credited with commit author.
The credits are coming with "From:" field.
Otherwise for commits I send I could use:
  From: krzk
  ...
  Reported-by: www.krzk.eu
  Signed-off-by: krzk
To me it is ridiculous.

Different thing is that Reported-by is for fixing bugs or issues.
There is no bug here. There is no problem solved except making the
code smaller. That's not what is Reported-by for.

Best regards,
Krzysztof

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 25/36] spi: s3c24xx: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 15:09       ` Krzysztof Kozlowski
@ 2019-09-04 16:13         ` Mark Brown
  0 siblings, 0 replies; 54+ messages in thread
From: Mark Brown @ 2019-09-04 16:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: tmaimon77, palmer, tali.perry1, eric, ldewangan, linux-riscv,
	festevam, f.fainelli, benjaminfair, shc_work, khilman, openbmc,
	YueHaibing, michal.simek, jonathanh, yuenn, wens, agross,
	bcm-kernel-feedback-list, linux-imx, linux-arm-msm, linux-tegra,
	Andi Shyti, rjui, s.hauer, mripard, linux-samsung-soc,
	linux-mediatek, linux-rpi-kernel, paul.walmsley, matthias.bgg,
	linux-amlogic, linux-arm-kernel, baohua, sbranden,
	yamada.masahiro, avifishman70, venture, linux-kernel, linux-spi,
	thierry.reding, wahrenst, kernel, kgene, shawnguo

[-- Attachment #1.1: Type: text/plain, Size: 1366 bytes --]

On Wed, Sep 04, 2019 at 05:09:45PM +0200, Krzysztof Kozlowski wrote:
> On Wed, 4 Sep 2019 at 16:39, Mark Brown <broonie@kernel.org> wrote:

> > I think it's reasonable, it's giving credit to the automated system
> > they've got running coccinelle (which they do mention in their commit
> > logs).  It doesn't really hurt anyone and lets people see their system
> > is finding stuff.

> Running internally coccinelle is already credited with commit author.
> The credits are coming with "From:" field.

I guess if other people look at the same CI and send patches as well
then there's some use tying them all together.

> Otherwise for commits I send I could use:
>   From: krzk
>   ...
>   Reported-by: www.krzk.eu
>   Signed-off-by: krzk
> To me it is ridiculous.

Sure, on the other hand it doesn't really cost anyone anything if you do
that.

> Different thing is that Reported-by is for fixing bugs or issues.
> There is no bug here. There is no problem solved except making the
> code smaller. That's not what is Reported-by for.

That is true, this one isn't fixing any bug but then the line does get a
bit fuzzy all round with things like warnings and coccinelle output -
even just having the warning pop up is noise for people looking at the
output even if there's no concrete problem.  Again I don't see it as
something that's worth getting worked up over.

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

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 13/36] spi: spi-geni-qcom: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 ` [PATCH -next 13/36] spi: spi-geni-qcom: " YueHaibing
@ 2019-09-04 20:44   ` Bjorn Andersson
  0 siblings, 0 replies; 54+ messages in thread
From: Bjorn Andersson @ 2019-09-04 20:44 UTC (permalink / raw)
  To: YueHaibing
  Cc: tmaimon77, palmer, tali.perry1, eric, ldewangan, linux-riscv,
	festevam, linux-samsung-soc, f.fainelli, benjaminfair, shc_work,
	khilman, openbmc, michal.simek, krzk, jonathanh, yuenn, wens,
	agross, bcm-kernel-feedback-list, linux-imx, linux-arm-msm,
	linux-tegra, andi, rjui, s.hauer, mripard, broonie,
	linux-mediatek, linux-rpi-kernel, paul.walmsley, matthias.bgg,
	linux-amlogic, linux-arm-kernel, baohua, sbranden,
	yamada.masahiro, avifishman70, venture, linux-kernel, linux-spi,
	thierry.reding, wahrenst, kernel, kgene, shawnguo

On Wed 04 Sep 06:58 PDT 2019, YueHaibing wrote:

> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/spi/spi-geni-qcom.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
> index 242b6c8..6f3d64a 100644
> --- a/drivers/spi/spi-geni-qcom.c
> +++ b/drivers/spi/spi-geni-qcom.c
> @@ -534,7 +534,6 @@ static int spi_geni_probe(struct platform_device *pdev)
>  	int ret, irq;
>  	struct spi_master *spi;
>  	struct spi_geni_master *mas;
> -	struct resource *res;
>  	void __iomem *base;
>  	struct clk *clk;
>  
> @@ -542,8 +541,7 @@ static int spi_geni_probe(struct platform_device *pdev)
>  	if (irq < 0)
>  		return irq;
>  
> -	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.7.4
> 
> 

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 23/36] spi: spi-qcom-qspi: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:59 ` [PATCH -next 23/36] spi: spi-qcom-qspi: " YueHaibing
@ 2019-09-04 20:46   ` Bjorn Andersson
  0 siblings, 0 replies; 54+ messages in thread
From: Bjorn Andersson @ 2019-09-04 20:46 UTC (permalink / raw)
  To: YueHaibing
  Cc: tmaimon77, palmer, tali.perry1, eric, ldewangan, linux-riscv,
	festevam, linux-samsung-soc, f.fainelli, benjaminfair, shc_work,
	khilman, openbmc, michal.simek, krzk, jonathanh, yuenn, wens,
	agross, bcm-kernel-feedback-list, linux-imx, linux-arm-msm,
	linux-tegra, andi, rjui, s.hauer, mripard, broonie,
	linux-mediatek, linux-rpi-kernel, paul.walmsley, matthias.bgg,
	linux-amlogic, linux-arm-kernel, baohua, sbranden,
	yamada.masahiro, avifishman70, venture, linux-kernel, linux-spi,
	thierry.reding, wahrenst, kernel, kgene, shawnguo

On Wed 04 Sep 06:59 PDT 2019, YueHaibing wrote:

> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/spi/spi-qcom-qspi.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-qcom-qspi.c b/drivers/spi/spi-qcom-qspi.c
> index a0ad73f..250fd60 100644
> --- a/drivers/spi/spi-qcom-qspi.c
> +++ b/drivers/spi/spi-qcom-qspi.c
> @@ -424,7 +424,6 @@ static int qcom_qspi_probe(struct platform_device *pdev)
>  {
>  	int ret;
>  	struct device *dev;
> -	struct resource *res;
>  	struct spi_master *master;
>  	struct qcom_qspi *ctrl;
>  
> @@ -440,8 +439,7 @@ static int qcom_qspi_probe(struct platform_device *pdev)
>  
>  	spin_lock_init(&ctrl->lock);
>  	ctrl->dev = dev;
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	ctrl->base = devm_ioremap_resource(dev, res);
> +	ctrl->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(ctrl->base)) {
>  		ret = PTR_ERR(ctrl->base);
>  		goto exit_probe_master_put;
> -- 
> 2.7.4
> 
> 

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 07/36] spi: bcm63xx-hsspi: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 ` [PATCH -next 07/36] spi: bcm63xx-hsspi: " YueHaibing
@ 2019-09-04 22:10   ` Florian Fainelli
  0 siblings, 0 replies; 54+ messages in thread
From: Florian Fainelli @ 2019-09-04 22:10 UTC (permalink / raw)
  To: YueHaibing, broonie, rjui, sbranden, eric, wahrenst, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, linux-arm-msm, openbmc, linux-mediatek,
	linux-kernel, linux-spi, bcm-kernel-feedback-list,
	linux-rpi-kernel, linux-tegra, linux-amlogic, linux-riscv,
	linux-arm-kernel



On 9/4/2019 6:58 AM, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 26/36] spi: sifive: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:59 ` [PATCH -next 26/36] spi: sifive: " YueHaibing
@ 2019-09-04 22:20   ` Paul Walmsley
  0 siblings, 0 replies; 54+ messages in thread
From: Paul Walmsley @ 2019-09-04 22:20 UTC (permalink / raw)
  To: YueHaibing
  Cc: tmaimon77, palmer, tali.perry1, eric, ldewangan, linux-riscv,
	festevam, linux-samsung-soc, f.fainelli, benjaminfair, shc_work,
	khilman, openbmc, michal.simek, krzk, jonathanh, yuenn, wens,
	agross, bcm-kernel-feedback-list, linux-imx, linux-arm-msm,
	linux-tegra, andi, rjui, s.hauer, mripard, broonie,
	linux-mediatek, linux-rpi-kernel, matthias.bgg, linux-amlogic,
	linux-arm-kernel, baohua, sbranden, yamada.masahiro,
	avifishman70, venture, linux-kernel, linux-spi, thierry.reding,
	wahrenst, kernel, kgene, shawnguo

On Wed, 4 Sep 2019, YueHaibing wrote:

> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: Paul Walmsley <paul.walmsley@sifive.com>


- Paul

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 34/36] spi: zynqmp: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:59 ` [PATCH -next 34/36] spi: zynqmp: " YueHaibing
@ 2019-09-05  5:19   ` Michal Simek
  0 siblings, 0 replies; 54+ messages in thread
From: Michal Simek @ 2019-09-05  5:19 UTC (permalink / raw)
  To: YueHaibing, broonie, f.fainelli, rjui, sbranden, eric, wahrenst,
	shc_work, agross, khilman, matthias.bgg, shawnguo, s.hauer,
	kernel, festevam, linux-imx, avifishman70, tmaimon77,
	tali.perry1, venture, yuenn, benjaminfair, kgene, krzk, andi,
	palmer, paul.walmsley, baohua, mripard, wens, ldewangan,
	thierry.reding, jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, linux-arm-msm, openbmc, linux-mediatek,
	linux-kernel, linux-spi, bcm-kernel-feedback-list,
	linux-rpi-kernel, linux-tegra, linux-amlogic, linux-riscv,
	linux-arm-kernel

On 04. 09. 19 15:59, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/spi/spi-zynqmp-gqspi.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
> index 5e9ea8a..60c4de4 100644
> --- a/drivers/spi/spi-zynqmp-gqspi.c
> +++ b/drivers/spi/spi-zynqmp-gqspi.c
> @@ -1016,7 +1016,6 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
>  	int ret = 0;
>  	struct spi_master *master;
>  	struct zynqmp_qspi *xqspi;
> -	struct resource *res;
>  	struct device *dev = &pdev->dev;
>  
>  	eemi_ops = zynqmp_pm_get_eemi_ops();
> @@ -1031,8 +1030,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
>  	master->dev.of_node = pdev->dev.of_node;
>  	platform_set_drvdata(pdev, master);
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	xqspi->regs = devm_ioremap_resource(&pdev->dev, res);
> +	xqspi->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(xqspi->regs)) {
>  		ret = PTR_ERR(xqspi->regs);
>  		goto remove_master;
> 

Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 35/36] spi: zynq-qspi: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:59 ` [PATCH -next 35/36] spi: zynq-qspi: " YueHaibing
@ 2019-09-05  5:19   ` Michal Simek
  0 siblings, 0 replies; 54+ messages in thread
From: Michal Simek @ 2019-09-05  5:19 UTC (permalink / raw)
  To: YueHaibing, broonie, f.fainelli, rjui, sbranden, eric, wahrenst,
	shc_work, agross, khilman, matthias.bgg, shawnguo, s.hauer,
	kernel, festevam, linux-imx, avifishman70, tmaimon77,
	tali.perry1, venture, yuenn, benjaminfair, kgene, krzk, andi,
	palmer, paul.walmsley, baohua, mripard, wens, ldewangan,
	thierry.reding, jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, linux-arm-msm, openbmc, linux-mediatek,
	linux-kernel, linux-spi, bcm-kernel-feedback-list,
	linux-rpi-kernel, linux-tegra, linux-amlogic, linux-riscv,
	linux-arm-kernel

On 04. 09. 19 15:59, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/spi/spi-zynq-qspi.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-zynq-qspi.c b/drivers/spi/spi-zynq-qspi.c
> index 4a5326c..5cf6993 100644
> --- a/drivers/spi/spi-zynq-qspi.c
> +++ b/drivers/spi/spi-zynq-qspi.c
> @@ -620,7 +620,6 @@ static int zynq_qspi_probe(struct platform_device *pdev)
>  	struct device *dev = &pdev->dev;
>  	struct device_node *np = dev->of_node;
>  	struct zynq_qspi *xqspi;
> -	struct resource *res;
>  	u32 num_cs;
>  
>  	ctlr = spi_alloc_master(&pdev->dev, sizeof(*xqspi));
> @@ -630,8 +629,7 @@ static int zynq_qspi_probe(struct platform_device *pdev)
>  	xqspi = spi_controller_get_devdata(ctlr);
>  	xqspi->dev = dev;
>  	platform_set_drvdata(pdev, xqspi);
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	xqspi->regs = devm_ioremap_resource(&pdev->dev, res);
> +	xqspi->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(xqspi->regs)) {
>  		ret = PTR_ERR(xqspi->regs);
>  		goto remove_master;
> 

Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 25/36] spi: s3c24xx: use devm_platform_ioremap_resource() to simplify code
       [not found]   ` <CGME20190905100902eucas1p1ce36a6d769640de92f9ff880728a3d26@eucas1p1.samsung.com>
@ 2019-09-05 10:08     ` Sylwester Nawrocki
  0 siblings, 0 replies; 54+ messages in thread
From: Sylwester Nawrocki @ 2019-09-05 10:08 UTC (permalink / raw)
  To: YueHaibing, broonie, f.fainelli, rjui, sbranden, eric, wahrenst,
	shc_work, agross, khilman, matthias.bgg, shawnguo, s.hauer,
	kernel, festevam, linux-imx, avifishman70, tmaimon77,
	tali.perry1, venture, yuenn, benjaminfair, kgene, krzk, andi,
	palmer, paul.walmsley, baohua, mripard, wens, ldewangan,
	thierry.reding, jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, linux-arm-msm, openbmc, linux-mediatek,
	linux-kernel, linux-spi, bcm-kernel-feedback-list,
	linux-rpi-kernel, linux-tegra, linux-amlogic, linux-riscv,
	linux-arm-kernel

On 9/4/19 15:59, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 05/36] spi: bcm2835aux: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 ` [PATCH -next 05/36] spi: bcm2835aux: " YueHaibing
@ 2019-09-05 18:38   ` Stefan Wahren
  0 siblings, 0 replies; 54+ messages in thread
From: Stefan Wahren @ 2019-09-05 18:38 UTC (permalink / raw)
  To: YueHaibing, broonie, f.fainelli, rjui, sbranden, eric, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, linux-arm-msm, openbmc, linux-mediatek,
	linux-kernel, linux-spi, bcm-kernel-feedback-list,
	linux-rpi-kernel, linux-tegra, linux-amlogic, linux-riscv,
	linux-arm-kernel

Am 04.09.19 um 15:58 schrieb YueHaibing:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Stefan Wahren <wahrenst@gmx.net>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 06/36] spi: bcm2835: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 13:58 ` [PATCH -next 06/36] spi: bcm2835: " YueHaibing
@ 2019-09-05 18:39   ` Stefan Wahren
  0 siblings, 0 replies; 54+ messages in thread
From: Stefan Wahren @ 2019-09-05 18:39 UTC (permalink / raw)
  To: YueHaibing, broonie, f.fainelli, rjui, sbranden, eric, shc_work,
	agross, khilman, matthias.bgg, shawnguo, s.hauer, kernel,
	festevam, linux-imx, avifishman70, tmaimon77, tali.perry1,
	venture, yuenn, benjaminfair, kgene, krzk, andi, palmer,
	paul.walmsley, baohua, mripard, wens, ldewangan, thierry.reding,
	jonathanh, yamada.masahiro, michal.simek
  Cc: linux-samsung-soc, linux-arm-msm, openbmc, linux-mediatek,
	linux-kernel, linux-spi, bcm-kernel-feedback-list,
	linux-rpi-kernel, linux-tegra, linux-amlogic, linux-riscv,
	linux-arm-kernel

Am 04.09.19 um 15:58 schrieb YueHaibing:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Stefan Wahren <wahrenst@gmx.net>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH -next 25/36] spi: s3c24xx: use devm_platform_ioremap_resource() to simplify code
  2019-09-04 14:42     ` Yuehaibing
@ 2019-09-07 23:38       ` Andi Shyti
  0 siblings, 0 replies; 54+ messages in thread
From: Andi Shyti @ 2019-09-07 23:38 UTC (permalink / raw)
  To: Yuehaibing
  Cc: tmaimon77, palmer, tali.perry1, eric, ldewangan, linux-riscv,
	festevam, linux-samsung-soc, f.fainelli, benjaminfair, shc_work,
	khilman, openbmc, michal.simek, Krzysztof Kozlowski, jonathanh,
	yuenn, wens, agross, bcm-kernel-feedback-list, linux-imx,
	linux-arm-msm, linux-tegra, Andi Shyti, rjui, s.hauer, mripard,
	broonie, linux-mediatek, linux-rpi-kernel, paul.walmsley,
	matthias.bgg, linux-amlogic, linux-arm-kernel, baohua, sbranden,
	yamada.masahiro, avifishman70, venture, linux-kernel, linux-spi,
	thierry.reding, wahrenst, kernel, kgene, shawnguo

Hi Yuehaibing,

> >> Use devm_platform_ioremap_resource() to simplify the code a bit.
> >> This is detected by coccinelle.
> >>
> >> Reported-by: Hulk Robot <hulkci@huawei.com>
> > 
> > This tag does not look real... First of all where is the report?
> 
> It is our internal CI robot, which is unavailable to external temporarily.

Hulk Robot is not a person and not accountable for his report.
If it is your internal CI, please write a sentence stating that
the fix has been made using Huawei internal tools.

Credit must be given to tools as well, but not accounts that will
never answer an e-mail.

Otherwise, the patch would look fine.

Andi

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, back to index

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
2019-09-04 13:58 ` [PATCH -next 01/36] spi: altera: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 02/36] spi: a3700: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 03/36] spi: ath79: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 04/36] spi: spi-axi: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 05/36] spi: bcm2835aux: " YueHaibing
2019-09-05 18:38   ` Stefan Wahren
2019-09-04 13:58 ` [PATCH -next 06/36] spi: bcm2835: " YueHaibing
2019-09-05 18:39   ` Stefan Wahren
2019-09-04 13:58 ` [PATCH -next 07/36] spi: bcm63xx-hsspi: " YueHaibing
2019-09-04 22:10   ` Florian Fainelli
2019-09-04 13:58 ` [PATCH -next 08/36] spi: cadence: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 09/36] spi: octeon: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 10/36] spi: clps711x: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 11/36] spi: coldfire-qspi: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 12/36] spi: dw-mmio: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 13/36] spi: spi-geni-qcom: " YueHaibing
2019-09-04 20:44   ` Bjorn Andersson
2019-09-04 13:58 ` [PATCH -next 14/36] spi: lp-8841: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 15/36] spi: meson-spicc: " YueHaibing
2019-09-04 14:13   ` Neil Armstrong
2019-09-04 13:58 ` [PATCH -next 16/36] spi: spi-meson-spifc: " YueHaibing
2019-09-04 14:14   ` Neil Armstrong
2019-09-04 13:58 ` [PATCH -next 17/36] spi: mt7621: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 18/36] spi: mxs: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 19/36] spi: npcm: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 20/36] spi: nuc900: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 21/36] spi: oc-tiny: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 22/36] spi: pic32-sqi: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 23/36] spi: spi-qcom-qspi: " YueHaibing
2019-09-04 20:46   ` Bjorn Andersson
2019-09-04 13:59 ` [PATCH -next 24/36] spi: rb4xx: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 25/36] spi: s3c24xx: " YueHaibing
2019-09-04 14:28   ` Krzysztof Kozlowski
2019-09-04 14:39     ` Mark Brown
2019-09-04 15:09       ` Krzysztof Kozlowski
2019-09-04 16:13         ` Mark Brown
2019-09-04 14:42     ` Yuehaibing
2019-09-07 23:38       ` Andi Shyti
     [not found]   ` <CGME20190905100902eucas1p1ce36a6d769640de92f9ff880728a3d26@eucas1p1.samsung.com>
2019-09-05 10:08     ` Sylwester Nawrocki
2019-09-04 13:59 ` [PATCH -next 26/36] spi: sifive: " YueHaibing
2019-09-04 22:20   ` Paul Walmsley
2019-09-04 13:59 ` [PATCH -next 27/36] spi: sirf: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 28/36] spi: st-ssc4: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 29/36] spi: sun4i: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 30/36] spi: sun6i: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 31/36] spi: tegra: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 32/36] spi: uniphier: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 33/36] spi: xlp: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 34/36] spi: zynqmp: " YueHaibing
2019-09-05  5:19   ` Michal Simek
2019-09-04 13:59 ` [PATCH -next 35/36] spi: zynq-qspi: " YueHaibing
2019-09-05  5:19   ` Michal Simek
2019-09-04 13:59 ` [PATCH -next 36/36] spi: fsl-spi: " YueHaibing

Linux-Amlogic Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-amlogic/0 linux-amlogic/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-amlogic linux-amlogic/ https://lore.kernel.org/linux-amlogic \
		linux-amlogic@lists.infradead.org linux-amlogic@archiver.kernel.org
	public-inbox-index linux-amlogic

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-amlogic


AGPL code for this site: git clone https://public-inbox.org/ public-inbox