linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/27] arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-23 18:02   ` John Crispin
  2013-07-23 18:01 ` [PATCH 02/27] drivers/amba: " Wolfram Sang
                   ` (25 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Ralf Baechle, linux-mips

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 arch/mips/lantiq/xway/dma.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c
index 08f7ebd..78a91fa 100644
--- a/arch/mips/lantiq/xway/dma.c
+++ b/arch/mips/lantiq/xway/dma.c
@@ -220,10 +220,6 @@ ltq_dma_init(struct platform_device *pdev)
 	int i;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		panic("Failed to get dma resource");
-
-	/* remap dma register range */
 	ltq_dma_membase = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(ltq_dma_membase))
 		panic("Failed to remap dma resource");
-- 
1.7.10.4


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

* [PATCH 02/27] drivers/amba: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
  2013-07-23 18:01 ` [PATCH 01/27] arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-24  1:34   ` Stephen Warren
  2013-07-23 18:01 ` [PATCH 03/27] drivers/cpuidle: " Wolfram Sang
                   ` (24 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Russell King, Stephen Warren, linux-tegra

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/amba/tegra-ahb.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/amba/tegra-ahb.c b/drivers/amba/tegra-ahb.c
index 1f44e56c..558a239 100644
--- a/drivers/amba/tegra-ahb.c
+++ b/drivers/amba/tegra-ahb.c
@@ -256,8 +256,6 @@ static int tegra_ahb_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
 	ahb->regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(ahb->regs))
 		return PTR_ERR(ahb->regs);
-- 
1.7.10.4


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

* [PATCH 03/27] drivers/cpuidle: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
  2013-07-23 18:01 ` [PATCH 01/27] arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource Wolfram Sang
  2013-07-23 18:01 ` [PATCH 02/27] drivers/amba: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-23 21:26   ` Rafael J. Wysocki
  2013-07-23 18:01 ` [PATCH 04/27] drivers/dma: " Wolfram Sang
                   ` (23 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Rafael J. Wysocki, Daniel Lezcano, linux-pm

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/cpuidle/cpuidle-kirkwood.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/cpuidle/cpuidle-kirkwood.c b/drivers/cpuidle/cpuidle-kirkwood.c
index 521b0a7..2237135 100644
--- a/drivers/cpuidle/cpuidle-kirkwood.c
+++ b/drivers/cpuidle/cpuidle-kirkwood.c
@@ -60,9 +60,6 @@ static int kirkwood_cpuidle_probe(struct platform_device *pdev)
 	struct resource *res;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL)
-		return -EINVAL;
-
 	ddr_operation_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(ddr_operation_base))
 		return PTR_ERR(ddr_operation_base);
-- 
1.7.10.4


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

* [PATCH 04/27] drivers/dma: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (2 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 03/27] drivers/cpuidle: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-08-19  8:58   ` Vinod Koul
  2013-07-23 18:01 ` [PATCH 05/27] drivers/gpu/host1x/drm: " Wolfram Sang
                   ` (22 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Vinod Koul, Dan Williams

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/dma/mmp_pdma.c |    3 ---
 drivers/dma/mmp_tdma.c |    3 ---
 2 files changed, 6 deletions(-)

diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
index c26699f..7eba967 100644
--- a/drivers/dma/mmp_pdma.c
+++ b/drivers/dma/mmp_pdma.c
@@ -778,9 +778,6 @@ static int mmp_pdma_probe(struct platform_device *op)
 	pdev->dev = &op->dev;
 
 	iores = platform_get_resource(op, IORESOURCE_MEM, 0);
-	if (!iores)
-		return -EINVAL;
-
 	pdev->base = devm_ioremap_resource(pdev->dev, iores);
 	if (IS_ERR(pdev->base))
 		return PTR_ERR(pdev->base);
diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index 9b93665..1f1885a 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -549,9 +549,6 @@ static int mmp_tdma_probe(struct platform_device *pdev)
 	}
 
 	iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!iores)
-		return -EINVAL;
-
 	tdev->base = devm_ioremap_resource(&pdev->dev, iores);
 	if (IS_ERR(tdev->base))
 		return PTR_ERR(tdev->base);
-- 
1.7.10.4


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

* [PATCH 05/27] drivers/gpu/host1x/drm: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (3 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 04/27] drivers/dma: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-08-01 10:20   ` Terje Bergström
  2013-07-23 18:01 ` [PATCH 06/27] drivers/i2c/busses: " Wolfram Sang
                   ` (21 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Thierry Reding, Terje Bergström, dri-devel,
	linux-tegra

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/gpu/host1x/drm/hdmi.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/host1x/drm/hdmi.c b/drivers/gpu/host1x/drm/hdmi.c
index 01097da..9ffece6 100644
--- a/drivers/gpu/host1x/drm/hdmi.c
+++ b/drivers/gpu/host1x/drm/hdmi.c
@@ -1248,9 +1248,6 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
 		return err;
 
 	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!regs)
-		return -ENXIO;
-
 	hdmi->regs = devm_ioremap_resource(&pdev->dev, regs);
 	if (IS_ERR(hdmi->regs))
 		return PTR_ERR(hdmi->regs);
-- 
1.7.10.4


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

* [PATCH 06/27] drivers/i2c/busses: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (4 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 05/27] drivers/gpu/host1x/drm: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-29 16:39   ` Linus Walleij
  2013-08-07 15:38   ` Wolfram Sang
  2013-07-23 18:01 ` [PATCH 07/27] drivers/input/serio: " Wolfram Sang
                   ` (20 subsequent siblings)
  26 siblings, 2 replies; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Linus Walleij, linux-arm-kernel, linux-i2c

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/i2c/busses/i2c-stu300.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c
index d1a6b20..ded21cf 100644
--- a/drivers/i2c/busses/i2c-stu300.c
+++ b/drivers/i2c/busses/i2c-stu300.c
@@ -884,9 +884,6 @@ stu300_probe(struct platform_device *pdev)
 
 	dev->pdev = pdev;
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENOENT;
-
 	dev->virtbase = devm_ioremap_resource(&pdev->dev, res);
 	dev_dbg(&pdev->dev, "initialize bus device I2C%d on virtual "
 		"base %p\n", bus_nr, dev->virtbase);
-- 
1.7.10.4


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

* [PATCH 07/27] drivers/input/serio: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (5 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 06/27] drivers/i2c/busses: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-23 18:01 ` [PATCH 08/27] drivers/iommu: " Wolfram Sang
                   ` (19 subsequent siblings)
  26 siblings, 0 replies; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Dmitry Torokhov, linux-input

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/input/serio/olpc_apsp.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/input/serio/olpc_apsp.c b/drivers/input/serio/olpc_apsp.c
index 818aa46..51b1d40 100644
--- a/drivers/input/serio/olpc_apsp.c
+++ b/drivers/input/serio/olpc_apsp.c
@@ -183,9 +183,6 @@ static int olpc_apsp_probe(struct platform_device *pdev)
 
 	np = pdev->dev.of_node;
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENOENT;
-
 	priv->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(priv->base)) {
 		dev_err(&pdev->dev, "Failed to map WTM registers\n");
-- 
1.7.10.4


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

* [PATCH 08/27] drivers/iommu: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (6 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 07/27] drivers/input/serio: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-24  1:30   ` Stephen Warren
  2013-07-23 18:01 ` [PATCH 09/27] drivers/media/platform: " Wolfram Sang
                   ` (18 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Stephen Warren, linux-tegra

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/iommu/tegra-smmu.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index f6f120e..e066560 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -1177,8 +1177,6 @@ static int tegra_smmu_probe(struct platform_device *pdev)
 		struct resource *res;
 
 		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
-		if (!res)
-			return -ENODEV;
 		smmu->regs[i] = devm_ioremap_resource(&pdev->dev, res);
 		if (IS_ERR(smmu->regs[i]))
 			return PTR_ERR(smmu->regs[i]);
-- 
1.7.10.4


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

* [PATCH 09/27] drivers/media/platform: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (7 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 08/27] drivers/iommu: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-23 18:01 ` [PATCH 10/27] drivers/memory: " Wolfram Sang
                   ` (17 subsequent siblings)
  26 siblings, 0 replies; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Mauro Carvalho Chehab, linux-media

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/media/platform/coda.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index df4ada88..6ea4717 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -2032,11 +2032,6 @@ static int coda_probe(struct platform_device *pdev)
 
 	/* Get  memory for physical registers */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "failed to get memory region resource\n");
-		return -ENOENT;
-	}
-
 	dev->regs_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(dev->regs_base))
 		return PTR_ERR(dev->regs_base);
-- 
1.7.10.4


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

* [PATCH 10/27] drivers/memory: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (8 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 09/27] drivers/media/platform: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-23 18:25   ` Joe Perches
                     ` (2 more replies)
  2013-07-23 18:01 ` [PATCH 11/27] drivers/mtd/nand: " Wolfram Sang
                   ` (16 subsequent siblings)
  26 siblings, 3 replies; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Stephen Warren, linux-tegra

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/memory/tegra20-mc.c |    2 --
 drivers/memory/tegra30-mc.c |    2 --
 2 files changed, 4 deletions(-)

diff --git a/drivers/memory/tegra20-mc.c b/drivers/memory/tegra20-mc.c
index 0548eea..7cd82b8 100644
--- a/drivers/memory/tegra20-mc.c
+++ b/drivers/memory/tegra20-mc.c
@@ -218,8 +218,6 @@ static int tegra20_mc_probe(struct platform_device *pdev)
 		struct resource *res;
 
 		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
-		if (!res)
-			return -ENODEV;
 		mc->regs[i] = devm_ioremap_resource(&pdev->dev, res);
 		if (IS_ERR(mc->regs[i]))
 			return PTR_ERR(mc->regs[i]);
diff --git a/drivers/memory/tegra30-mc.c b/drivers/memory/tegra30-mc.c
index 58d2979..ef79345 100644
--- a/drivers/memory/tegra30-mc.c
+++ b/drivers/memory/tegra30-mc.c
@@ -340,8 +340,6 @@ static int tegra30_mc_probe(struct platform_device *pdev)
 		struct resource *res;
 
 		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
-		if (!res)
-			return -ENODEV;
 		mc->regs[i] = devm_ioremap_resource(&pdev->dev, res);
 		if (IS_ERR(mc->regs[i]))
 			return PTR_ERR(mc->regs[i]);
-- 
1.7.10.4


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

* [PATCH 11/27] drivers/mtd/nand: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (9 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 10/27] drivers/memory: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-23 18:09   ` Fabio Estevam
  2013-07-23 18:01 ` [PATCH 12/27] drivers/net/ethernet/stmicro/stmmac: " Wolfram Sang
                   ` (15 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, David Woodhouse, linux-mtd

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/mtd/nand/mxc_nand.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 07e5784..d1feb97 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1446,8 +1446,6 @@ static int mxcnd_probe(struct platform_device *pdev)
 
 	if (host->devtype_data->needs_ip) {
 		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-		if (!res)
-			return -ENODEV;
 		host->regs_ip = devm_ioremap_resource(&pdev->dev, res);
 		if (IS_ERR(host->regs_ip))
 			return PTR_ERR(host->regs_ip);
@@ -1457,9 +1455,6 @@ static int mxcnd_probe(struct platform_device *pdev)
 		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	}
 
-	if (!res)
-		return -ENODEV;
-
 	host->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(host->base))
 		return PTR_ERR(host->base);
-- 
1.7.10.4


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

* [PATCH 12/27] drivers/net/ethernet/stmicro/stmmac: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (10 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 11/27] drivers/mtd/nand: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-25  6:59   ` David Miller
  2013-07-23 18:01 ` [PATCH 13/27] drivers/pci/host: " Wolfram Sang
                   ` (14 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Giuseppe Cavallaro, netdev

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 03de76c..da8be6e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -109,9 +109,6 @@ static int stmmac_pltfr_probe(struct platform_device *pdev)
 	const char *mac = NULL;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-
 	addr = devm_ioremap_resource(dev, res);
 	if (IS_ERR(addr))
 		return PTR_ERR(addr);
-- 
1.7.10.4


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

* [PATCH 13/27] drivers/pci/host: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (11 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 12/27] drivers/net/ethernet/stmicro/stmmac: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-23 18:12   ` Bjorn Helgaas
  2013-07-23 18:01 ` [PATCH 14/27] drivers/pinctrl: " Wolfram Sang
                   ` (13 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Bjorn Helgaas, linux-pci

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/pci/host/pcie-designware.c |   12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 26bdbda..f0ba6ef 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -817,28 +817,16 @@ static int add_pcie_port(struct pcie_port *pp, struct platform_device *pdev)
 	int ret;
 
 	elbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!elbi_base) {
-		dev_err(&pdev->dev, "couldn't get elbi base resource\n");
-		return -EINVAL;
-	}
 	pp->elbi_base = devm_ioremap_resource(&pdev->dev, elbi_base);
 	if (IS_ERR(pp->elbi_base))
 		return PTR_ERR(pp->elbi_base);
 
 	phy_base = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	if (!phy_base) {
-		dev_err(&pdev->dev, "couldn't get phy base resource\n");
-		return -EINVAL;
-	}
 	pp->phy_base = devm_ioremap_resource(&pdev->dev, phy_base);
 	if (IS_ERR(pp->phy_base))
 		return PTR_ERR(pp->phy_base);
 
 	purple_base = platform_get_resource(pdev, IORESOURCE_MEM, 2);
-	if (!purple_base) {
-		dev_err(&pdev->dev, "couldn't get purple base resource\n");
-		return -EINVAL;
-	}
 	pp->purple_base = devm_ioremap_resource(&pdev->dev, purple_base);
 	if (IS_ERR(pp->purple_base))
 		return PTR_ERR(pp->purple_base);
-- 
1.7.10.4


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

* [PATCH 14/27] drivers/pinctrl: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (12 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 13/27] drivers/pci/host: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-08-07 18:14   ` Linus Walleij
  2013-07-23 18:01 ` [PATCH 15/27] drivers/pwm: " Wolfram Sang
                   ` (12 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Linus Walleij

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/pinctrl/pinctrl-imx.c      |    3 ---
 drivers/pinctrl/pinctrl-rockchip.c |    5 -----
 drivers/pinctrl/pinctrl-u300.c     |    3 ---
 3 files changed, 11 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c
index 57a4eb0..dea739a 100644
--- a/drivers/pinctrl/pinctrl-imx.c
+++ b/drivers/pinctrl/pinctrl-imx.c
@@ -580,9 +580,6 @@ int imx_pinctrl_probe(struct platform_device *pdev,
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENOENT;
-
 	ipctl->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(ipctl->base))
 		return PTR_ERR(ipctl->base);
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 1eb5a2e..6c88837 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -1270,11 +1270,6 @@ static int rockchip_pinctrl_probe(struct platform_device *pdev)
 	info->dev = dev;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(dev, "cannot find IO resource\n");
-		return -ENOENT;
-	}
-
 	info->reg_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(info->reg_base))
 		return PTR_ERR(info->reg_base);
diff --git a/drivers/pinctrl/pinctrl-u300.c b/drivers/pinctrl/pinctrl-u300.c
index 46a152d..6fbdc06 100644
--- a/drivers/pinctrl/pinctrl-u300.c
+++ b/drivers/pinctrl/pinctrl-u300.c
@@ -1075,9 +1075,6 @@ static int u300_pmx_probe(struct platform_device *pdev)
 	upmx->dev = &pdev->dev;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENOENT;
-
 	upmx->virtbase = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(upmx->virtbase))
 		return PTR_ERR(upmx->virtbase);
-- 
1.7.10.4


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

* [PATCH 15/27] drivers/pwm: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (13 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 14/27] drivers/pinctrl: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-08-14  9:43   ` Thierry Reding
  2013-07-23 18:01 ` [PATCH 16/27] drivers/scsi/ufs: " Wolfram Sang
                   ` (11 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Thierry Reding, linux-pwm

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/pwm/pwm-lpc32xx.c     |    3 ---
 drivers/pwm/pwm-renesas-tpu.c |    5 -----
 2 files changed, 8 deletions(-)

diff --git a/drivers/pwm/pwm-lpc32xx.c b/drivers/pwm/pwm-lpc32xx.c
index efb6c7b..efac99e0 100644
--- a/drivers/pwm/pwm-lpc32xx.c
+++ b/drivers/pwm/pwm-lpc32xx.c
@@ -124,9 +124,6 @@ static int lpc32xx_pwm_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -EINVAL;
-
 	lpc32xx->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(lpc32xx->base))
 		return PTR_ERR(lpc32xx->base);
diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c
index 2600892..444d589 100644
--- a/drivers/pwm/pwm-renesas-tpu.c
+++ b/drivers/pwm/pwm-renesas-tpu.c
@@ -404,11 +404,6 @@ static int tpu_probe(struct platform_device *pdev)
 
 	/* Map memory, get clock and pin control. */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "failed to get I/O memory\n");
-		return -ENXIO;
-	}
-
 	tpu->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(tpu->base))
 		return PTR_ERR(tpu->base);
-- 
1.7.10.4


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

* [PATCH 16/27] drivers/scsi/ufs: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (14 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 15/27] drivers/pwm: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-23 18:01 ` [PATCH 17/27] drivers/spi: " Wolfram Sang
                   ` (10 subsequent siblings)
  26 siblings, 0 replies; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Vinayak Holikatti, Santosh Y, James E.J. Bottomley,
	linux-scsi

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/scsi/ufs/ufshcd-pltfrm.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index c42db40..8367c39 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -102,12 +102,6 @@ static int ufshcd_pltfrm_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 
 	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!mem_res) {
-		dev_err(dev, "Memory resource not available\n");
-		err = -ENODEV;
-		goto out;
-	}
-
 	mmio_base = devm_ioremap_resource(dev, mem_res);
 	if (IS_ERR(mmio_base)) {
 		dev_err(dev, "memory map failed\n");
-- 
1.7.10.4


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

* [PATCH 17/27] drivers/spi: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (15 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 16/27] drivers/scsi/ufs: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-24 14:29   ` Mark Brown
  2013-07-23 18:01 ` [PATCH 18/27] drivers/staging/imx-drm: " Wolfram Sang
                   ` (9 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Stephen Warren, Mark Brown, Grant Likely,
	linux-rpi-kernel, linux-spi

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/spi/spi-bcm2835.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c
index a4185e4..7604c52 100644
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -325,12 +325,6 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
 	init_completion(&bs->done);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "could not get memory resource\n");
-		err = -ENODEV;
-		goto out_master_put;
-	}
-
 	bs->regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(bs->regs)) {
 		err = PTR_ERR(bs->regs);
-- 
1.7.10.4


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

* [PATCH 18/27] drivers/staging/imx-drm: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (16 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 17/27] drivers/spi: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-23 18:01 ` [PATCH 19/27] drivers/usb/phy: " Wolfram Sang
                   ` (8 subsequent siblings)
  26 siblings, 0 replies; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Greg Kroah-Hartman, devel

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/staging/imx-drm/imx-tve.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c
index a56797d..8232cea 100644
--- a/drivers/staging/imx-drm/imx-tve.c
+++ b/drivers/staging/imx-drm/imx-tve.c
@@ -623,11 +623,6 @@ static int imx_tve_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "failed to get memory region\n");
-		return -ENOENT;
-	}
-
 	base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
-- 
1.7.10.4


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

* [PATCH 19/27] drivers/usb/phy: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (17 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 18/27] drivers/staging/imx-drm: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-23 18:01 ` [PATCH 20/27] drivers/watchdog: " Wolfram Sang
                   ` (7 subsequent siblings)
  26 siblings, 0 replies; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Felipe Balbi, Greg Kroah-Hartman, linux-usb

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/usb/phy/phy-rcar-usb.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/usb/phy/phy-rcar-usb.c b/drivers/usb/phy/phy-rcar-usb.c
index ae90940..deb7f97 100644
--- a/drivers/usb/phy/phy-rcar-usb.c
+++ b/drivers/usb/phy/phy-rcar-usb.c
@@ -190,11 +190,6 @@ static int rcar_usb_phy_probe(struct platform_device *pdev)
 	}
 
 	res0 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res0) {
-		dev_err(dev, "Not enough platform resources\n");
-		return -EINVAL;
-	}
-
 	reg0 = devm_ioremap_resource(dev, res0);
 	if (IS_ERR(reg0))
 		return PTR_ERR(reg0);
-- 
1.7.10.4


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

* [PATCH 20/27] drivers/watchdog: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (18 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 19/27] drivers/usb/phy: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-23 18:01 ` [PATCH 21/27] sound/soc/au1x: " Wolfram Sang
                   ` (6 subsequent siblings)
  26 siblings, 0 replies; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Wan ZongShun, Wim Van Sebroeck, linux-arm-kernel,
	linux-watchdog

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/watchdog/nuc900_wdt.c |    5 -----
 drivers/watchdog/ts72xx_wdt.c |   10 ----------
 2 files changed, 15 deletions(-)

diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c
index e2b6d2c..b15b6ef 100644
--- a/drivers/watchdog/nuc900_wdt.c
+++ b/drivers/watchdog/nuc900_wdt.c
@@ -256,11 +256,6 @@ static int nuc900wdt_probe(struct platform_device *pdev)
 	spin_lock_init(&nuc900_wdt->wdt_lock);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "no memory resource specified\n");
-		return -ENOENT;
-	}
-
 	nuc900_wdt->wdt_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(nuc900_wdt->wdt_base))
 		return PTR_ERR(nuc900_wdt->wdt_base);
diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c
index 4da59b4..42913f1 100644
--- a/drivers/watchdog/ts72xx_wdt.c
+++ b/drivers/watchdog/ts72xx_wdt.c
@@ -403,21 +403,11 @@ static int ts72xx_wdt_probe(struct platform_device *pdev)
 	}
 
 	r1 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r1) {
-		dev_err(&pdev->dev, "failed to get memory resource\n");
-		return -ENODEV;
-	}
-
 	wdt->control_reg = devm_ioremap_resource(&pdev->dev, r1);
 	if (IS_ERR(wdt->control_reg))
 		return PTR_ERR(wdt->control_reg);
 
 	r2 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	if (!r2) {
-		dev_err(&pdev->dev, "failed to get memory resource\n");
-		return -ENODEV;
-	}
-
 	wdt->feed_reg = devm_ioremap_resource(&pdev->dev, r2);
 	if (IS_ERR(wdt->feed_reg))
 		return PTR_ERR(wdt->feed_reg);
-- 
1.7.10.4


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

* [PATCH 21/27] sound/soc/au1x: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (19 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 20/27] drivers/watchdog: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-24 14:31   ` Mark Brown
  2013-07-23 18:01 ` [PATCH 22/27] sound/soc/cirrus: " Wolfram Sang
                   ` (5 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 sound/soc/au1x/psc-ac97.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c
index a822ab8..986dcec 100644
--- a/sound/soc/au1x/psc-ac97.c
+++ b/sound/soc/au1x/psc-ac97.c
@@ -379,9 +379,6 @@ static int au1xpsc_ac97_drvprobe(struct platform_device *pdev)
 	mutex_init(&wd->lock);
 
 	iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!iores)
-		return -ENODEV;
-
 	wd->mmio = devm_ioremap_resource(&pdev->dev, iores);
 	if (IS_ERR(wd->mmio))
 		return PTR_ERR(wd->mmio);
-- 
1.7.10.4


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

* [PATCH 22/27] sound/soc/cirrus: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (20 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 21/27] sound/soc/au1x: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-24 14:33   ` Mark Brown
  2013-07-23 18:01 ` [PATCH 23/27] sound/soc/nuc900: " Wolfram Sang
                   ` (4 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 sound/soc/cirrus/ep93xx-ac97.c |    3 ---
 sound/soc/cirrus/ep93xx-i2s.c  |    3 ---
 2 files changed, 6 deletions(-)

diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c
index ac73c60..2a5cdae 100644
--- a/sound/soc/cirrus/ep93xx-ac97.c
+++ b/sound/soc/cirrus/ep93xx-ac97.c
@@ -363,9 +363,6 @@ static int ep93xx_ac97_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-
 	info->regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(info->regs))
 		return PTR_ERR(info->regs);
diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c
index 17ad70b..f23f331 100644
--- a/sound/soc/cirrus/ep93xx-i2s.c
+++ b/sound/soc/cirrus/ep93xx-i2s.c
@@ -376,9 +376,6 @@ static int ep93xx_i2s_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-
 	info->regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(info->regs))
 		return PTR_ERR(info->regs);
-- 
1.7.10.4


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

* [PATCH 23/27] sound/soc/nuc900: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (21 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 22/27] sound/soc/cirrus: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-24 14:34   ` Mark Brown
  2013-07-23 18:01 ` [PATCH 24/27] sound/soc/pxa: " Wolfram Sang
                   ` (3 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 sound/soc/nuc900/nuc900-ac97.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
index f4c2417..8987bf9 100644
--- a/sound/soc/nuc900/nuc900-ac97.c
+++ b/sound/soc/nuc900/nuc900-ac97.c
@@ -333,9 +333,6 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev)
 	spin_lock_init(&nuc900_audio->lock);
 
 	nuc900_audio->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!nuc900_audio->res)
-		return ret;
-
 	nuc900_audio->mmio = devm_ioremap_resource(&pdev->dev,
 						   nuc900_audio->res);
 	if (IS_ERR(nuc900_audio->mmio))
-- 
1.7.10.4


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

* [PATCH 24/27] sound/soc/pxa: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (22 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 23/27] sound/soc/nuc900: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-24 14:35   ` Mark Brown
  2013-07-23 18:01 ` [PATCH 25/27] sound/soc/tegra: " Wolfram Sang
                   ` (2 subsequent siblings)
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Eric Miao, Russell King, Haojian Zhuang,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	linux-arm-kernel, alsa-devel

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 sound/soc/pxa/mmp-sspa.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c
index 62142ce..1605934 100644
--- a/sound/soc/pxa/mmp-sspa.c
+++ b/sound/soc/pxa/mmp-sspa.c
@@ -430,9 +430,6 @@ static int asoc_mmp_sspa_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL)
-		return -ENOMEM;
-
 	priv->sspa->mmio_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(priv->sspa->mmio_base))
 		return PTR_ERR(priv->sspa->mmio_base);
-- 
1.7.10.4


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

* [PATCH 25/27] sound/soc/tegra: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (23 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 24/27] sound/soc/pxa: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-24 14:37   ` Mark Brown
  2013-07-23 18:01 ` [PATCH 26/27] sound/soc/txx9: " Wolfram Sang
  2013-07-23 18:02 ` [PATCH 27/27] thermal: ti-bandgap: cleanup resource allocation Wolfram Sang
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Stephen Warren, alsa-devel, linux-tegra

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 sound/soc/tegra/tegra20_ac97.c |    7 -------
 1 file changed, 7 deletions(-)

diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
index e58233f..ef3d0e0 100644
--- a/sound/soc/tegra/tegra20_ac97.c
+++ b/sound/soc/tegra/tegra20_ac97.c
@@ -334,12 +334,6 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
 	}
 
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!mem) {
-		dev_err(&pdev->dev, "No memory resource\n");
-		ret = -ENODEV;
-		goto err_clk_put;
-	}
-
 	regs = devm_ioremap_resource(&pdev->dev, mem);
 	if (IS_ERR(regs)) {
 		ret = PTR_ERR(regs);
@@ -432,7 +426,6 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
 
 	return 0;
 
-err_unregister_pcm:
 	tegra_pcm_platform_unregister(&pdev->dev);
 err_unregister_component:
 	snd_soc_unregister_component(&pdev->dev);
-- 
1.7.10.4


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

* [PATCH 26/27] sound/soc/txx9: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (24 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 25/27] sound/soc/tegra: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-24 14:37   ` Mark Brown
  2013-07-23 18:02 ` [PATCH 27/27] thermal: ti-bandgap: cleanup resource allocation Wolfram Sang
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 sound/soc/txx9/txx9aclc-ac97.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
index 4bcce8a..e0305a1 100644
--- a/sound/soc/txx9/txx9aclc-ac97.c
+++ b/sound/soc/txx9/txx9aclc-ac97.c
@@ -184,9 +184,6 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
 	if (irq < 0)
 		return irq;
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r)
-		return -EBUSY;
-
 	drvdata->base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(drvdata->base))
 		return PTR_ERR(drvdata->base);
-- 
1.7.10.4


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

* [PATCH 27/27] thermal: ti-bandgap: cleanup resource allocation
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
                   ` (25 preceding siblings ...)
  2013-07-23 18:01 ` [PATCH 26/27] sound/soc/txx9: " Wolfram Sang
@ 2013-07-23 18:02 ` Wolfram Sang
  2013-07-26 15:43   ` Eduardo Valentin
  26 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Eduardo Valentin, Zhang Rui, linux-pm

When cleaning up usage of devm_ioremap_resource, I found that resource
allocation in this driver is ugly and buggy. If resource[0] is not
found, bgp->base will end up NULL, so OOPS. All other resources get
ioremapped, but their pointers are discarded, so why bother. So, let's
keep things simple. Just remap resource[0] and pass the error, if any.
Compile tested only, due to no hardware.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
Please apply via the subsystem-tree.

 drivers/thermal/ti-soc-thermal/ti-bandgap.c |   20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
index 9dfd471..416be5d 100644
--- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
@@ -1130,7 +1130,6 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
 	const struct of_device_id *of_id;
 	struct ti_bandgap *bgp;
 	struct resource *res;
-	int i;
 
 	/* just for the sake */
 	if (!node) {
@@ -1156,21 +1155,10 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
 		return ERR_PTR(-ENOMEM);
 	}
 
-	i = 0;
-	do {
-		void __iomem *chunk;
-
-		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
-		if (!res)
-			break;
-		chunk = devm_ioremap_resource(&pdev->dev, res);
-		if (i == 0)
-			bgp->base = chunk;
-		if (IS_ERR(chunk))
-			return ERR_CAST(chunk);
-
-		i++;
-	} while (res);
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	bgp->base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(bgp->base))
+		return bgp->base;
 
 	if (TI_BANDGAP_HAS(bgp, TSHUT)) {
 		bgp->tshut_gpio = of_get_gpio(node, 0);
-- 
1.7.10.4


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

* Re: [PATCH 01/27] arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 01/27] arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource Wolfram Sang
@ 2013-07-23 18:02   ` John Crispin
  0 siblings, 0 replies; 58+ messages in thread
From: John Crispin @ 2013-07-23 18:02 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, Ralf Baechle, linux-mips

On 23/07/13 20:01, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang<wsa@the-dreams.de>

Acked-by: John Crispin <blogic@openwrt.org>

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

* Re: [PATCH 11/27] drivers/mtd/nand: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 11/27] drivers/mtd/nand: " Wolfram Sang
@ 2013-07-23 18:09   ` Fabio Estevam
  0 siblings, 0 replies; 58+ messages in thread
From: Fabio Estevam @ 2013-07-23 18:09 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, linux-mtd, David Woodhouse

On Tue, Jul 23, 2013 at 3:01 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

I have already submitted such change:
http://patchwork.ozlabs.org/patch/260537/

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

* Re: [PATCH 13/27] drivers/pci/host: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 13/27] drivers/pci/host: " Wolfram Sang
@ 2013-07-23 18:12   ` Bjorn Helgaas
  2013-07-23 23:17     ` Jingoo Han
  0 siblings, 1 reply; 58+ messages in thread
From: Bjorn Helgaas @ 2013-07-23 18:12 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	Jingoo Han

[+cc Jingoo]

On Tue, Jul 23, 2013 at 12:01 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

Jingoo, I can apply this, or if you have other pcie-designware.c
updates this cycle, you can fold it into those.  Just let me know what
you'd prefer.

Bjorn


>  drivers/pci/host/pcie-designware.c |   12 ------------
>  1 file changed, 12 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 26bdbda..f0ba6ef 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -817,28 +817,16 @@ static int add_pcie_port(struct pcie_port *pp, struct platform_device *pdev)
>         int ret;
>
>         elbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       if (!elbi_base) {
> -               dev_err(&pdev->dev, "couldn't get elbi base resource\n");
> -               return -EINVAL;
> -       }
>         pp->elbi_base = devm_ioremap_resource(&pdev->dev, elbi_base);
>         if (IS_ERR(pp->elbi_base))
>                 return PTR_ERR(pp->elbi_base);
>
>         phy_base = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> -       if (!phy_base) {
> -               dev_err(&pdev->dev, "couldn't get phy base resource\n");
> -               return -EINVAL;
> -       }
>         pp->phy_base = devm_ioremap_resource(&pdev->dev, phy_base);
>         if (IS_ERR(pp->phy_base))
>                 return PTR_ERR(pp->phy_base);
>
>         purple_base = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> -       if (!purple_base) {
> -               dev_err(&pdev->dev, "couldn't get purple base resource\n");
> -               return -EINVAL;
> -       }
>         pp->purple_base = devm_ioremap_resource(&pdev->dev, purple_base);
>         if (IS_ERR(pp->purple_base))
>                 return PTR_ERR(pp->purple_base);
> --
> 1.7.10.4
>

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

* Re: [PATCH 10/27] drivers/memory: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 10/27] drivers/memory: " Wolfram Sang
@ 2013-07-23 18:25   ` Joe Perches
  2013-07-24  1:27     ` Stephen Warren
  2013-07-24  1:32   ` Stephen Warren
  2013-07-24  1:50   ` Joe Perches
  2 siblings, 1 reply; 58+ messages in thread
From: Joe Perches @ 2013-07-23 18:25 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, Stephen Warren, linux-tegra

On Tue, 2013-07-23 at 20:01 +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

Hi Wolfram:

This is the first and only one of the patch series I looked at.

> diff --git a/drivers/memory/tegra20-mc.c b/drivers/memory/tegra20-mc.c
[]
> @@ -218,8 +218,6 @@ static int tegra20_mc_probe(struct platform_device *pdev)
>  		struct resource *res;
>  
>  		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
> -		if (!res)
> -			return -ENODEV;
>  		mc->regs[i] = devm_ioremap_resource(&pdev->dev, res);

I'm not so sure this is appropriate.

devm_ioremap_resource returns ERR_PTR(-EINVAL) for
null resource so this changes the return.

devm_ioremap_resource also emits a noisy dev_err
message when resource is NULL.

It's a probe and before the message log would be silent
but now there's a new dmesg.

Perhaps that should be mentioned in the changelog here
and elsewhere in the series.



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

* Re: [PATCH 03/27] drivers/cpuidle: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 03/27] drivers/cpuidle: " Wolfram Sang
@ 2013-07-23 21:26   ` Rafael J. Wysocki
  0 siblings, 0 replies; 58+ messages in thread
From: Rafael J. Wysocki @ 2013-07-23 21:26 UTC (permalink / raw)
  To: Wolfram Sang, Daniel Lezcano; +Cc: linux-kernel, linux-pm

On Tuesday, July 23, 2013 08:01:36 PM Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Daniel, I'm leaving this one to you.

Thanks,
Rafael


> ---
> Please apply via the subsystem-tree.
> 
>  drivers/cpuidle/cpuidle-kirkwood.c |    3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/cpuidle/cpuidle-kirkwood.c b/drivers/cpuidle/cpuidle-kirkwood.c
> index 521b0a7..2237135 100644
> --- a/drivers/cpuidle/cpuidle-kirkwood.c
> +++ b/drivers/cpuidle/cpuidle-kirkwood.c
> @@ -60,9 +60,6 @@ static int kirkwood_cpuidle_probe(struct platform_device *pdev)
>  	struct resource *res;
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (res == NULL)
> -		return -EINVAL;
> -
>  	ddr_operation_base = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(ddr_operation_base))
>  		return PTR_ERR(ddr_operation_base);
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH 13/27] drivers/pci/host: don't check resource with devm_ioremap_resource
  2013-07-23 18:12   ` Bjorn Helgaas
@ 2013-07-23 23:17     ` Jingoo Han
  0 siblings, 0 replies; 58+ messages in thread
From: Jingoo Han @ 2013-07-23 23:17 UTC (permalink / raw)
  To: 'Bjorn Helgaas', 'Wolfram Sang'
  Cc: linux-kernel, linux-pci, Jingoo Han

On Wednesday, July 24, 2013 3:13 AM, Bjorn Helgaas wrote:
> On Tue, Jul 23, 2013 at 12:01 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> > devm_ioremap_resource does sanity checks on the given resource. No need to
> > duplicate this in the driver.
> >
> > Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> 
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> 
> Jingoo, I can apply this, or if you have other pcie-designware.c
> updates this cycle, you can fold it into those.  Just let me know what
> you'd prefer.

Hi Bjorn Helgaas,

I will send other updates for pcie-designware.c.
I will fold it into those.
Thank you.

Best regards,
Jingoo Han




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

* Re: [PATCH 10/27] drivers/memory: don't check resource with devm_ioremap_resource
  2013-07-23 18:25   ` Joe Perches
@ 2013-07-24  1:27     ` Stephen Warren
  2013-07-24  1:38       ` Joe Perches
  0 siblings, 1 reply; 58+ messages in thread
From: Stephen Warren @ 2013-07-24  1:27 UTC (permalink / raw)
  To: Joe Perches; +Cc: Wolfram Sang, linux-kernel, linux-tegra

On 07/23/2013 11:25 AM, Joe Perches wrote:
> On Tue, 2013-07-23 at 20:01 +0200, Wolfram Sang wrote:
>> devm_ioremap_resource does sanity checks on the given resource. No need to
>> duplicate this in the driver.
> 
> Hi Wolfram:
> 
> This is the first and only one of the patch series I looked at.
> 
>> diff --git a/drivers/memory/tegra20-mc.c b/drivers/memory/tegra20-mc.c
> []
>> @@ -218,8 +218,6 @@ static int tegra20_mc_probe(struct platform_device *pdev)
>>  		struct resource *res;
>>  
>>  		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
>> -		if (!res)
>> -			return -ENODEV;
>>  		mc->regs[i] = devm_ioremap_resource(&pdev->dev, res);
> 
> I'm not so sure this is appropriate.
> 
> devm_ioremap_resource returns ERR_PTR(-EINVAL) for
> null resource so this changes the return.

I think the exact return value is probably pretty arbitrary here.

> devm_ioremap_resource also emits a noisy dev_err
> message when resource is NULL.
> 
> It's a probe and before the message log would be silent
> but now there's a new dmesg.

I think those changes are fine, at least for this driver. It's a bug if
the required resources are missing, and having probe() actively point
out why it's failing can only be a good thing in my book.

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

* Re: [PATCH 08/27] drivers/iommu: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 08/27] drivers/iommu: " Wolfram Sang
@ 2013-07-24  1:30   ` Stephen Warren
  0 siblings, 0 replies; 58+ messages in thread
From: Stephen Warren @ 2013-07-24  1:30 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, linux-tegra, Joerg Roedel

On 07/23/2013 11:01 AM, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
> Please apply via the subsystem-tree.

You probably want to Cc the usual commiter (Joerg Roedel
<joro@8bytes.org>). I've done so here.

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

* Re: [PATCH 10/27] drivers/memory: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 10/27] drivers/memory: " Wolfram Sang
  2013-07-23 18:25   ` Joe Perches
@ 2013-07-24  1:32   ` Stephen Warren
  2013-07-24  1:50   ` Joe Perches
  2 siblings, 0 replies; 58+ messages in thread
From: Stephen Warren @ 2013-07-24  1:32 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, linux-tegra, Greg Kroah-Hartman

On 07/23/2013 11:01 AM, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
> Please apply via the subsystem-tree.

Greg KH usually commits patches to thus tree. I Cc'd him here.

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

* Re: [PATCH 02/27] drivers/amba: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 02/27] drivers/amba: " Wolfram Sang
@ 2013-07-24  1:34   ` Stephen Warren
  0 siblings, 0 replies; 58+ messages in thread
From: Stephen Warren @ 2013-07-24  1:34 UTC (permalink / raw)
  To: Russell King; +Cc: Wolfram Sang, linux-kernel, linux-tegra

On 07/23/2013 11:01 AM, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
> Please apply via the subsystem-tree.

Russell, I assume you'll take this patch?

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

* Re: [PATCH 10/27] drivers/memory: don't check resource with devm_ioremap_resource
  2013-07-24  1:27     ` Stephen Warren
@ 2013-07-24  1:38       ` Joe Perches
  0 siblings, 0 replies; 58+ messages in thread
From: Joe Perches @ 2013-07-24  1:38 UTC (permalink / raw)
  To: Stephen Warren; +Cc: Wolfram Sang, linux-kernel, linux-tegra

On Tue, 2013-07-23 at 18:27 -0700, Stephen Warren wrote:
> On 07/23/2013 11:25 AM, Joe Perches wrote:
> > On Tue, 2013-07-23 at 20:01 +0200, Wolfram Sang wrote:
> >> devm_ioremap_resource does sanity checks on the given resource. No need to
> >> duplicate this in the driver.
[]
> > This is the first and only one of the patch series I looked at.
> > 
> >> diff --git a/drivers/memory/tegra20-mc.c b/drivers/memory/tegra20-mc.c
> > []
> >> @@ -218,8 +218,6 @@ static int tegra20_mc_probe(struct platform_device *pdev)
> >>  		struct resource *res;
> >>  
> >>  		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
> >> -		if (!res)
> >> -			return -ENODEV;
> >>  		mc->regs[i] = devm_ioremap_resource(&pdev->dev, res);
> > 
> > I'm not so sure this is appropriate.
> > 
> > devm_ioremap_resource returns ERR_PTR(-EINVAL) for
> > null resource so this changes the return.
> 
> I think the exact return value is probably pretty arbitrary here.

I think so as well, but it takes code inspection to
determine whether or not there's any code impact.

I want to make sure Wolfram has done that inspection.

> > devm_ioremap_resource also emits a noisy dev_err
> > message when resource is NULL.
> > 
> > It's a probe and before the message log would be silent
> > but now there's a new dmesg.
> 
> I think those changes are fine, at least for this driver. It's a bug if
> the required resources are missing, and having probe() actively point
> out why it's failing can only be a good thing in my book.

Again, I haven't looked at _all_ the paths for all
of these patches, I just picked one at random.

Extra dmesg output with some device probes that are
expected to fail is not good.



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

* Re: [PATCH 10/27] drivers/memory: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 10/27] drivers/memory: " Wolfram Sang
  2013-07-23 18:25   ` Joe Perches
  2013-07-24  1:32   ` Stephen Warren
@ 2013-07-24  1:50   ` Joe Perches
  2013-07-24 15:28     ` Wolfram Sang
  2 siblings, 1 reply; 58+ messages in thread
From: Joe Perches @ 2013-07-24  1:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel

Hi again Wolfram

The next time you submit a patch series
please use a [PATCH 0/N] cover-letter
with a description of all the patches
and cc all the various email lists
on that [PATCH 0/N].

This cover letter can be created via
	git format-patch --cover-letter

That way, general replies to the series
can be to the 0/N cover letter and all
mailing lists can receive it.



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

* Re: [PATCH 17/27] drivers/spi: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 17/27] drivers/spi: " Wolfram Sang
@ 2013-07-24 14:29   ` Mark Brown
  2013-07-24 15:30     ` Wolfram Sang
  0 siblings, 1 reply; 58+ messages in thread
From: Mark Brown @ 2013-07-24 14:29 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Stephen Warren, Grant Likely, linux-rpi-kernel,
	linux-spi

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

On Tue, Jul 23, 2013 at 08:01:50PM +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

Applied, thanks.  With all these it'd be good to have subject lines
matching up with the standards for the subsystem.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 21/27] sound/soc/au1x: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 21/27] sound/soc/au1x: " Wolfram Sang
@ 2013-07-24 14:31   ` Mark Brown
  0 siblings, 0 replies; 58+ messages in thread
From: Mark Brown @ 2013-07-24 14:31 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	alsa-devel

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

On Tue, Jul 23, 2013 at 08:01:54PM +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

Appiled, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 22/27] sound/soc/cirrus: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 22/27] sound/soc/cirrus: " Wolfram Sang
@ 2013-07-24 14:33   ` Mark Brown
  0 siblings, 0 replies; 58+ messages in thread
From: Mark Brown @ 2013-07-24 14:33 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	alsa-devel

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

On Tue, Jul 23, 2013 at 08:01:55PM +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 23/27] sound/soc/nuc900: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 23/27] sound/soc/nuc900: " Wolfram Sang
@ 2013-07-24 14:34   ` Mark Brown
  0 siblings, 0 replies; 58+ messages in thread
From: Mark Brown @ 2013-07-24 14:34 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	alsa-devel

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

On Tue, Jul 23, 2013 at 08:01:56PM +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 24/27] sound/soc/pxa: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 24/27] sound/soc/pxa: " Wolfram Sang
@ 2013-07-24 14:35   ` Mark Brown
  0 siblings, 0 replies; 58+ messages in thread
From: Mark Brown @ 2013-07-24 14:35 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Eric Miao, Russell King, Haojian Zhuang,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, linux-arm-kernel,
	alsa-devel

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

On Tue, Jul 23, 2013 at 08:01:57PM +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 25/27] sound/soc/tegra: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 25/27] sound/soc/tegra: " Wolfram Sang
@ 2013-07-24 14:37   ` Mark Brown
  0 siblings, 0 replies; 58+ messages in thread
From: Mark Brown @ 2013-07-24 14:37 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Stephen Warren, alsa-devel, linux-tegra

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

On Tue, Jul 23, 2013 at 08:01:58PM +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

This doesn't seem to apply against my current branch, can you please
check and resend?

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 26/27] sound/soc/txx9: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 26/27] sound/soc/txx9: " Wolfram Sang
@ 2013-07-24 14:37   ` Mark Brown
  0 siblings, 0 replies; 58+ messages in thread
From: Mark Brown @ 2013-07-24 14:37 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	alsa-devel

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

On Tue, Jul 23, 2013 at 08:01:59PM +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 10/27] drivers/memory: don't check resource with devm_ioremap_resource
  2013-07-24  1:50   ` Joe Perches
@ 2013-07-24 15:28     ` Wolfram Sang
  2013-07-24 15:51       ` Joe Perches
  0 siblings, 1 reply; 58+ messages in thread
From: Wolfram Sang @ 2013-07-24 15:28 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-kernel

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

On Tue, Jul 23, 2013 at 06:50:00PM -0700, Joe Perches wrote:
> Hi again Wolfram
> 
> The next time you submit a patch series
> please use a [PATCH 0/N] cover-letter
> with a description of all the patches
> and cc all the various email lists
> on that [PATCH 0/N].

Huh? I did this and CCed all people which are CCed on the patches.
I wrote a script extra for that.

Regards,

   Wolfram

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 17/27] drivers/spi: don't check resource with devm_ioremap_resource
  2013-07-24 14:29   ` Mark Brown
@ 2013-07-24 15:30     ` Wolfram Sang
  0 siblings, 0 replies; 58+ messages in thread
From: Wolfram Sang @ 2013-07-24 15:30 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-kernel, Stephen Warren, Grant Likely, linux-rpi-kernel,
	linux-spi

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

On Wed, Jul 24, 2013 at 03:29:40PM +0100, Mark Brown wrote:
> On Tue, Jul 23, 2013 at 08:01:50PM +0200, Wolfram Sang wrote:
> > devm_ioremap_resource does sanity checks on the given resource. No need to
> > duplicate this in the driver.
> 
> Applied, thanks.  With all these it'd be good to have subject lines
> matching up with the standards for the subsystem.

OK. Let's see if I can script that :)


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 10/27] drivers/memory: don't check resource with devm_ioremap_resource
  2013-07-24 15:28     ` Wolfram Sang
@ 2013-07-24 15:51       ` Joe Perches
  0 siblings, 0 replies; 58+ messages in thread
From: Joe Perches @ 2013-07-24 15:51 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel

On Wed, 2013-07-24 at 17:28 +0200, Wolfram Sang wrote:
> On Tue, Jul 23, 2013 at 06:50:00PM -0700, Joe Perches wrote:
> > Hi again Wolfram
> > 
> > The next time you submit a patch series
> > please use a [PATCH 0/N] cover-letter
> > with a description of all the patches
> > and cc all the various email lists
> > on that [PATCH 0/N].
> 
> Huh? I did this and CCed all people which are CCed on the patches.
> I wrote a script extra for that.

Ah.  Well, good try.

The 0/n patch probably didn't get though vger's
maximum # of addresses spam filter.

Next time, instead of individually addressing all
the recipients on the 0/N, just cc the mailing
lists.  That greatly reduces the # of addresses
and generally gets through just fine.

If you really want to cc all the individual
MAINTAINERS, you can bcc them, but I don't do
that.  All of the MAINTAINERS should be subscribed
to one or another of the relevant mailing lists.

In my scripts I use:

[relevant bits of ~/.gitconfig]

[sendemail]
	chainreplyto = false
	thread = false
	suppresscc = self
	tocmd = ~/bin/to.sh
	cccmd = ~/bin/cc.sh

$ cat ~/bin/to.sh
#!/bin/bash

opts="--nogit --nogit-fallback --norolestats --pattern-depth=1"

if [[ $(basename $1) =~ ^0000- ]] ; then
    ./scripts/get_maintainer.pl --nom $opts  $(dirname $1)/*
else
    maint=$(./scripts/get_maintainer.pl --nol $opts $1)
    if [ "$maint" == "" ] ; then
	echo "linux-kernel@vger.kernel.org"
    else
	echo "$maint"
    fi
fi

$ cat ~/bin/cc.sh
#!/bin/bash

opts="--nogit --nogit-fallback --norolestats"

if [[ $(basename $1) =~ ^0000- ]] ; then
    ./scripts/get_maintainer.pl --nom $opts  $(dirname $1)/*
else
    ./scripts/get_maintainer.pl $opts $1


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

* Re: [PATCH 12/27] drivers/net/ethernet/stmicro/stmmac: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 12/27] drivers/net/ethernet/stmicro/stmmac: " Wolfram Sang
@ 2013-07-25  6:59   ` David Miller
  0 siblings, 0 replies; 58+ messages in thread
From: David Miller @ 2013-07-25  6:59 UTC (permalink / raw)
  To: wsa; +Cc: linux-kernel, peppe.cavallaro, netdev

From: Wolfram Sang <wsa@the-dreams.de>
Date: Tue, 23 Jul 2013 20:01:45 +0200

> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Applied, thanks.

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

* Re: [PATCH 27/27] thermal: ti-bandgap: cleanup resource allocation
  2013-07-23 18:02 ` [PATCH 27/27] thermal: ti-bandgap: cleanup resource allocation Wolfram Sang
@ 2013-07-26 15:43   ` Eduardo Valentin
  0 siblings, 0 replies; 58+ messages in thread
From: Eduardo Valentin @ 2013-07-26 15:43 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, Eduardo Valentin, Zhang Rui, linux-pm

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

On 23-07-2013 14:02, Wolfram Sang wrote:
> When cleaning up usage of devm_ioremap_resource, I found that resource
> allocation in this driver is ugly and buggy. If resource[0] is not
> found, bgp->base will end up NULL, so OOPS. All other resources get
> ioremapped, but their pointers are discarded, so why bother. So, let's
> keep things simple. Just remap resource[0] and pass the error, if any.
> Compile tested only, due to no hardware.


Nack, this will actually break the driver. This device has several
sections of registers, and not a single io region. Check
Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt for examples.

> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
> Please apply via the subsystem-tree.
> 
>  drivers/thermal/ti-soc-thermal/ti-bandgap.c |   20 ++++----------------
>  1 file changed, 4 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> index 9dfd471..416be5d 100644
> --- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> +++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
> @@ -1130,7 +1130,6 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
>  	const struct of_device_id *of_id;
>  	struct ti_bandgap *bgp;
>  	struct resource *res;
> -	int i;
>  
>  	/* just for the sake */
>  	if (!node) {
> @@ -1156,21 +1155,10 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
>  		return ERR_PTR(-ENOMEM);
>  	}
>  
> -	i = 0;
> -	do {
> -		void __iomem *chunk;
> -
> -		res = platform_get_resource(pdev, IORESOURCE_MEM, i);
> -		if (!res)
> -			break;
> -		chunk = devm_ioremap_resource(&pdev->dev, res);
> -		if (i == 0)
> -			bgp->base = chunk;
> -		if (IS_ERR(chunk))
> -			return ERR_CAST(chunk);

In case resource 0 is not found, the error will be repassed.

> -
> -		i++;
> -	} while (res);

And yes, other IORESOURCE_MEM resources are required, depending on chip
version.

> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +	bgp->base = devm_ioremap_resource(&pdev->dev, res);
> +	if (IS_ERR(bgp->base))
> +		return bgp->base;
>  
>  	if (TI_BANDGAP_HAS(bgp, TSHUT)) {
>  		bgp->tshut_gpio = of_get_gpio(node, 0);
> 


-- 
You have got to be excited about what you are doing. (L. Lamport)

Eduardo Valentin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 295 bytes --]

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

* Re: [PATCH 06/27] drivers/i2c/busses: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 06/27] drivers/i2c/busses: " Wolfram Sang
@ 2013-07-29 16:39   ` Linus Walleij
  2013-08-07 15:38   ` Wolfram Sang
  1 sibling, 0 replies; 58+ messages in thread
From: Linus Walleij @ 2013-07-29 16:39 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org

On Tue, Jul 23, 2013 at 8:01 PM, Wolfram Sang <wsa@the-dreams.de> wrote:

> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
> Please apply via the subsystem-tree.

Are you talking to yourself ;-)

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH 05/27] drivers/gpu/host1x/drm: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 05/27] drivers/gpu/host1x/drm: " Wolfram Sang
@ 2013-08-01 10:20   ` Terje Bergström
  0 siblings, 0 replies; 58+ messages in thread
From: Terje Bergström @ 2013-08-01 10:20 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel@vger.kernel.org, Thierry Reding,
	dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org

On 23.07.2013 21:01, Wolfram Sang wrote:
> diff --git a/drivers/gpu/host1x/drm/hdmi.c b/drivers/gpu/host1x/drm/hdmi.c
> index 01097da..9ffece6 100644
> --- a/drivers/gpu/host1x/drm/hdmi.c
> +++ b/drivers/gpu/host1x/drm/hdmi.c
> @@ -1248,9 +1248,6 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
>  		return err;
>  
>  	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!regs)
> -		return -ENXIO;
> -
>  	hdmi->regs = devm_ioremap_resource(&pdev->dev, regs);
>  	if (IS_ERR(hdmi->regs))
>  		return PTR_ERR(hdmi->regs);
> 

Looks good to me.

Reviewed-By: Terje Bergstrom <tbergstrom@nvidia.com>

Terje

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

* Re: [PATCH 06/27] drivers/i2c/busses: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 06/27] drivers/i2c/busses: " Wolfram Sang
  2013-07-29 16:39   ` Linus Walleij
@ 2013-08-07 15:38   ` Wolfram Sang
  1 sibling, 0 replies; 58+ messages in thread
From: Wolfram Sang @ 2013-08-07 15:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Walleij, linux-arm-kernel, linux-i2c

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

On Tue, Jul 23, 2013 at 08:01:39PM +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Applied to for-next, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 14/27] drivers/pinctrl: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 14/27] drivers/pinctrl: " Wolfram Sang
@ 2013-08-07 18:14   ` Linus Walleij
  0 siblings, 0 replies; 58+ messages in thread
From: Linus Walleij @ 2013-08-07 18:14 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel@vger.kernel.org

On Tue, Jul 23, 2013 at 8:01 PM, Wolfram Sang <wsa@the-dreams.de> wrote:

> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
> Please apply via the subsystem-tree.

Patch applied, but I had to drop the hunk to the imx driver, as that had
already arrived in the tree by some other patch.

Yours,
Linus Walleij

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

* Re: [PATCH 15/27] drivers/pwm: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 15/27] drivers/pwm: " Wolfram Sang
@ 2013-08-14  9:43   ` Thierry Reding
  0 siblings, 0 replies; 58+ messages in thread
From: Thierry Reding @ 2013-08-14  9:43 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, linux-pwm

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

On Tue, Jul 23, 2013 at 08:01:48PM +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
> Please apply via the subsystem-tree.
> 
>  drivers/pwm/pwm-lpc32xx.c     |    3 ---
>  drivers/pwm/pwm-renesas-tpu.c |    5 -----
>  2 files changed, 8 deletions(-)

Hi Wolfram,

Julia Lawall just sent a more complete version of this which includes an
additional change to the pwm-spear driver. I've applied her version, I
hope you don't mind.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 04/27] drivers/dma: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 04/27] drivers/dma: " Wolfram Sang
@ 2013-08-19  8:58   ` Vinod Koul
  2013-08-19 10:03     ` Wolfram Sang
  0 siblings, 1 reply; 58+ messages in thread
From: Vinod Koul @ 2013-08-19  8:58 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, Dan Williams

On Tue, Jul 23, 2013 at 08:01:37PM +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Sorry looks like I missed this and instead applied a similar patch from Julia
last week. I should have taken this instead. My bad...

~Vinod
> ---
> Please apply via the subsystem-tree.
> 
>  drivers/dma/mmp_pdma.c |    3 ---
>  drivers/dma/mmp_tdma.c |    3 ---
>  2 files changed, 6 deletions(-)
> 
> diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
> index c26699f..7eba967 100644
> --- a/drivers/dma/mmp_pdma.c
> +++ b/drivers/dma/mmp_pdma.c
> @@ -778,9 +778,6 @@ static int mmp_pdma_probe(struct platform_device *op)
>  	pdev->dev = &op->dev;
>  
>  	iores = platform_get_resource(op, IORESOURCE_MEM, 0);
> -	if (!iores)
> -		return -EINVAL;
> -
>  	pdev->base = devm_ioremap_resource(pdev->dev, iores);
>  	if (IS_ERR(pdev->base))
>  		return PTR_ERR(pdev->base);
> diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
> index 9b93665..1f1885a 100644
> --- a/drivers/dma/mmp_tdma.c
> +++ b/drivers/dma/mmp_tdma.c
> @@ -549,9 +549,6 @@ static int mmp_tdma_probe(struct platform_device *pdev)
>  	}
>  
>  	iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!iores)
> -		return -EINVAL;
> -
>  	tdev->base = devm_ioremap_resource(&pdev->dev, iores);
>  	if (IS_ERR(tdev->base))
>  		return PTR_ERR(tdev->base);
> -- 
> 1.7.10.4
> 

-- 

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

* Re: [PATCH 04/27] drivers/dma: don't check resource with devm_ioremap_resource
  2013-08-19  8:58   ` Vinod Koul
@ 2013-08-19 10:03     ` Wolfram Sang
  0 siblings, 0 replies; 58+ messages in thread
From: Wolfram Sang @ 2013-08-19 10:03 UTC (permalink / raw)
  To: Vinod Koul; +Cc: linux-kernel, Dan Williams

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

On Mon, Aug 19, 2013 at 02:28:57PM +0530, Vinod Koul wrote:
> On Tue, Jul 23, 2013 at 08:01:37PM +0200, Wolfram Sang wrote:
> > devm_ioremap_resource does sanity checks on the given resource. No need to
> > duplicate this in the driver.
> > 
> > Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> Sorry looks like I missed this and instead applied a similar patch from Julia
> last week. I should have taken this instead. My bad...

Fine with me, as long as the issue gets fixed :)


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-08-19 10:03 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
2013-07-23 18:01 ` [PATCH 01/27] arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource Wolfram Sang
2013-07-23 18:02   ` John Crispin
2013-07-23 18:01 ` [PATCH 02/27] drivers/amba: " Wolfram Sang
2013-07-24  1:34   ` Stephen Warren
2013-07-23 18:01 ` [PATCH 03/27] drivers/cpuidle: " Wolfram Sang
2013-07-23 21:26   ` Rafael J. Wysocki
2013-07-23 18:01 ` [PATCH 04/27] drivers/dma: " Wolfram Sang
2013-08-19  8:58   ` Vinod Koul
2013-08-19 10:03     ` Wolfram Sang
2013-07-23 18:01 ` [PATCH 05/27] drivers/gpu/host1x/drm: " Wolfram Sang
2013-08-01 10:20   ` Terje Bergström
2013-07-23 18:01 ` [PATCH 06/27] drivers/i2c/busses: " Wolfram Sang
2013-07-29 16:39   ` Linus Walleij
2013-08-07 15:38   ` Wolfram Sang
2013-07-23 18:01 ` [PATCH 07/27] drivers/input/serio: " Wolfram Sang
2013-07-23 18:01 ` [PATCH 08/27] drivers/iommu: " Wolfram Sang
2013-07-24  1:30   ` Stephen Warren
2013-07-23 18:01 ` [PATCH 09/27] drivers/media/platform: " Wolfram Sang
2013-07-23 18:01 ` [PATCH 10/27] drivers/memory: " Wolfram Sang
2013-07-23 18:25   ` Joe Perches
2013-07-24  1:27     ` Stephen Warren
2013-07-24  1:38       ` Joe Perches
2013-07-24  1:32   ` Stephen Warren
2013-07-24  1:50   ` Joe Perches
2013-07-24 15:28     ` Wolfram Sang
2013-07-24 15:51       ` Joe Perches
2013-07-23 18:01 ` [PATCH 11/27] drivers/mtd/nand: " Wolfram Sang
2013-07-23 18:09   ` Fabio Estevam
2013-07-23 18:01 ` [PATCH 12/27] drivers/net/ethernet/stmicro/stmmac: " Wolfram Sang
2013-07-25  6:59   ` David Miller
2013-07-23 18:01 ` [PATCH 13/27] drivers/pci/host: " Wolfram Sang
2013-07-23 18:12   ` Bjorn Helgaas
2013-07-23 23:17     ` Jingoo Han
2013-07-23 18:01 ` [PATCH 14/27] drivers/pinctrl: " Wolfram Sang
2013-08-07 18:14   ` Linus Walleij
2013-07-23 18:01 ` [PATCH 15/27] drivers/pwm: " Wolfram Sang
2013-08-14  9:43   ` Thierry Reding
2013-07-23 18:01 ` [PATCH 16/27] drivers/scsi/ufs: " Wolfram Sang
2013-07-23 18:01 ` [PATCH 17/27] drivers/spi: " Wolfram Sang
2013-07-24 14:29   ` Mark Brown
2013-07-24 15:30     ` Wolfram Sang
2013-07-23 18:01 ` [PATCH 18/27] drivers/staging/imx-drm: " Wolfram Sang
2013-07-23 18:01 ` [PATCH 19/27] drivers/usb/phy: " Wolfram Sang
2013-07-23 18:01 ` [PATCH 20/27] drivers/watchdog: " Wolfram Sang
2013-07-23 18:01 ` [PATCH 21/27] sound/soc/au1x: " Wolfram Sang
2013-07-24 14:31   ` Mark Brown
2013-07-23 18:01 ` [PATCH 22/27] sound/soc/cirrus: " Wolfram Sang
2013-07-24 14:33   ` Mark Brown
2013-07-23 18:01 ` [PATCH 23/27] sound/soc/nuc900: " Wolfram Sang
2013-07-24 14:34   ` Mark Brown
2013-07-23 18:01 ` [PATCH 24/27] sound/soc/pxa: " Wolfram Sang
2013-07-24 14:35   ` Mark Brown
2013-07-23 18:01 ` [PATCH 25/27] sound/soc/tegra: " Wolfram Sang
2013-07-24 14:37   ` Mark Brown
2013-07-23 18:01 ` [PATCH 26/27] sound/soc/txx9: " Wolfram Sang
2013-07-24 14:37   ` Mark Brown
2013-07-23 18:02 ` [PATCH 27/27] thermal: ti-bandgap: cleanup resource allocation Wolfram Sang
2013-07-26 15:43   ` Eduardo Valentin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).