All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 11:15 ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mips, alsa-devel, linux-usb, Wolfram Sang,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Matt Mackall,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide, netdev,
	linux-mtd, linux-i2c, Evgeniy Polyakov, Wan ZongShun, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Stephen Warren, Rafael J. Wysocki,
	cpufreq

Lately, I have been experimenting how to improve the devm interface to make
writing device drivers easier and less error prone while also getting rid of
its subtle issues. I think it has more potential but still needs work and
definately conistency, especiall in its usage.

The first thing I come up with is a low hanging fruit regarding
devm_ioremap_resouce(). This function already checks if the passed resource is
valid and gives an error message if not. So, we can remove similar checks from
the drivers and get rid of a bit of code and a number of inconsistent error
strings.

Unlike the RFC version, this series only removes the unneeded check iff
devm_ioremap_resource() follows platform_get_resource directly. The previous
version tried to shuffle code if needed, too, what lead to an embarrasing bug.
It turned out to me that shuffling code for all cases found will make the
automated script too complex, so I am unsure if an automated cleanup is the
proper tool for this case. Removing the easy stuff seems worthwhile to me,
though, so I post this series in a simplified form.

Despite various architectures and platform dependencies, I managed to compile
test 45 out of 57 modified files locally using heuristics and defconfigs.
If somebody knows how to create a minimal .config with a certain kconfig symbol
(and its dependencies) set, I'd love to hear about it.

Since this series looks quite different from the RFC (less files touched
mainly) I did not copy over the ACKs from the RFC, although a few people agreed
with the aproach basically (except the major flaw the old series had).

The repo is here [1]. I'd think it would be nice to have in 3.10. and sending a
pull request to Linus would be easiest, probably. Some non-buggy RFC patches
already slipped into subtrees, yet this won't cause any conflicts.

Looking forward to comments.

Thanks,

   Wolfram

[1] git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git devm_no_resource_check


Wolfram Sang (33):
  drivers/ata: don't check resource with devm_ioremap_resource
  drivers/char/hw_random: don't check resource with
    devm_ioremap_resource
  drivers/cpufreq: don't check resource with devm_ioremap_resource
  drivers/dma: don't check resource with devm_ioremap_resource
  drivers/gpio: don't check resource with devm_ioremap_resource
  drivers/gpu/drm/exynos: don't check resource with
    devm_ioremap_resource
  drivers/gpu/host1x/drm: don't check resource with
    devm_ioremap_resource
  drivers/i2c/busses: don't check resource with devm_ioremap_resource
  drivers/memory: don't check resource with devm_ioremap_resource
  drivers/mfd: don't check resource with devm_ioremap_resource
  drivers/misc: don't check resource with devm_ioremap_resource
  drivers/mtd/nand: don't check resource with devm_ioremap_resource
  drivers/net/ethernet/renesas: don't check resource with
    devm_ioremap_resource
  drivers/pinctrl: don't check resource with devm_ioremap_resource
  drivers/pwm: don't check resource with devm_ioremap_resource
  drivers/rtc: don't check resource with devm_ioremap_resource
  drivers/spi: don't check resource with devm_ioremap_resource
  drivers/staging/dwc2: don't check resource with devm_ioremap_resource
  drivers/staging/nvec: don't check resource with devm_ioremap_resource
  drivers/thermal: don't check resource with devm_ioremap_resource
  drivers/usb/chipidea: don't check resource with devm_ioremap_resource
  drivers/usb/gadget: don't check resource with devm_ioremap_resource
  drivers/usb/host: don't check resource with devm_ioremap_resource
  drivers/usb/phy: don't check resource with devm_ioremap_resource
  drivers/video/omap2: don't check resource with devm_ioremap_resource
  drivers/video/omap2/dss: don't check resource with
    devm_ioremap_resource
  drivers/w1/masters: don't check resource with devm_ioremap_resource
  drivers/watchdog: don't check resource with devm_ioremap_resource
  arch/arm/mach-tegra: don't check resource with devm_ioremap_resource
  arch/arm/plat-samsung: don't check resource with
    devm_ioremap_resource
  arch/mips/lantiq/xway: don't check resource with
    devm_ioremap_resource
  sound/soc/fsl: don't check resource with devm_ioremap_resource
  sound/soc/kirkwood: don't check resource with devm_ioremap_resource

 arch/arm/mach-tegra/tegra2_emc.c      |    5 -----
 arch/arm/plat-samsung/adc.c           |    5 -----
 arch/mips/lantiq/xway/gptu.c          |    4 ----
 drivers/ata/pata_ep93xx.c             |    5 -----
 drivers/char/hw_random/mxc-rnga.c     |    6 ------
 drivers/char/hw_random/omap-rng.c     |    5 -----
 drivers/cpufreq/kirkwood-cpufreq.c    |    4 ----
 drivers/dma/tegra20-apb-dma.c         |    5 -----
 drivers/gpio/gpio-mvebu.c             |    5 -----
 drivers/gpio/gpio-tegra.c             |    5 -----
 drivers/gpu/drm/exynos/exynos_hdmi.c  |    5 -----
 drivers/gpu/host1x/drm/dc.c           |    5 -----
 drivers/i2c/busses/i2c-s3c2410.c      |    5 -----
 drivers/i2c/busses/i2c-sirf.c         |    6 ------
 drivers/i2c/busses/i2c-tegra.c        |    5 -----
 drivers/memory/emif.c                 |    6 ------
 drivers/mfd/intel_msic.c              |    5 -----
 drivers/misc/atmel-ssc.c              |    5 -----
 drivers/mtd/nand/lpc32xx_mlc.c        |    5 -----
 drivers/net/ethernet/renesas/sh_eth.c |    5 -----
 drivers/pinctrl/pinctrl-coh901.c      |    5 -----
 drivers/pinctrl/pinctrl-exynos5440.c  |    5 -----
 drivers/pinctrl/pinctrl-samsung.c     |    5 -----
 drivers/pinctrl/pinctrl-xway.c        |    4 ----
 drivers/pwm/pwm-imx.c                 |    5 -----
 drivers/pwm/pwm-puv3.c                |    5 -----
 drivers/pwm/pwm-pxa.c                 |    5 -----
 drivers/pwm/pwm-tegra.c               |    5 -----
 drivers/pwm/pwm-tiecap.c              |    5 -----
 drivers/pwm/pwm-tiehrpwm.c            |    5 -----
 drivers/pwm/pwm-tipwmss.c             |    5 -----
 drivers/pwm/pwm-vt8500.c              |    5 -----
 drivers/rtc/rtc-nuc900.c              |    5 -----
 drivers/rtc/rtc-omap.c                |    5 -----
 drivers/rtc/rtc-s3c.c                 |    5 -----
 drivers/rtc/rtc-tegra.c               |    6 ------
 drivers/spi/spi-tegra20-sflash.c      |    5 -----
 drivers/staging/dwc2/platform.c       |    5 -----
 drivers/staging/nvec/nvec.c           |    5 -----
 drivers/thermal/armada_thermal.c      |   10 ----------
 drivers/thermal/dove_thermal.c        |    4 ----
 drivers/thermal/exynos_thermal.c      |    5 -----
 drivers/usb/chipidea/core.c           |    5 -----
 drivers/usb/gadget/bcm63xx_udc.c      |   10 ----------
 drivers/usb/host/ohci-nxp.c           |    6 ------
 drivers/usb/phy/phy-mv-u3d-usb.c      |    5 -----
 drivers/usb/phy/phy-mxs-usb.c         |    5 -----
 drivers/usb/phy/phy-samsung-usb2.c    |    5 -----
 drivers/usb/phy/phy-samsung-usb3.c    |    5 -----
 drivers/video/omap2/dss/hdmi.c        |    4 ----
 drivers/video/omap2/vrfb.c            |    5 -----
 drivers/w1/masters/omap_hdq.c         |    5 -----
 drivers/watchdog/ath79_wdt.c          |    5 -----
 drivers/watchdog/davinci_wdt.c        |    5 -----
 drivers/watchdog/imx2_wdt.c           |    5 -----
 sound/soc/fsl/imx-ssi.c               |    6 ------
 sound/soc/kirkwood/kirkwood-i2s.c     |    5 -----
 57 files changed, 296 deletions(-)

-- 
1.7.10.4

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

* [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 11:15 ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, ac100, Alan Stern, Alessandro Zummo,
	Alexander Shishkin, alsa-devel, Arnd Bergmann, Barry Song,
	Ben Dooks, cpufreq, Dan Williams, David Airlie, David Woodhouse,
	Deepak Saxena, devel, dri-devel, Eduardo Valentin,
	Evgeniy Polyakov, Felipe Balbi, Florian Tobias Schandinat,
	Grant Likely, Greg Kroah-Hartman, Herbert Xu, Inki Dae,
	Jaroslav Kysela, Joonyoung Shim, Julian Andres Klode, Kukjin Kim,
	Kyungmin Park, Liam Girdwood, Linus Torvalds, Linus Walleij,
	linux-arm-kernel, linux-fbdev, linux-i2c, linux-ide, linux-mips,
	linux-mtd, linux-omap, linux-pm, linux-samsung-soc, linux-tegra,
	linux-usb, linux-watchdog, Marc Dietrich, Mark Brown,
	Matt Mackall, netdev, Paul Zimmerman, Rafael J. Wysocki,
	Ralf Baechle, rtc-linux, Russell King, Samuel Ortiz,
	Seung-Woo Kim, spi-devel-general, Stephen Warren, Takashi Iwai,
	Tejun Heo, Thierry Reding, Tomi Valkeinen, Tony Prisk,
	Vinod Koul, Viresh Kumar, Wan ZongShun, Wim Van Sebroeck,
	Zhang Rui

Lately, I have been experimenting how to improve the devm interface to make
writing device drivers easier and less error prone while also getting rid of
its subtle issues. I think it has more potential but still needs work and
definately conistency, especiall in its usage.

The first thing I come up with is a low hanging fruit regarding
devm_ioremap_resouce(). This function already checks if the passed resource is
valid and gives an error message if not. So, we can remove similar checks from
the drivers and get rid of a bit of code and a number of inconsistent error
strings.

Unlike the RFC version, this series only removes the unneeded check iff
devm_ioremap_resource() follows platform_get_resource directly. The previous
version tried to shuffle code if needed, too, what lead to an embarrasing bug.
It turned out to me that shuffling code for all cases found will make the
automated script too complex, so I am unsure if an automated cleanup is the
proper tool for this case. Removing the easy stuff seems worthwhile to me,
though, so I post this series in a simplified form.

Despite various architectures and platform dependencies, I managed to compile
test 45 out of 57 modified files locally using heuristics and defconfigs.
If somebody knows how to create a minimal .config with a certain kconfig symbol
(and its dependencies) set, I'd love to hear about it.

Since this series looks quite different from the RFC (less files touched
mainly) I did not copy over the ACKs from the RFC, although a few people agreed
with the aproach basically (except the major flaw the old series had).

The repo is here [1]. I'd think it would be nice to have in 3.10. and sending a
pull request to Linus would be easiest, probably. Some non-buggy RFC patches
already slipped into subtrees, yet this won't cause any conflicts.

Looking forward to comments.

Thanks,

   Wolfram

[1] git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git devm_no_resource_check


Wolfram Sang (33):
  drivers/ata: don't check resource with devm_ioremap_resource
  drivers/char/hw_random: don't check resource with
    devm_ioremap_resource
  drivers/cpufreq: don't check resource with devm_ioremap_resource
  drivers/dma: don't check resource with devm_ioremap_resource
  drivers/gpio: don't check resource with devm_ioremap_resource
  drivers/gpu/drm/exynos: don't check resource with
    devm_ioremap_resource
  drivers/gpu/host1x/drm: don't check resource with
    devm_ioremap_resource
  drivers/i2c/busses: don't check resource with devm_ioremap_resource
  drivers/memory: don't check resource with devm_ioremap_resource
  drivers/mfd: don't check resource with devm_ioremap_resource
  drivers/misc: don't check resource with devm_ioremap_resource
  drivers/mtd/nand: don't check resource with devm_ioremap_resource
  drivers/net/ethernet/renesas: don't check resource with
    devm_ioremap_resource
  drivers/pinctrl: don't check resource with devm_ioremap_resource
  drivers/pwm: don't check resource with devm_ioremap_resource
  drivers/rtc: don't check resource with devm_ioremap_resource
  drivers/spi: don't check resource with devm_ioremap_resource
  drivers/staging/dwc2: don't check resource with devm_ioremap_resource
  drivers/staging/nvec: don't check resource with devm_ioremap_resource
  drivers/thermal: don't check resource with devm_ioremap_resource
  drivers/usb/chipidea: don't check resource with devm_ioremap_resource
  drivers/usb/gadget: don't check resource with devm_ioremap_resource
  drivers/usb/host: don't check resource with devm_ioremap_resource
  drivers/usb/phy: don't check resource with devm_ioremap_resource
  drivers/video/omap2: don't check resource with devm_ioremap_resource
  drivers/video/omap2/dss: don't check resource with
    devm_ioremap_resource
  drivers/w1/masters: don't check resource with devm_ioremap_resource
  drivers/watchdog: don't check resource with devm_ioremap_resource
  arch/arm/mach-tegra: don't check resource with devm_ioremap_resource
  arch/arm/plat-samsung: don't check resource with
    devm_ioremap_resource
  arch/mips/lantiq/xway: don't check resource with
    devm_ioremap_resource
  sound/soc/fsl: don't check resource with devm_ioremap_resource
  sound/soc/kirkwood: don't check resource with devm_ioremap_resource

 arch/arm/mach-tegra/tegra2_emc.c      |    5 -----
 arch/arm/plat-samsung/adc.c           |    5 -----
 arch/mips/lantiq/xway/gptu.c          |    4 ----
 drivers/ata/pata_ep93xx.c             |    5 -----
 drivers/char/hw_random/mxc-rnga.c     |    6 ------
 drivers/char/hw_random/omap-rng.c     |    5 -----
 drivers/cpufreq/kirkwood-cpufreq.c    |    4 ----
 drivers/dma/tegra20-apb-dma.c         |    5 -----
 drivers/gpio/gpio-mvebu.c             |    5 -----
 drivers/gpio/gpio-tegra.c             |    5 -----
 drivers/gpu/drm/exynos/exynos_hdmi.c  |    5 -----
 drivers/gpu/host1x/drm/dc.c           |    5 -----
 drivers/i2c/busses/i2c-s3c2410.c      |    5 -----
 drivers/i2c/busses/i2c-sirf.c         |    6 ------
 drivers/i2c/busses/i2c-tegra.c        |    5 -----
 drivers/memory/emif.c                 |    6 ------
 drivers/mfd/intel_msic.c              |    5 -----
 drivers/misc/atmel-ssc.c              |    5 -----
 drivers/mtd/nand/lpc32xx_mlc.c        |    5 -----
 drivers/net/ethernet/renesas/sh_eth.c |    5 -----
 drivers/pinctrl/pinctrl-coh901.c      |    5 -----
 drivers/pinctrl/pinctrl-exynos5440.c  |    5 -----
 drivers/pinctrl/pinctrl-samsung.c     |    5 -----
 drivers/pinctrl/pinctrl-xway.c        |    4 ----
 drivers/pwm/pwm-imx.c                 |    5 -----
 drivers/pwm/pwm-puv3.c                |    5 -----
 drivers/pwm/pwm-pxa.c                 |    5 -----
 drivers/pwm/pwm-tegra.c               |    5 -----
 drivers/pwm/pwm-tiecap.c              |    5 -----
 drivers/pwm/pwm-tiehrpwm.c            |    5 -----
 drivers/pwm/pwm-tipwmss.c             |    5 -----
 drivers/pwm/pwm-vt8500.c              |    5 -----
 drivers/rtc/rtc-nuc900.c              |    5 -----
 drivers/rtc/rtc-omap.c                |    5 -----
 drivers/rtc/rtc-s3c.c                 |    5 -----
 drivers/rtc/rtc-tegra.c               |    6 ------
 drivers/spi/spi-tegra20-sflash.c      |    5 -----
 drivers/staging/dwc2/platform.c       |    5 -----
 drivers/staging/nvec/nvec.c           |    5 -----
 drivers/thermal/armada_thermal.c      |   10 ----------
 drivers/thermal/dove_thermal.c        |    4 ----
 drivers/thermal/exynos_thermal.c      |    5 -----
 drivers/usb/chipidea/core.c           |    5 -----
 drivers/usb/gadget/bcm63xx_udc.c      |   10 ----------
 drivers/usb/host/ohci-nxp.c           |    6 ------
 drivers/usb/phy/phy-mv-u3d-usb.c      |    5 -----
 drivers/usb/phy/phy-mxs-usb.c         |    5 -----
 drivers/usb/phy/phy-samsung-usb2.c    |    5 -----
 drivers/usb/phy/phy-samsung-usb3.c    |    5 -----
 drivers/video/omap2/dss/hdmi.c        |    4 ----
 drivers/video/omap2/vrfb.c            |    5 -----
 drivers/w1/masters/omap_hdq.c         |    5 -----
 drivers/watchdog/ath79_wdt.c          |    5 -----
 drivers/watchdog/davinci_wdt.c        |    5 -----
 drivers/watchdog/imx2_wdt.c           |    5 -----
 sound/soc/fsl/imx-ssi.c               |    6 ------
 sound/soc/kirkwood/kirkwood-i2s.c     |    5 -----
 57 files changed, 296 deletions(-)

-- 
1.7.10.4

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

* [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 11:15 ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mips, alsa-devel, linux-usb, Wolfram Sang,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Matt Mackall,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide,
	Wim Van Sebroeck, netdev, linux-mtd, linux-i2c, Evgeniy Polyakov,
	Wan ZongShun, ac100, devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Marc Dietrich, Stephen Warren,
	Rafael J. Wysocki, cpufreq, Eduardo Valentin, David Airlie,
	Tomi Valkeinen, Alan Stern, Grant Likely, Zhang Rui,
	Thierry Reding, Deepak Saxena, linux-watchdog, Arnd Bergmann,
	linux-pm, Julian Andres Klode, Inki Dae, linux-samsung-soc,
	Ben Dooks, Barry Song, linux-tegra, rtc-linux, linux-omap,
	linux-arm-kernel, Joonyoung Shim, Alessandro Zummo,
	spi-devel-general, Greg Kroah-Hartman, Ralf Baechle,
	Linus Torvalds, Seung-Woo Kim, Liam Girdwood, Felipe Balbi,
	Tony Prisk, Vinod Koul, Kyungmin Park, Mark Brown, Takashi Iwai,
	Dan Williams, Tejun Heo, Samuel Ortiz, David Woodhouse,
	Paul Zimmerman

Lately, I have been experimenting how to improve the devm interface to make
writing device drivers easier and less error prone while also getting rid of
its subtle issues. I think it has more potential but still needs work and
definately conistency, especiall in its usage.

The first thing I come up with is a low hanging fruit regarding
devm_ioremap_resouce(). This function already checks if the passed resource is
valid and gives an error message if not. So, we can remove similar checks from
the drivers and get rid of a bit of code and a number of inconsistent error
strings.

Unlike the RFC version, this series only removes the unneeded check iff
devm_ioremap_resource() follows platform_get_resource directly. The previous
version tried to shuffle code if needed, too, what lead to an embarrasing bug.
It turned out to me that shuffling code for all cases found will make the
automated script too complex, so I am unsure if an automated cleanup is the
proper tool for this case. Removing the easy stuff seems worthwhile to me,
though, so I post this series in a simplified form.

Despite various architectures and platform dependencies, I managed to compile
test 45 out of 57 modified files locally using heuristics and defconfigs.
If somebody knows how to create a minimal .config with a certain kconfig symbol
(and its dependencies) set, I'd love to hear about it.

Since this series looks quite different from the RFC (less files touched
mainly) I did not copy over the ACKs from the RFC, although a few people agreed
with the aproach basically (except the major flaw the old series had).

The repo is here [1]. I'd think it would be nice to have in 3.10. and sending a
pull request to Linus would be easiest, probably. Some non-buggy RFC patches
already slipped into subtrees, yet this won't cause any conflicts.

Looking forward to comments.

Thanks,

   Wolfram

[1] git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git devm_no_resource_check


Wolfram Sang (33):
  drivers/ata: don't check resource with devm_ioremap_resource
  drivers/char/hw_random: don't check resource with
    devm_ioremap_resource
  drivers/cpufreq: don't check resource with devm_ioremap_resource
  drivers/dma: don't check resource with devm_ioremap_resource
  drivers/gpio: don't check resource with devm_ioremap_resource
  drivers/gpu/drm/exynos: don't check resource with
    devm_ioremap_resource
  drivers/gpu/host1x/drm: don't check resource with
    devm_ioremap_resource
  drivers/i2c/busses: don't check resource with devm_ioremap_resource
  drivers/memory: don't check resource with devm_ioremap_resource
  drivers/mfd: don't check resource with devm_ioremap_resource
  drivers/misc: don't check resource with devm_ioremap_resource
  drivers/mtd/nand: don't check resource with devm_ioremap_resource
  drivers/net/ethernet/renesas: don't check resource with
    devm_ioremap_resource
  drivers/pinctrl: don't check resource with devm_ioremap_resource
  drivers/pwm: don't check resource with devm_ioremap_resource
  drivers/rtc: don't check resource with devm_ioremap_resource
  drivers/spi: don't check resource with devm_ioremap_resource
  drivers/staging/dwc2: don't check resource with devm_ioremap_resource
  drivers/staging/nvec: don't check resource with devm_ioremap_resource
  drivers/thermal: don't check resource with devm_ioremap_resource
  drivers/usb/chipidea: don't check resource with devm_ioremap_resource
  drivers/usb/gadget: don't check resource with devm_ioremap_resource
  drivers/usb/host: don't check resource with devm_ioremap_resource
  drivers/usb/phy: don't check resource with devm_ioremap_resource
  drivers/video/omap2: don't check resource with devm_ioremap_resource
  drivers/video/omap2/dss: don't check resource with
    devm_ioremap_resource
  drivers/w1/masters: don't check resource with devm_ioremap_resource
  drivers/watchdog: don't check resource with devm_ioremap_resource
  arch/arm/mach-tegra: don't check resource with devm_ioremap_resource
  arch/arm/plat-samsung: don't check resource with
    devm_ioremap_resource
  arch/mips/lantiq/xway: don't check resource with
    devm_ioremap_resource
  sound/soc/fsl: don't check resource with devm_ioremap_resource
  sound/soc/kirkwood: don't check resource with devm_ioremap_resource

 arch/arm/mach-tegra/tegra2_emc.c      |    5 -----
 arch/arm/plat-samsung/adc.c           |    5 -----
 arch/mips/lantiq/xway/gptu.c          |    4 ----
 drivers/ata/pata_ep93xx.c             |    5 -----
 drivers/char/hw_random/mxc-rnga.c     |    6 ------
 drivers/char/hw_random/omap-rng.c     |    5 -----
 drivers/cpufreq/kirkwood-cpufreq.c    |    4 ----
 drivers/dma/tegra20-apb-dma.c         |    5 -----
 drivers/gpio/gpio-mvebu.c             |    5 -----
 drivers/gpio/gpio-tegra.c             |    5 -----
 drivers/gpu/drm/exynos/exynos_hdmi.c  |    5 -----
 drivers/gpu/host1x/drm/dc.c           |    5 -----
 drivers/i2c/busses/i2c-s3c2410.c      |    5 -----
 drivers/i2c/busses/i2c-sirf.c         |    6 ------
 drivers/i2c/busses/i2c-tegra.c        |    5 -----
 drivers/memory/emif.c                 |    6 ------
 drivers/mfd/intel_msic.c              |    5 -----
 drivers/misc/atmel-ssc.c              |    5 -----
 drivers/mtd/nand/lpc32xx_mlc.c        |    5 -----
 drivers/net/ethernet/renesas/sh_eth.c |    5 -----
 drivers/pinctrl/pinctrl-coh901.c      |    5 -----
 drivers/pinctrl/pinctrl-exynos5440.c  |    5 -----
 drivers/pinctrl/pinctrl-samsung.c     |    5 -----
 drivers/pinctrl/pinctrl-xway.c        |    4 ----
 drivers/pwm/pwm-imx.c                 |    5 -----
 drivers/pwm/pwm-puv3.c                |    5 -----
 drivers/pwm/pwm-pxa.c                 |    5 -----
 drivers/pwm/pwm-tegra.c               |    5 -----
 drivers/pwm/pwm-tiecap.c              |    5 -----
 drivers/pwm/pwm-tiehrpwm.c            |    5 -----
 drivers/pwm/pwm-tipwmss.c             |    5 -----
 drivers/pwm/pwm-vt8500.c              |    5 -----
 drivers/rtc/rtc-nuc900.c              |    5 -----
 drivers/rtc/rtc-omap.c                |    5 -----
 drivers/rtc/rtc-s3c.c                 |    5 -----
 drivers/rtc/rtc-tegra.c               |    6 ------
 drivers/spi/spi-tegra20-sflash.c      |    5 -----
 drivers/staging/dwc2/platform.c       |    5 -----
 drivers/staging/nvec/nvec.c           |    5 -----
 drivers/thermal/armada_thermal.c      |   10 ----------
 drivers/thermal/dove_thermal.c        |    4 ----
 drivers/thermal/exynos_thermal.c      |    5 -----
 drivers/usb/chipidea/core.c           |    5 -----
 drivers/usb/gadget/bcm63xx_udc.c      |   10 ----------
 drivers/usb/host/ohci-nxp.c           |    6 ------
 drivers/usb/phy/phy-mv-u3d-usb.c      |    5 -----
 drivers/usb/phy/phy-mxs-usb.c         |    5 -----
 drivers/usb/phy/phy-samsung-usb2.c    |    5 -----
 drivers/usb/phy/phy-samsung-usb3.c    |    5 -----
 drivers/video/omap2/dss/hdmi.c        |    4 ----
 drivers/video/omap2/vrfb.c            |    5 -----
 drivers/w1/masters/omap_hdq.c         |    5 -----
 drivers/watchdog/ath79_wdt.c          |    5 -----
 drivers/watchdog/davinci_wdt.c        |    5 -----
 drivers/watchdog/imx2_wdt.c           |    5 -----
 sound/soc/fsl/imx-ssi.c               |    6 ------
 sound/soc/kirkwood/kirkwood-i2s.c     |    5 -----
 57 files changed, 296 deletions(-)

-- 
1.7.10.4

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

* [PATCH 01/33] drivers/ata: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
  (?)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Tejun Heo, linux-ide

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>
---
 drivers/ata/pata_ep93xx.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index c1bfaf4..980b88e 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -933,11 +933,6 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
 	}
 
 	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!mem_res) {
-		err = -ENXIO;
-		goto err_rel_gpio;
-	}
-
 	ide_base = devm_ioremap_resource(&pdev->dev, mem_res);
 	if (IS_ERR(ide_base)) {
 		err = PTR_ERR(ide_base);
-- 
1.7.10.4


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

* [PATCH 02/33] drivers/char/hw_random: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (2 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Matt Mackall, Herbert Xu, Deepak Saxena

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>
---
 drivers/char/hw_random/mxc-rnga.c |    6 ------
 drivers/char/hw_random/omap-rng.c |    5 -----
 2 files changed, 11 deletions(-)

diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c
index 4ca35e8..19a12ac 100644
--- a/drivers/char/hw_random/mxc-rnga.c
+++ b/drivers/char/hw_random/mxc-rnga.c
@@ -167,11 +167,6 @@ static int __init mxc_rnga_probe(struct platform_device *pdev)
 	clk_prepare_enable(mxc_rng->clk);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		err = -ENOENT;
-		goto err_region;
-	}
-
 	mxc_rng->mem = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(mxc_rng->mem)) {
 		err = PTR_ERR(mxc_rng->mem);
@@ -189,7 +184,6 @@ static int __init mxc_rnga_probe(struct platform_device *pdev)
 	return 0;
 
 err_ioremap:
-err_region:
 	clk_disable_unprepare(mxc_rng->clk);
 
 out:
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index 749dc16..d2903e7 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -119,11 +119,6 @@ static int omap_rng_probe(struct platform_device *pdev)
 	dev_set_drvdata(&pdev->dev, priv);
 
 	priv->mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!priv->mem_res) {
-		ret = -ENOENT;
-		goto err_ioremap;
-	}
-
 	priv->base = devm_ioremap_resource(&pdev->dev, priv->mem_res);
 	if (IS_ERR(priv->base)) {
 		ret = PTR_ERR(priv->base);
-- 
1.7.10.4


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

* [PATCH 03/33] drivers/cpufreq: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (3 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  2013-05-16 11:15   ` Viresh Kumar
  -1 siblings, 1 reply; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Rafael J. Wysocki, Viresh Kumar, cpufreq, 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>
---
 drivers/cpufreq/kirkwood-cpufreq.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c
index d36ea8d..b2644af 100644
--- a/drivers/cpufreq/kirkwood-cpufreq.c
+++ b/drivers/cpufreq/kirkwood-cpufreq.c
@@ -171,10 +171,6 @@ static int kirkwood_cpufreq_probe(struct platform_device *pdev)
 	priv.dev = &pdev->dev;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "Cannot get memory resource\n");
-		return -ENODEV;
-	}
 	priv.base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(priv.base))
 		return PTR_ERR(priv.base);
-- 
1.7.10.4


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

* [PATCH 04/33] drivers/dma: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
@ 2013-05-16 11:15     ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Wolfram Sang, Dan Williams, Vinod Koul, Stephen Warren,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

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

Signed-off-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
---
 drivers/dma/tegra20-apb-dma.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index ce19340..33f59ec 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1273,11 +1273,6 @@ static int tegra_dma_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, tdma);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "No mem resource for DMA\n");
-		return -EINVAL;
-	}
-
 	tdma->base_addr = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(tdma->base_addr))
 		return PTR_ERR(tdma->base_addr);
-- 
1.7.10.4

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

* [PATCH 04/33] drivers/dma: don't check resource with devm_ioremap_resource
@ 2013-05-16 11:15     ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Dan Williams, Vinod Koul, 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>
---
 drivers/dma/tegra20-apb-dma.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index ce19340..33f59ec 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1273,11 +1273,6 @@ static int tegra_dma_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, tdma);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "No mem resource for DMA\n");
-		return -EINVAL;
-	}
-
 	tdma->base_addr = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(tdma->base_addr))
 		return PTR_ERR(tdma->base_addr);
-- 
1.7.10.4


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

* [PATCH 05/33] drivers/gpio: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (5 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Grant Likely, Linus Walleij, 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>
---
 drivers/gpio/gpio-mvebu.c |    5 -----
 drivers/gpio/gpio-tegra.c |    5 -----
 2 files changed, 10 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index bf69a7e..3a4816a 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -619,11 +619,6 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
 	 * per-CPU registers */
 	if (soc_variant == MVEBU_GPIO_SOC_VARIANT_ARMADAXP) {
 		res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-		if (!res) {
-			dev_err(&pdev->dev, "Cannot get memory resource\n");
-			return -ENODEV;
-		}
-
 		mvchip->percpu_membase = devm_ioremap_resource(&pdev->dev,
 							       res);
 		if (IS_ERR(mvchip->percpu_membase))
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index da4cb5b..9a62672 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -463,11 +463,6 @@ static int tegra_gpio_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "Missing MEM resource\n");
-		return -ENODEV;
-	}
-
 	regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(regs))
 		return PTR_ERR(regs);
-- 
1.7.10.4

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

* [PATCH 06/33] drivers/gpu/drm/exynos: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (6 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Inki Dae, Joonyoung Shim, Seung-Woo Kim,
	Kyungmin Park, David Airlie, dri-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>
---
 drivers/gpu/drm/exynos/exynos_hdmi.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index bbfc384..6652597 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -2005,11 +2005,6 @@ static int hdmi_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		DRM_ERROR("failed to find registers\n");
-		return -ENOENT;
-	}
-
 	hdata->regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(hdata->regs))
 		return PTR_ERR(hdata->regs);
-- 
1.7.10.4


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

* [PATCH 07/33] drivers/gpu/host1x/drm: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (7 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang

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>
---
 drivers/gpu/host1x/drm/dc.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/host1x/drm/dc.c b/drivers/gpu/host1x/drm/dc.c
index 1e20603..8c04943 100644
--- a/drivers/gpu/host1x/drm/dc.c
+++ b/drivers/gpu/host1x/drm/dc.c
@@ -1128,11 +1128,6 @@ static int tegra_dc_probe(struct platform_device *pdev)
 		return err;
 
 	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!regs) {
-		dev_err(&pdev->dev, "failed to get registers\n");
-		return -ENXIO;
-	}
-
 	dc->regs = devm_ioremap_resource(&pdev->dev, regs);
 	if (IS_ERR(dc->regs))
 		return PTR_ERR(dc->regs);
-- 
1.7.10.4


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

* [PATCH 08/33] drivers/i2c/busses: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
@ 2013-05-16 11:15   ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Ben Dooks, Kukjin Kim, Barry Song, Stephen Warren,
	linux-arm-kernel, linux-samsung-soc, linux-i2c, 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>
---
 drivers/i2c/busses/i2c-s3c2410.c |    5 -----
 drivers/i2c/busses/i2c-sirf.c    |    6 ------
 drivers/i2c/busses/i2c-tegra.c   |    5 -----
 3 files changed, 16 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 6e8ee92..cab1c91 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1082,11 +1082,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
 	/* map the registers */
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "cannot find IO resource\n");
-		return -ENOENT;
-	}
-
 	i2c->regs = devm_ioremap_resource(&pdev->dev, res);
 
 	if (IS_ERR(i2c->regs))
diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c
index 5a7ad24..a63c7d5 100644
--- a/drivers/i2c/busses/i2c-sirf.c
+++ b/drivers/i2c/busses/i2c-sirf.c
@@ -303,12 +303,6 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev)
 	adap->class = I2C_CLASS_HWMON;
 
 	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (mem_res == NULL) {
-		dev_err(&pdev->dev, "Unable to get MEM resource\n");
-		err = -EINVAL;
-		goto out;
-	}
-
 	siic->base = devm_ioremap_resource(&pdev->dev, mem_res);
 	if (IS_ERR(siic->base)) {
 		err = PTR_ERR(siic->base);
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index b60ff90..9aa1b60 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -714,11 +714,6 @@ static int tegra_i2c_probe(struct platform_device *pdev)
 	int ret = 0;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "no mem resource\n");
-		return -EINVAL;
-	}
-
 	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] 96+ messages in thread

* [PATCH 08/33] drivers/i2c/busses: don't check resource with devm_ioremap_resource
@ 2013-05-16 11:15   ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/i2c/busses/i2c-s3c2410.c |    5 -----
 drivers/i2c/busses/i2c-sirf.c    |    6 ------
 drivers/i2c/busses/i2c-tegra.c   |    5 -----
 3 files changed, 16 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 6e8ee92..cab1c91 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1082,11 +1082,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
 	/* map the registers */
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "cannot find IO resource\n");
-		return -ENOENT;
-	}
-
 	i2c->regs = devm_ioremap_resource(&pdev->dev, res);
 
 	if (IS_ERR(i2c->regs))
diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c
index 5a7ad24..a63c7d5 100644
--- a/drivers/i2c/busses/i2c-sirf.c
+++ b/drivers/i2c/busses/i2c-sirf.c
@@ -303,12 +303,6 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev)
 	adap->class = I2C_CLASS_HWMON;
 
 	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (mem_res == NULL) {
-		dev_err(&pdev->dev, "Unable to get MEM resource\n");
-		err = -EINVAL;
-		goto out;
-	}
-
 	siic->base = devm_ioremap_resource(&pdev->dev, mem_res);
 	if (IS_ERR(siic->base)) {
 		err = PTR_ERR(siic->base);
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index b60ff90..9aa1b60 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -714,11 +714,6 @@ static int tegra_i2c_probe(struct platform_device *pdev)
 	int ret = 0;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "no mem resource\n");
-		return -EINVAL;
-	}
-
 	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] 96+ messages in thread

* [PATCH 09/33] drivers/memory: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (9 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang

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>
---
 drivers/memory/emif.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index cadf1cc..04644e7 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -1560,12 +1560,6 @@ static int __init_or_module emif_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, emif);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(emif->dev, "%s: error getting memory resource\n",
-			__func__);
-		goto error;
-	}
-
 	emif->base = devm_ioremap_resource(emif->dev, res);
 	if (IS_ERR(emif->base))
 		goto error;
-- 
1.7.10.4


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

* [PATCH 10/33] drivers/mfd: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (10 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Samuel Ortiz

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>
---
 drivers/mfd/intel_msic.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/mfd/intel_msic.c b/drivers/mfd/intel_msic.c
index 5be3b5e..d8d5137 100644
--- a/drivers/mfd/intel_msic.c
+++ b/drivers/mfd/intel_msic.c
@@ -414,11 +414,6 @@ static int intel_msic_probe(struct platform_device *pdev)
 	 * the clients via intel_msic_irq_read().
 	 */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "failed to get SRAM iomem resource\n");
-		return -ENODEV;
-	}
-
 	msic->irq_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(msic->irq_base))
 		return PTR_ERR(msic->irq_base);
-- 
1.7.10.4


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

* [PATCH 11/33] drivers/misc: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (11 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Arnd Bergmann, Greg Kroah-Hartman

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>
---
 drivers/misc/atmel-ssc.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index c09c28f..1abd5ad 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -154,11 +154,6 @@ static int ssc_probe(struct platform_device *pdev)
 	ssc->pdata = (struct atmel_ssc_platform_data *)plat_dat;
 
 	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!regs) {
-		dev_dbg(&pdev->dev, "no mmio resource defined\n");
-		return -ENXIO;
-	}
-
 	ssc->regs = devm_ioremap_resource(&pdev->dev, regs);
 	if (IS_ERR(ssc->regs))
 		return PTR_ERR(ssc->regs);
-- 
1.7.10.4


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

* [PATCH 12/33] drivers/mtd/nand: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
@ 2013-05-16 11:15   ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 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>
---
 drivers/mtd/nand/lpc32xx_mlc.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/mtd/nand/lpc32xx_mlc.c b/drivers/mtd/nand/lpc32xx_mlc.c
index a94facb..fd1df5e 100644
--- a/drivers/mtd/nand/lpc32xx_mlc.c
+++ b/drivers/mtd/nand/lpc32xx_mlc.c
@@ -672,11 +672,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
 	}
 
 	rc = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (rc == NULL) {
-		dev_err(&pdev->dev, "No memory resource found for device!\r\n");
-		return -ENXIO;
-	}
-
 	host->io_base = devm_ioremap_resource(&pdev->dev, rc);
 	if (IS_ERR(host->io_base))
 		return PTR_ERR(host->io_base);
-- 
1.7.10.4


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

* [PATCH 12/33] drivers/mtd/nand: don't check resource with devm_ioremap_resource
@ 2013-05-16 11:15   ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-mtd, David Woodhouse, Wolfram Sang

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>
---
 drivers/mtd/nand/lpc32xx_mlc.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/mtd/nand/lpc32xx_mlc.c b/drivers/mtd/nand/lpc32xx_mlc.c
index a94facb..fd1df5e 100644
--- a/drivers/mtd/nand/lpc32xx_mlc.c
+++ b/drivers/mtd/nand/lpc32xx_mlc.c
@@ -672,11 +672,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
 	}
 
 	rc = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (rc == NULL) {
-		dev_err(&pdev->dev, "No memory resource found for device!\r\n");
-		return -ENXIO;
-	}
-
 	host->io_base = devm_ioremap_resource(&pdev->dev, rc);
 	if (IS_ERR(host->io_base))
 		return PTR_ERR(host->io_base);
-- 
1.7.10.4

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

* [PATCH 13/33] drivers/net/ethernet/renesas: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (13 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  2013-05-16 15:37   ` Joe Perches
  -1 siblings, 1 reply; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, 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>
---
 drivers/net/ethernet/renesas/sh_eth.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 33dc6f2..42e9dd0 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -2745,11 +2745,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
 	if (mdp->cd->tsu) {
 		struct resource *rtsu;
 		rtsu = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-		if (!rtsu) {
-			dev_err(&pdev->dev, "Not found TSU resource\n");
-			ret = -ENODEV;
-			goto out_release;
-		}
 		mdp->tsu_addr = devm_ioremap_resource(&pdev->dev, rtsu);
 		if (IS_ERR(mdp->tsu_addr)) {
 			ret = PTR_ERR(mdp->tsu_addr);
-- 
1.7.10.4


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

* [PATCH 14/33] drivers/pinctrl: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (14 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  2013-05-20 11:39   ` Linus Walleij
  -1 siblings, 1 reply; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 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>
---
 drivers/pinctrl/pinctrl-coh901.c     |    5 -----
 drivers/pinctrl/pinctrl-exynos5440.c |    5 -----
 drivers/pinctrl/pinctrl-samsung.c    |    5 -----
 drivers/pinctrl/pinctrl-xway.c       |    4 ----
 4 files changed, 19 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c
index edde3ac..a67af41 100644
--- a/drivers/pinctrl/pinctrl-coh901.c
+++ b/drivers/pinctrl/pinctrl-coh901.c
@@ -713,11 +713,6 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
 	gpio->dev = &pdev->dev;
 
 	memres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!memres) {
-		dev_err(gpio->dev, "could not get GPIO memory resource\n");
-		return -ENODEV;
-	}
-
 	gpio->base = devm_ioremap_resource(&pdev->dev, memres);
 	if (IS_ERR(gpio->base))
 		return PTR_ERR(gpio->base);
diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c
index 6038503..32a48f4 100644
--- a/drivers/pinctrl/pinctrl-exynos5440.c
+++ b/drivers/pinctrl/pinctrl-exynos5440.c
@@ -1000,11 +1000,6 @@ static int exynos5440_pinctrl_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(dev, "cannot find IO resource\n");
-		return -ENOENT;
-	}
-
 	priv->reg_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(priv->reg_base))
 		return PTR_ERR(priv->reg_base);
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c
index 9763668..055d016 100644
--- a/drivers/pinctrl/pinctrl-samsung.c
+++ b/drivers/pinctrl/pinctrl-samsung.c
@@ -932,11 +932,6 @@ static int samsung_pinctrl_probe(struct platform_device *pdev)
 	drvdata->dev = dev;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(dev, "cannot find IO resource\n");
-		return -ENOENT;
-	}
-
 	drvdata->virt_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(drvdata->virt_base))
 		return PTR_ERR(drvdata->virt_base);
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c
index f2977cf..e92132c 100644
--- a/drivers/pinctrl/pinctrl-xway.c
+++ b/drivers/pinctrl/pinctrl-xway.c
@@ -716,10 +716,6 @@ static int pinmux_xway_probe(struct platform_device *pdev)
 
 	/* get and remap our register range */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "Failed to get resource\n");
-		return -ENOENT;
-	}
 	xway_info.membase[0] = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(xway_info.membase[0]))
 		return PTR_ERR(xway_info.membase[0]);
-- 
1.7.10.4


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

* [PATCH 15/33] drivers/pwm: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
@ 2013-05-16 11:15   ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Thierry Reding, Stephen Warren, Tony Prisk,
	linux-tegra, linux-arm-kernel

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>
---
 drivers/pwm/pwm-imx.c      |    5 -----
 drivers/pwm/pwm-puv3.c     |    5 -----
 drivers/pwm/pwm-pxa.c      |    5 -----
 drivers/pwm/pwm-tegra.c    |    5 -----
 drivers/pwm/pwm-tiecap.c   |    5 -----
 drivers/pwm/pwm-tiehrpwm.c |    5 -----
 drivers/pwm/pwm-tipwmss.c  |    5 -----
 drivers/pwm/pwm-vt8500.c   |    5 -----
 8 files changed, 40 deletions(-)

diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index ec28798..c938bae 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -265,11 +265,6 @@ static int imx_pwm_probe(struct platform_device *pdev)
 	imx->chip.npwm = 1;
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (r == NULL) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	imx->mmio_base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(imx->mmio_base))
 		return PTR_ERR(imx->mmio_base);
diff --git a/drivers/pwm/pwm-puv3.c b/drivers/pwm/pwm-puv3.c
index d1eb499..ed6007b 100644
--- a/drivers/pwm/pwm-puv3.c
+++ b/drivers/pwm/pwm-puv3.c
@@ -117,11 +117,6 @@ static int pwm_probe(struct platform_device *pdev)
 		return PTR_ERR(puv3->clk);
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (r == NULL) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	puv3->base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(puv3->base))
 		return PTR_ERR(puv3->base);
diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c
index dee6ab55..dc97175 100644
--- a/drivers/pwm/pwm-pxa.c
+++ b/drivers/pwm/pwm-pxa.c
@@ -147,11 +147,6 @@ static int pwm_probe(struct platform_device *pdev)
 	pwm->chip.npwm = (id->driver_data & HAS_SECONDARY_PWM) ? 2 : 1;
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (r == NULL) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(pwm->mmio_base))
 		return PTR_ERR(pwm->mmio_base);
diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c
index 3d75f4a..a540293 100644
--- a/drivers/pwm/pwm-tegra.c
+++ b/drivers/pwm/pwm-tegra.c
@@ -181,11 +181,6 @@ static int tegra_pwm_probe(struct platform_device *pdev)
 	pwm->dev = &pdev->dev;
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r) {
-		dev_err(&pdev->dev, "no memory resources defined\n");
-		return -ENODEV;
-	}
-
 	pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(pwm->mmio_base))
 		return PTR_ERR(pwm->mmio_base);
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c
index 0d65fb2..72ca42d 100644
--- a/drivers/pwm/pwm-tiecap.c
+++ b/drivers/pwm/pwm-tiecap.c
@@ -240,11 +240,6 @@ static int ecap_pwm_probe(struct platform_device *pdev)
 	pc->chip.npwm = 1;
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	pc->mmio_base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(pc->mmio_base))
 		return PTR_ERR(pc->mmio_base);
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 6a21759..48a485c 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -471,11 +471,6 @@ static int ehrpwm_pwm_probe(struct platform_device *pdev)
 	pc->chip.npwm = NUM_PWM_CHANNEL;
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	pc->mmio_base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(pc->mmio_base))
 		return PTR_ERR(pc->mmio_base);
diff --git a/drivers/pwm/pwm-tipwmss.c b/drivers/pwm/pwm-tipwmss.c
index c9c3d3a..3b119bc 100644
--- a/drivers/pwm/pwm-tipwmss.c
+++ b/drivers/pwm/pwm-tipwmss.c
@@ -70,11 +70,6 @@ static int pwmss_probe(struct platform_device *pdev)
 	mutex_init(&info->pwmss_lock);
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	info->mmio_base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(info->mmio_base))
 		return PTR_ERR(info->mmio_base);
diff --git a/drivers/pwm/pwm-vt8500.c b/drivers/pwm/pwm-vt8500.c
index 69effd1..323125a 100644
--- a/drivers/pwm/pwm-vt8500.c
+++ b/drivers/pwm/pwm-vt8500.c
@@ -230,11 +230,6 @@ static int vt8500_pwm_probe(struct platform_device *pdev)
 	}
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (r == NULL) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	chip->base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(chip->base))
 		return PTR_ERR(chip->base);
-- 
1.7.10.4

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

* [PATCH 15/33] drivers/pwm: don't check resource with devm_ioremap_resource
@ 2013-05-16 11:15   ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/pwm/pwm-imx.c      |    5 -----
 drivers/pwm/pwm-puv3.c     |    5 -----
 drivers/pwm/pwm-pxa.c      |    5 -----
 drivers/pwm/pwm-tegra.c    |    5 -----
 drivers/pwm/pwm-tiecap.c   |    5 -----
 drivers/pwm/pwm-tiehrpwm.c |    5 -----
 drivers/pwm/pwm-tipwmss.c  |    5 -----
 drivers/pwm/pwm-vt8500.c   |    5 -----
 8 files changed, 40 deletions(-)

diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index ec28798..c938bae 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -265,11 +265,6 @@ static int imx_pwm_probe(struct platform_device *pdev)
 	imx->chip.npwm = 1;
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (r == NULL) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	imx->mmio_base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(imx->mmio_base))
 		return PTR_ERR(imx->mmio_base);
diff --git a/drivers/pwm/pwm-puv3.c b/drivers/pwm/pwm-puv3.c
index d1eb499..ed6007b 100644
--- a/drivers/pwm/pwm-puv3.c
+++ b/drivers/pwm/pwm-puv3.c
@@ -117,11 +117,6 @@ static int pwm_probe(struct platform_device *pdev)
 		return PTR_ERR(puv3->clk);
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (r == NULL) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	puv3->base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(puv3->base))
 		return PTR_ERR(puv3->base);
diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c
index dee6ab55..dc97175 100644
--- a/drivers/pwm/pwm-pxa.c
+++ b/drivers/pwm/pwm-pxa.c
@@ -147,11 +147,6 @@ static int pwm_probe(struct platform_device *pdev)
 	pwm->chip.npwm = (id->driver_data & HAS_SECONDARY_PWM) ? 2 : 1;
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (r == NULL) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(pwm->mmio_base))
 		return PTR_ERR(pwm->mmio_base);
diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c
index 3d75f4a..a540293 100644
--- a/drivers/pwm/pwm-tegra.c
+++ b/drivers/pwm/pwm-tegra.c
@@ -181,11 +181,6 @@ static int tegra_pwm_probe(struct platform_device *pdev)
 	pwm->dev = &pdev->dev;
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r) {
-		dev_err(&pdev->dev, "no memory resources defined\n");
-		return -ENODEV;
-	}
-
 	pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(pwm->mmio_base))
 		return PTR_ERR(pwm->mmio_base);
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c
index 0d65fb2..72ca42d 100644
--- a/drivers/pwm/pwm-tiecap.c
+++ b/drivers/pwm/pwm-tiecap.c
@@ -240,11 +240,6 @@ static int ecap_pwm_probe(struct platform_device *pdev)
 	pc->chip.npwm = 1;
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	pc->mmio_base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(pc->mmio_base))
 		return PTR_ERR(pc->mmio_base);
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 6a21759..48a485c 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -471,11 +471,6 @@ static int ehrpwm_pwm_probe(struct platform_device *pdev)
 	pc->chip.npwm = NUM_PWM_CHANNEL;
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	pc->mmio_base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(pc->mmio_base))
 		return PTR_ERR(pc->mmio_base);
diff --git a/drivers/pwm/pwm-tipwmss.c b/drivers/pwm/pwm-tipwmss.c
index c9c3d3a..3b119bc 100644
--- a/drivers/pwm/pwm-tipwmss.c
+++ b/drivers/pwm/pwm-tipwmss.c
@@ -70,11 +70,6 @@ static int pwmss_probe(struct platform_device *pdev)
 	mutex_init(&info->pwmss_lock);
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	info->mmio_base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(info->mmio_base))
 		return PTR_ERR(info->mmio_base);
diff --git a/drivers/pwm/pwm-vt8500.c b/drivers/pwm/pwm-vt8500.c
index 69effd1..323125a 100644
--- a/drivers/pwm/pwm-vt8500.c
+++ b/drivers/pwm/pwm-vt8500.c
@@ -230,11 +230,6 @@ static int vt8500_pwm_probe(struct platform_device *pdev)
 	}
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (r == NULL) {
-		dev_err(&pdev->dev, "no memory resource defined\n");
-		return -ENODEV;
-	}
-
 	chip->base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(chip->base))
 		return PTR_ERR(chip->base);
-- 
1.7.10.4

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

* [PATCH 16/33] drivers/rtc: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
  (?)
@ 2013-05-16 11:15   ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alessandro Zummo, Wan ZongShun, rtc-linux, Stephen Warren,
	Wolfram Sang, linux-tegra, linux-arm-kernel

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>
---
 drivers/rtc/rtc-nuc900.c |    5 -----
 drivers/rtc/rtc-omap.c   |    5 -----
 drivers/rtc/rtc-s3c.c    |    5 -----
 drivers/rtc/rtc-tegra.c  |    6 ------
 4 files changed, 21 deletions(-)

diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c
index f5dfb6e..d592e2f 100644
--- a/drivers/rtc/rtc-nuc900.c
+++ b/drivers/rtc/rtc-nuc900.c
@@ -234,11 +234,6 @@ static int __init nuc900_rtc_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "platform_get_resource failed\n");
-		return -ENXIO;
-	}
-
 	nuc900_rtc->rtc_reg = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(nuc900_rtc->rtc_reg))
 		return PTR_ERR(nuc900_rtc->rtc_reg);
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index 4e1bdb8..b0ba3fc 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -347,11 +347,6 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		pr_debug("%s: RTC resource data missing\n", pdev->name);
-		return -ENOENT;
-	}
-
 	rtc_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(rtc_base))
 		return PTR_ERR(rtc_base);
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 14040b2..0b495e8 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -477,11 +477,6 @@ static int s3c_rtc_probe(struct platform_device *pdev)
 	/* get the memory region */
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "failed to get memory region resource\n");
-		return -ENOENT;
-	}
-
 	s3c_rtc_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(s3c_rtc_base))
 		return PTR_ERR(s3c_rtc_base);
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index a34315d..76af92a 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -322,12 +322,6 @@ static int __init tegra_rtc_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev,
-			"Unable to allocate resources for device.\n");
-		return -EBUSY;
-	}
-
 	info->rtc_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(info->rtc_base))
 		return PTR_ERR(info->rtc_base);
-- 
1.7.10.4

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

* [PATCH 16/33] drivers/rtc: don't check resource with devm_ioremap_resource
@ 2013-05-16 11:15   ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Wan ZongShun, Alessandro Zummo, Stephen Warren,
	linux-arm-kernel, rtc-linux, 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>
---
 drivers/rtc/rtc-nuc900.c |    5 -----
 drivers/rtc/rtc-omap.c   |    5 -----
 drivers/rtc/rtc-s3c.c    |    5 -----
 drivers/rtc/rtc-tegra.c  |    6 ------
 4 files changed, 21 deletions(-)

diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c
index f5dfb6e..d592e2f 100644
--- a/drivers/rtc/rtc-nuc900.c
+++ b/drivers/rtc/rtc-nuc900.c
@@ -234,11 +234,6 @@ static int __init nuc900_rtc_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "platform_get_resource failed\n");
-		return -ENXIO;
-	}
-
 	nuc900_rtc->rtc_reg = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(nuc900_rtc->rtc_reg))
 		return PTR_ERR(nuc900_rtc->rtc_reg);
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index 4e1bdb8..b0ba3fc 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -347,11 +347,6 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		pr_debug("%s: RTC resource data missing\n", pdev->name);
-		return -ENOENT;
-	}
-
 	rtc_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(rtc_base))
 		return PTR_ERR(rtc_base);
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 14040b2..0b495e8 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -477,11 +477,6 @@ static int s3c_rtc_probe(struct platform_device *pdev)
 	/* get the memory region */
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "failed to get memory region resource\n");
-		return -ENOENT;
-	}
-
 	s3c_rtc_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(s3c_rtc_base))
 		return PTR_ERR(s3c_rtc_base);
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index a34315d..76af92a 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -322,12 +322,6 @@ static int __init tegra_rtc_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev,
-			"Unable to allocate resources for device.\n");
-		return -EBUSY;
-	}
-
 	info->rtc_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(info->rtc_base))
 		return PTR_ERR(info->rtc_base);
-- 
1.7.10.4


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

* [PATCH 16/33] drivers/rtc: don't check resource with devm_ioremap_resource
@ 2013-05-16 11:15   ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 drivers/rtc/rtc-nuc900.c |    5 -----
 drivers/rtc/rtc-omap.c   |    5 -----
 drivers/rtc/rtc-s3c.c    |    5 -----
 drivers/rtc/rtc-tegra.c  |    6 ------
 4 files changed, 21 deletions(-)

diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c
index f5dfb6e..d592e2f 100644
--- a/drivers/rtc/rtc-nuc900.c
+++ b/drivers/rtc/rtc-nuc900.c
@@ -234,11 +234,6 @@ static int __init nuc900_rtc_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "platform_get_resource failed\n");
-		return -ENXIO;
-	}
-
 	nuc900_rtc->rtc_reg = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(nuc900_rtc->rtc_reg))
 		return PTR_ERR(nuc900_rtc->rtc_reg);
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index 4e1bdb8..b0ba3fc 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -347,11 +347,6 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		pr_debug("%s: RTC resource data missing\n", pdev->name);
-		return -ENOENT;
-	}
-
 	rtc_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(rtc_base))
 		return PTR_ERR(rtc_base);
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 14040b2..0b495e8 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -477,11 +477,6 @@ static int s3c_rtc_probe(struct platform_device *pdev)
 	/* get the memory region */
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "failed to get memory region resource\n");
-		return -ENOENT;
-	}
-
 	s3c_rtc_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(s3c_rtc_base))
 		return PTR_ERR(s3c_rtc_base);
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index a34315d..76af92a 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -322,12 +322,6 @@ static int __init tegra_rtc_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev,
-			"Unable to allocate resources for device.\n");
-		return -EBUSY;
-	}
-
 	info->rtc_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(info->rtc_base))
 		return PTR_ERR(info->rtc_base);
-- 
1.7.10.4

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

* [PATCH 17/33] drivers/spi: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
@ 2013-05-16 11:15     ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Stephen Warren, Wolfram Sang, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	Mark Brown, Grant Likely,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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

Signed-off-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
---
 drivers/spi/spi-tegra20-sflash.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c
index d65c000..09df8e2 100644
--- a/drivers/spi/spi-tegra20-sflash.c
+++ b/drivers/spi/spi-tegra20-sflash.c
@@ -489,11 +489,6 @@ static int tegra_sflash_probe(struct platform_device *pdev)
 	tegra_sflash_parse_dt(tsd);
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r) {
-		dev_err(&pdev->dev, "No IO memory resource\n");
-		ret = -ENODEV;
-		goto exit_free_master;
-	}
 	tsd->base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(tsd->base)) {
 		ret = PTR_ERR(tsd->base);
-- 
1.7.10.4


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d

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

* [PATCH 17/33] drivers/spi: don't check resource with devm_ioremap_resource
@ 2013-05-16 11:15     ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Mark Brown, Grant Likely, Stephen Warren,
	spi-devel-general, 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>
---
 drivers/spi/spi-tegra20-sflash.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c
index d65c000..09df8e2 100644
--- a/drivers/spi/spi-tegra20-sflash.c
+++ b/drivers/spi/spi-tegra20-sflash.c
@@ -489,11 +489,6 @@ static int tegra_sflash_probe(struct platform_device *pdev)
 	tegra_sflash_parse_dt(tsd);
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r) {
-		dev_err(&pdev->dev, "No IO memory resource\n");
-		ret = -ENODEV;
-		goto exit_free_master;
-	}
 	tsd->base = devm_ioremap_resource(&pdev->dev, r);
 	if (IS_ERR(tsd->base)) {
 		ret = PTR_ERR(tsd->base);
-- 
1.7.10.4


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

* [PATCH 18/33] drivers/staging/dwc2: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (17 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Paul Zimmerman, Greg Kroah-Hartman, linux-usb, 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>
---
 drivers/staging/dwc2/platform.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/dwc2/platform.c b/drivers/staging/dwc2/platform.c
index 1f3d581..b610960 100644
--- a/drivers/staging/dwc2/platform.c
+++ b/drivers/staging/dwc2/platform.c
@@ -102,11 +102,6 @@ static int dwc2_driver_probe(struct platform_device *dev)
 	}
 
 	res = platform_get_resource(dev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&dev->dev, "missing memory base resource\n");
-		return -EINVAL;
-	}
-
 	hsotg->regs = devm_ioremap_resource(&dev->dev, res);
 	if (IS_ERR(hsotg->regs))
 		return PTR_ERR(hsotg->regs);
-- 
1.7.10.4


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

* [PATCH 19/33] drivers/staging/nvec: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
@ 2013-05-16 11:15   ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: devel, Wolfram Sang, Greg Kroah-Hartman, linux-tegra, ac100

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>
---
 drivers/staging/nvec/nvec.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index a88959f..863b22e 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -800,11 +800,6 @@ static int tegra_nvec_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "no mem resource?\n");
-		return -ENODEV;
-	}
-
 	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] 96+ messages in thread

* [PATCH 19/33] drivers/staging/nvec: don't check resource with devm_ioremap_resource
@ 2013-05-16 11:15   ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Julian Andres Klode, Marc Dietrich,
	Greg Kroah-Hartman, ac100, linux-tegra, 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>
---
 drivers/staging/nvec/nvec.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index a88959f..863b22e 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -800,11 +800,6 @@ static int tegra_nvec_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "no mem resource?\n");
-		return -ENODEV;
-	}
-
 	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] 96+ messages in thread

* [PATCH 20/33] drivers/thermal: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (19 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  2013-05-20 15:38   ` Zhang, Rui
  -1 siblings, 1 reply; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Zhang Rui, Eduardo Valentin, 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>
---
 drivers/thermal/armada_thermal.c |   10 ----------
 drivers/thermal/dove_thermal.c   |    4 ----
 drivers/thermal/exynos_thermal.c |    5 -----
 3 files changed, 19 deletions(-)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 5b4d75f..54ffd64 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -169,21 +169,11 @@ static int armada_thermal_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "Failed to get platform resource\n");
-		return -ENODEV;
-	}
-
 	priv->sensor = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(priv->sensor))
 		return PTR_ERR(priv->sensor);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	if (!res) {
-		dev_err(&pdev->dev, "Failed to get platform resource\n");
-		return -ENODEV;
-	}
-
 	priv->control = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(priv->control))
 		return PTR_ERR(priv->control);
diff --git a/drivers/thermal/dove_thermal.c b/drivers/thermal/dove_thermal.c
index 4b15a5f..a088d13 100644
--- a/drivers/thermal/dove_thermal.c
+++ b/drivers/thermal/dove_thermal.c
@@ -149,10 +149,6 @@ static int dove_thermal_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->sensor);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	if (!res) {
-		dev_err(&pdev->dev, "Failed to get platform resource\n");
-		return -ENODEV;
-	}
 	priv->control = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(priv->control))
 		return PTR_ERR(priv->control);
diff --git a/drivers/thermal/exynos_thermal.c b/drivers/thermal/exynos_thermal.c
index d20ce9e..788b1dd 100644
--- a/drivers/thermal/exynos_thermal.c
+++ b/drivers/thermal/exynos_thermal.c
@@ -925,11 +925,6 @@ static int exynos_tmu_probe(struct platform_device *pdev)
 	INIT_WORK(&data->irq_work, exynos_tmu_work);
 
 	data->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!data->mem) {
-		dev_err(&pdev->dev, "Failed to get platform resource\n");
-		return -ENOENT;
-	}
-
 	data->base = devm_ioremap_resource(&pdev->dev, data->mem);
 	if (IS_ERR(data->base))
 		return PTR_ERR(data->base);
-- 
1.7.10.4


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

* [PATCH 21/33] drivers/usb/chipidea: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (20 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  2013-05-16 11:29   ` Alexander Shishkin
  -1 siblings, 1 reply; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Alexander Shishkin, 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>
---
 drivers/usb/chipidea/core.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 450107e..49b098b 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -370,11 +370,6 @@ static int ci_hdrc_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(dev, "missing resource\n");
-		return -ENODEV;
-	}
-
 	base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
-- 
1.7.10.4


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

* [PATCH 22/33] drivers/usb/gadget: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (21 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 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>
---
 drivers/usb/gadget/bcm63xx_udc.c |   10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/usb/gadget/bcm63xx_udc.c b/drivers/usb/gadget/bcm63xx_udc.c
index 6e65182..7922977 100644
--- a/drivers/usb/gadget/bcm63xx_udc.c
+++ b/drivers/usb/gadget/bcm63xx_udc.c
@@ -2334,21 +2334,11 @@ static int bcm63xx_udc_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(dev, "error finding USBD resource\n");
-		return -ENXIO;
-	}
-
 	udc->usbd_regs = devm_ioremap_resource(dev, res);
 	if (IS_ERR(udc->usbd_regs))
 		return PTR_ERR(udc->usbd_regs);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	if (!res) {
-		dev_err(dev, "error finding IUDMA resource\n");
-		return -ENXIO;
-	}
-
 	udc->iudma_regs = devm_ioremap_resource(dev, res);
 	if (IS_ERR(udc->iudma_regs))
 		return PTR_ERR(udc->iudma_regs);
-- 
1.7.10.4


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

* [PATCH 23/33] drivers/usb/host: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (22 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  2013-05-16 14:27   ` Alan Stern
  -1 siblings, 1 reply; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Alan Stern, 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>
---
 drivers/usb/host/ohci-nxp.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
index f4988fb..f303cb0 100644
--- a/drivers/usb/host/ohci-nxp.c
+++ b/drivers/usb/host/ohci-nxp.c
@@ -300,12 +300,6 @@ static int usb_hcd_nxp_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "Failed to get MEM resource\n");
-		ret =  -ENOMEM;
-		goto out8;
-	}
-
 	hcd->regs = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(hcd->regs)) {
 		ret = PTR_ERR(hcd->regs);
-- 
1.7.10.4


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

* [PATCH 24/33] drivers/usb/phy: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (23 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 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>
---
 drivers/usb/phy/phy-mv-u3d-usb.c   |    5 -----
 drivers/usb/phy/phy-mxs-usb.c      |    5 -----
 drivers/usb/phy/phy-samsung-usb2.c |    5 -----
 drivers/usb/phy/phy-samsung-usb3.c |    5 -----
 4 files changed, 20 deletions(-)

diff --git a/drivers/usb/phy/phy-mv-u3d-usb.c b/drivers/usb/phy/phy-mv-u3d-usb.c
index f7838a4..1568ea6 100644
--- a/drivers/usb/phy/phy-mv-u3d-usb.c
+++ b/drivers/usb/phy/phy-mv-u3d-usb.c
@@ -278,11 +278,6 @@ static int mv_u3d_phy_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(dev, "missing mem resource\n");
-		return -ENODEV;
-	}
-
 	phy_base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(phy_base))
 		return PTR_ERR(phy_base);
diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
index 9d4381e..eb25dd2 100644
--- a/drivers/usb/phy/phy-mxs-usb.c
+++ b/drivers/usb/phy/phy-mxs-usb.c
@@ -130,11 +130,6 @@ static int mxs_phy_probe(struct platform_device *pdev)
 	int ret;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "can't get device resources\n");
-		return -ENOENT;
-	}
-
 	base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
diff --git a/drivers/usb/phy/phy-samsung-usb2.c b/drivers/usb/phy/phy-samsung-usb2.c
index 45ffe03..9d5e273 100644
--- a/drivers/usb/phy/phy-samsung-usb2.c
+++ b/drivers/usb/phy/phy-samsung-usb2.c
@@ -363,11 +363,6 @@ static int samsung_usb2phy_probe(struct platform_device *pdev)
 	int ret;
 
 	phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!phy_mem) {
-		dev_err(dev, "%s: missing mem resource\n", __func__);
-		return -ENODEV;
-	}
-
 	phy_base = devm_ioremap_resource(dev, phy_mem);
 	if (IS_ERR(phy_base))
 		return PTR_ERR(phy_base);
diff --git a/drivers/usb/phy/phy-samsung-usb3.c b/drivers/usb/phy/phy-samsung-usb3.c
index 133f3d0..5a9efcb 100644
--- a/drivers/usb/phy/phy-samsung-usb3.c
+++ b/drivers/usb/phy/phy-samsung-usb3.c
@@ -239,11 +239,6 @@ static int samsung_usb3phy_probe(struct platform_device *pdev)
 	int ret;
 
 	phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!phy_mem) {
-		dev_err(dev, "%s: missing mem resource\n", __func__);
-		return -ENODEV;
-	}
-
 	phy_base = devm_ioremap_resource(dev, phy_mem);
 	if (IS_ERR(phy_base))
 		return PTR_ERR(phy_base);
-- 
1.7.10.4


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

* [PATCH 25/33] drivers/video/omap2: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
@ 2013-05-16 11:15   ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Tomi Valkeinen, Florian Tobias Schandinat,
	linux-omap, linux-fbdev

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>
---
 drivers/video/omap2/vrfb.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/video/omap2/vrfb.c b/drivers/video/omap2/vrfb.c
index 5261229..f346b02 100644
--- a/drivers/video/omap2/vrfb.c
+++ b/drivers/video/omap2/vrfb.c
@@ -353,11 +353,6 @@ static int __init vrfb_probe(struct platform_device *pdev)
 	/* first resource is the register res, the rest are vrfb contexts */
 
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!mem) {
-		dev_err(&pdev->dev, "can't get vrfb base address\n");
-		return -EINVAL;
-	}
-
 	vrfb_base = devm_ioremap_resource(&pdev->dev, mem);
 	if (IS_ERR(vrfb_base))
 		return PTR_ERR(vrfb_base);
-- 
1.7.10.4


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

* [PATCH 25/33] drivers/video/omap2: don't check resource with devm_ioremap_resource
@ 2013-05-16 11:15   ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Tomi Valkeinen, Florian Tobias Schandinat,
	linux-omap, linux-fbdev

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>
---
 drivers/video/omap2/vrfb.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/video/omap2/vrfb.c b/drivers/video/omap2/vrfb.c
index 5261229..f346b02 100644
--- a/drivers/video/omap2/vrfb.c
+++ b/drivers/video/omap2/vrfb.c
@@ -353,11 +353,6 @@ static int __init vrfb_probe(struct platform_device *pdev)
 	/* first resource is the register res, the rest are vrfb contexts */
 
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!mem) {
-		dev_err(&pdev->dev, "can't get vrfb base address\n");
-		return -EINVAL;
-	}
-
 	vrfb_base = devm_ioremap_resource(&pdev->dev, mem);
 	if (IS_ERR(vrfb_base))
 		return PTR_ERR(vrfb_base);
-- 
1.7.10.4


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

* [PATCH 26/33] drivers/video/omap2/dss: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
@ 2013-05-16 11:15   ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Tomi Valkeinen, Florian Tobias Schandinat,
	linux-omap, linux-fbdev

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>
---
 drivers/video/omap2/dss/hdmi.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 17f4d55..a109934 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1065,10 +1065,6 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev)
 	mutex_init(&hdmi.ip_data.lock);
 
 	res = platform_get_resource(hdmi.pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		DSSERR("can't get IORESOURCE_MEM HDMI\n");
-		return -EINVAL;
-	}
 
 	/* Base address taken from platform */
 	hdmi.ip_data.base_wp = devm_ioremap_resource(&pdev->dev, res);
-- 
1.7.10.4


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

* [PATCH 26/33] drivers/video/omap2/dss: don't check resource with devm_ioremap_resource
@ 2013-05-16 11:15   ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Tomi Valkeinen, Florian Tobias Schandinat,
	linux-omap, linux-fbdev

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>
---
 drivers/video/omap2/dss/hdmi.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 17f4d55..a109934 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -1065,10 +1065,6 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev)
 	mutex_init(&hdmi.ip_data.lock);
 
 	res = platform_get_resource(hdmi.pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		DSSERR("can't get IORESOURCE_MEM HDMI\n");
-		return -EINVAL;
-	}
 
 	/* Base address taken from platform */
 	hdmi.ip_data.base_wp = devm_ioremap_resource(&pdev->dev, res);
-- 
1.7.10.4


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

* [PATCH 27/33] drivers/w1/masters: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (26 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Evgeniy Polyakov

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>
---
 drivers/w1/masters/omap_hdq.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index db2390a..6e94d8dd 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -555,11 +555,6 @@ static int omap_hdq_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, hdq_data);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_dbg(&pdev->dev, "unable to get resource\n");
-		return -ENXIO;
-	}
-
 	hdq_data->hdq_base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(hdq_data->hdq_base))
 		return PTR_ERR(hdq_data->hdq_base);
-- 
1.7.10.4


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

* Re: [PATCH 03/33] drivers/cpufreq: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` [PATCH 03/33] drivers/cpufreq: " Wolfram Sang
@ 2013-05-16 11:15   ` Viresh Kumar
  0 siblings, 0 replies; 96+ messages in thread
From: Viresh Kumar @ 2013-05-16 11:15 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, Rafael J. Wysocki, cpufreq, linux-pm

On 16 May 2013 16:45, 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>
> ---
>  drivers/cpufreq/kirkwood-cpufreq.c |    4 ----
>  1 file changed, 4 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

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

* [PATCH 28/33] drivers/watchdog: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (27 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, Wim Van Sebroeck, 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>
---
 drivers/watchdog/ath79_wdt.c   |    5 -----
 drivers/watchdog/davinci_wdt.c |    5 -----
 drivers/watchdog/imx2_wdt.c    |    5 -----
 3 files changed, 15 deletions(-)

diff --git a/drivers/watchdog/ath79_wdt.c b/drivers/watchdog/ath79_wdt.c
index d184c48..37cb09b 100644
--- a/drivers/watchdog/ath79_wdt.c
+++ b/drivers/watchdog/ath79_wdt.c
@@ -248,11 +248,6 @@ static int ath79_wdt_probe(struct platform_device *pdev)
 		return -EBUSY;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "no memory resource found\n");
-		return -EINVAL;
-	}
-
 	wdt_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(wdt_base))
 		return PTR_ERR(wdt_base);
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index 100d4fb..bead774 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -217,11 +217,6 @@ static int davinci_wdt_probe(struct platform_device *pdev)
 	dev_info(dev, "heartbeat %d sec\n", heartbeat);
 
 	wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (wdt_mem == NULL) {
-		dev_err(dev, "failed to get memory region resource\n");
-		return -ENOENT;
-	}
-
 	wdt_base = devm_ioremap_resource(dev, wdt_mem);
 	if (IS_ERR(wdt_base))
 		return PTR_ERR(wdt_base);
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index ff90882..62946c2 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -257,11 +257,6 @@ static int __init imx2_wdt_probe(struct platform_device *pdev)
 	struct resource *res;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "can't get device resources\n");
-		return -ENODEV;
-	}
-
 	imx2_wdt.base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(imx2_wdt.base))
 		return PTR_ERR(imx2_wdt.base);
-- 
1.7.10.4


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

* [PATCH 29/33] arch/arm/mach-tegra: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
@ 2013-05-16 11:15   ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Russell King, Stephen Warren, linux-arm-kernel,
	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>
---
 arch/arm/mach-tegra/tegra2_emc.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm/mach-tegra/tegra2_emc.c b/arch/arm/mach-tegra/tegra2_emc.c
index 9e8bdfa..31e69a0 100644
--- a/arch/arm/mach-tegra/tegra2_emc.c
+++ b/arch/arm/mach-tegra/tegra2_emc.c
@@ -307,11 +307,6 @@ static int tegra_emc_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "missing register base\n");
-		return -ENOMEM;
-	}
-
 	emc_regbase = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(emc_regbase))
 		return PTR_ERR(emc_regbase);
-- 
1.7.10.4

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

* [PATCH 29/33] arch/arm/mach-tegra: don't check resource with devm_ioremap_resource
@ 2013-05-16 11:15   ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 arch/arm/mach-tegra/tegra2_emc.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm/mach-tegra/tegra2_emc.c b/arch/arm/mach-tegra/tegra2_emc.c
index 9e8bdfa..31e69a0 100644
--- a/arch/arm/mach-tegra/tegra2_emc.c
+++ b/arch/arm/mach-tegra/tegra2_emc.c
@@ -307,11 +307,6 @@ static int tegra_emc_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "missing register base\n");
-		return -ENOMEM;
-	}
-
 	emc_regbase = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(emc_regbase))
 		return PTR_ERR(emc_regbase);
-- 
1.7.10.4

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

* [PATCH 30/33] arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
@ 2013-05-16 11:15   ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Ben Dooks, Kukjin Kim, Russell King,
	linux-arm-kernel, linux-samsung-soc

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>
---
 arch/arm/plat-samsung/adc.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
index ca07cb1..79690f2 100644
--- a/arch/arm/plat-samsung/adc.c
+++ b/arch/arm/plat-samsung/adc.c
@@ -381,11 +381,6 @@ static int s3c_adc_probe(struct platform_device *pdev)
 	}
 
 	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!regs) {
-		dev_err(dev, "failed to find registers\n");
-		return -ENXIO;
-	}
-
 	adc->regs = devm_ioremap_resource(dev, regs);
 	if (IS_ERR(adc->regs))
 		return PTR_ERR(adc->regs);
-- 
1.7.10.4


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

* [PATCH 30/33] arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
@ 2013-05-16 11:15   ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 arch/arm/plat-samsung/adc.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
index ca07cb1..79690f2 100644
--- a/arch/arm/plat-samsung/adc.c
+++ b/arch/arm/plat-samsung/adc.c
@@ -381,11 +381,6 @@ static int s3c_adc_probe(struct platform_device *pdev)
 	}
 
 	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!regs) {
-		dev_err(dev, "failed to find registers\n");
-		return -ENXIO;
-	}
-
 	adc->regs = devm_ioremap_resource(dev, regs);
 	if (IS_ERR(adc->regs))
 		return PTR_ERR(adc->regs);
-- 
1.7.10.4

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

* [PATCH 31/33] arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (30 preceding siblings ...)
  (?)
@ 2013-05-16 11:15 ` Wolfram Sang
  2013-05-16 14:42   ` John Crispin
  -1 siblings, 1 reply; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:15 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>
---
 arch/mips/lantiq/xway/gptu.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/mips/lantiq/xway/gptu.c b/arch/mips/lantiq/xway/gptu.c
index 9861c86..d6a79b8 100644
--- a/arch/mips/lantiq/xway/gptu.c
+++ b/arch/mips/lantiq/xway/gptu.c
@@ -144,10 +144,6 @@ static int gptu_probe(struct platform_device *pdev)
 	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "Failed to get resource\n");
-		return -ENOMEM;
-	}
 
 	/* remap gptu register range */
 	gptu_membase = devm_ioremap_resource(&pdev->dev, res);
-- 
1.7.10.4


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

* [PATCH 32/33] sound/soc/fsl: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (31 preceding siblings ...)
  (?)
@ 2013-05-16 11:16 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:16 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>
---
 sound/soc/fsl/imx-ssi.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index 902fab0..c6fa03e 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -540,11 +540,6 @@ static int imx_ssi_probe(struct platform_device *pdev)
 	clk_prepare_enable(ssi->clk);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		ret = -ENODEV;
-		goto failed_get_resource;
-	}
-
 	ssi->base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(ssi->base)) {
 		ret = PTR_ERR(ssi->base);
@@ -633,7 +628,6 @@ failed_pdev_fiq_alloc:
 	snd_soc_unregister_component(&pdev->dev);
 failed_register:
 	release_mem_region(res->start, resource_size(res));
-failed_get_resource:
 	clk_disable_unprepare(ssi->clk);
 failed_clk:
 
-- 
1.7.10.4


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

* [PATCH 33/33] sound/soc/kirkwood: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` Wolfram Sang
                   ` (32 preceding siblings ...)
  (?)
@ 2013-05-16 11:16 ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 11:16 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>
---
 sound/soc/kirkwood/kirkwood-i2s.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index befe68f..4c9dad3 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -471,11 +471,6 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
 	dev_set_drvdata(&pdev->dev, priv);
 
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!mem) {
-		dev_err(&pdev->dev, "platform_get_resource failed\n");
-		return -ENXIO;
-	}
-
 	priv->io = devm_ioremap_resource(&pdev->dev, mem);
 	if (IS_ERR(priv->io))
 		return PTR_ERR(priv->io);
-- 
1.7.10.4


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

* Re: [PATCH 21/33] drivers/usb/chipidea: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` [PATCH 21/33] drivers/usb/chipidea: " Wolfram Sang
@ 2013-05-16 11:29   ` Alexander Shishkin
  0 siblings, 0 replies; 96+ messages in thread
From: Alexander Shishkin @ 2013-05-16 11:29 UTC (permalink / raw)
  To: Wolfram Sang, linux-kernel; +Cc: Wolfram Sang, Greg Kroah-Hartman, linux-usb

Wolfram Sang <wsa@the-dreams.de> writes:

> 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: Alexander Shishkin <alexander.shishkin@linux.intel.com>

> ---
>  drivers/usb/chipidea/core.c |    5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
> index 450107e..49b098b 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -370,11 +370,6 @@ static int ci_hdrc_probe(struct platform_device *pdev)
>  	}
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(dev, "missing resource\n");
> -		return -ENODEV;
> -	}
> -
>  	base = devm_ioremap_resource(dev, res);
>  	if (IS_ERR(base))
>  		return PTR_ERR(base);
> -- 
> 1.7.10.4

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
  2013-05-16 11:15 ` Wolfram Sang
  (?)
@ 2013-05-16 11:57   ` Artem Bityutskiy
  -1 siblings, 0 replies; 96+ messages in thread
From: Artem Bityutskiy @ 2013-05-16 11:57 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mips, alsa-devel, Alessandro Zummo, Liam Girdwood,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Thierry Reding,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide, linux-mtd,
	linux-i2c, Evgeniy Polyakov, ac100, devel, Kukjin Kim,
	Russell King, Herbert Xu, Samuel Ortiz,
	Florian Tobias Schandinat, Vinod Koul, linux-pm, cpufreq

On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
> Despite various architectures and platform dependencies, I managed to
> compile
> test 45 out of 57 modified files locally using heuristics and
> defconfigs.
> If somebody knows how to create a minimal .config with a certain
> kconfig symbol
> (and its dependencies) set, I'd love to hear about it.

If you find this out, please, share!

-- 
Best Regards,
Artem Bityutskiy

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 11:57   ` Artem Bityutskiy
  0 siblings, 0 replies; 96+ messages in thread
From: Artem Bityutskiy @ 2013-05-16 11:57 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, linux-mips, alsa-devel, linux-usb,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Matt Mackall,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide,
	Wim Van Sebroeck, netdev, linux-mtd, linux-i2c, Evgeniy Polyakov,
	Wan ZongShun, ac100, devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Marc Dietrich, Stephen Warren,
	Rafael J. Wysocki, cpufreq, Eduardo Valentin, David Airlie,
	Tomi Valkeinen, Alan Stern, Grant Likely, Zhang Rui,
	Thierry Reding, Deepak Saxena, linux-watchdog, Arnd Bergmann,
	linux-pm, Julian Andres Klode, Inki Dae, linux-samsung-soc,
	Ben Dooks, Barry Song, linux-tegra, rtc-linux, linux-omap,
	linux-arm-kernel, Joonyoung Shim, Alessandro Zummo,
	spi-devel-general, Greg Kroah-Hartman, Ralf Baechle,
	Linus Torvalds, Seung-Woo Kim, Liam Girdwood, Felipe Balbi,
	Tony Prisk, Vinod Koul, Kyungmin Park, Mark Brown, Takashi Iwai,
	Dan Williams, Tejun Heo, Samuel Ortiz, David Woodhouse,
	Paul Zimmerman

On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
> Despite various architectures and platform dependencies, I managed to
> compile
> test 45 out of 57 modified files locally using heuristics and
> defconfigs.
> If somebody knows how to create a minimal .config with a certain
> kconfig symbol
> (and its dependencies) set, I'd love to hear about it.

If you find this out, please, share!

-- 
Best Regards,
Artem Bityutskiy

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 11:57   ` Artem Bityutskiy
  0 siblings, 0 replies; 96+ messages in thread
From: Artem Bityutskiy @ 2013-05-16 11:57 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mips, alsa-devel, Alessandro Zummo, Liam Girdwood,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Thierry Reding,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide,
	Wim Van Sebroeck, linux-mtd, linux-i2c, Evgeniy Polyakov, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu, Samuel Ortiz,
	Florian Tobias Schandinat, Vinod Koul, linux-pm, cpufreq,
	Eduardo Valentin, David Airlie, linux-omap, Tomi Valkeinen,
	Alan Stern, Felipe Balbi, Grant Likely, Zhang Rui,
	David Woodhouse, Deepak Saxena, linux-watchdog, Wan ZongShun,
	Stephen Warren, Julian Andres Klode, Dan Williams,
	Rafael J. Wysocki, linux-samsung-soc, Ben Dooks, Matt Mackall,
	linux-tegra, rtc-linux, Marc Dietrich, linux-arm-kernel,
	Joonyoung Shim, Inki Dae, netdev, Takashi Iwai, linux-usb,
	Seung-Woo Kim, linux-kernel, Ralf Baechle, Tony Prisk,
	Kyungmin Park, Mark Brown, Arnd Bergmann, Barry Song,
	Greg Kroah-Hartman, Tejun Heo, spi-devel-general, Linus Torvalds,
	Paul Zimmerman

On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
> Despite various architectures and platform dependencies, I managed to
> compile
> test 45 out of 57 modified files locally using heuristics and
> defconfigs.
> If somebody knows how to create a minimal .config with a certain
> kconfig symbol
> (and its dependencies) set, I'd love to hear about it.

If you find this out, please, share!

-- 
Best Regards,
Artem Bityutskiy

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

* Re: [PATCH 08/33] drivers/i2c/busses: don't check resource with devm_ioremap_resource
  2013-05-16 11:15   ` Wolfram Sang
  (?)
@ 2013-05-16 12:22       ` Barry Song
  -1 siblings, 0 replies; 96+ messages in thread
From: Barry Song @ 2013-05-16 12:22 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Ben Dooks, Kukjin Kim,
	Barry Song, Stephen Warren,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, DL-SHA-WorkGroupLinux

2013/5/16 Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>

Acked-by: Barry Song <Baohua.Song-kQvG35nSl+M@public.gmane.org>

-barry

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

* Re: [PATCH 08/33] drivers/i2c/busses: don't check resource with devm_ioremap_resource
@ 2013-05-16 12:22       ` Barry Song
  0 siblings, 0 replies; 96+ messages in thread
From: Barry Song @ 2013-05-16 12:22 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Ben Dooks, Kukjin Kim, Barry Song, Stephen Warren,
	linux-arm-kernel, linux-samsung-soc, linux-i2c, linux-tegra,
	DL-SHA-WorkGroupLinux

2013/5/16 Wolfram Sang <wsa@the-dreams.de>:
> 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: Barry Song <Baohua.Song@csr.com>

-barry

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

* [PATCH 08/33] drivers/i2c/busses: don't check resource with devm_ioremap_resource
@ 2013-05-16 12:22       ` Barry Song
  0 siblings, 0 replies; 96+ messages in thread
From: Barry Song @ 2013-05-16 12:22 UTC (permalink / raw)
  To: linux-arm-kernel

2013/5/16 Wolfram Sang <wsa@the-dreams.de>:
> 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: Barry Song <Baohua.Song@csr.com>

-barry

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
  2013-05-16 11:57   ` Artem Bityutskiy
  (?)
  (?)
@ 2013-05-16 12:55     ` Viresh Kumar
  -1 siblings, 0 replies; 96+ messages in thread
From: Viresh Kumar @ 2013-05-16 12:55 UTC (permalink / raw)
  To: dedekind1
  Cc: Wolfram Sang, linux-kernel, linux-mips, alsa-devel, linux-usb,
	Alexander Shishkin, Linus Walleij, Matt Mackall, linux-fbdev,
	dri-devel, Jaroslav Kysela, linux-ide, Wim Van Sebroeck, netdev,
	linux-mtd, linux-i2c, Evgeniy Polyakov, Wan ZongShun, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu, Florian

On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
>> Despite various architectures and platform dependencies, I managed to
>> compile
>> test 45 out of 57 modified files locally using heuristics and
>> defconfigs.
>> If somebody knows how to create a minimal .config with a certain
>> kconfig symbol
>> (and its dependencies) set, I'd love to hear about it.
>
> If you find this out, please, share!

Are you guys looking for "make savedefconfig" ??

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 12:55     ` Viresh Kumar
  0 siblings, 0 replies; 96+ messages in thread
From: Viresh Kumar @ 2013-05-16 12:55 UTC (permalink / raw)
  To: dedekind1
  Cc: Wolfram Sang, linux-kernel, linux-mips, alsa-devel, linux-usb,
	Alexander Shishkin, Linus Walleij, Matt Mackall, linux-fbdev,
	dri-devel, Jaroslav Kysela, linux-ide, Wim Van Sebroeck, netdev,
	linux-mtd, linux-i2c, Evgeniy Polyakov, Wan ZongShun, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu, Florian

On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
>> Despite various architectures and platform dependencies, I managed to
>> compile
>> test 45 out of 57 modified files locally using heuristics and
>> defconfigs.
>> If somebody knows how to create a minimal .config with a certain
>> kconfig symbol
>> (and its dependencies) set, I'd love to hear about it.
>
> If you find this out, please, share!

Are you guys looking for "make savedefconfig" ??

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 12:55     ` Viresh Kumar
  0 siblings, 0 replies; 96+ messages in thread
From: Viresh Kumar @ 2013-05-16 12:55 UTC (permalink / raw)
  To: dedekind1
  Cc: Wolfram Sang, linux-kernel, linux-mips, alsa-devel, linux-usb,
	Alexander Shishkin, Linus Walleij, Matt Mackall, linux-fbdev,
	dri-devel, Jaroslav Kysela, linux-ide, Wim Van Sebroeck, netdev,
	linux-mtd, linux-i2c, Evgeniy Polyakov, Wan ZongShun, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Marc Dietrich, Stephen Warren,
	Rafael J. Wysocki, cpufreq, Eduardo Valentin, David Airlie,
	Tomi Valkeinen, Alan Stern, Grant Likely, Zhang Rui,
	Thierry Reding, Deepak Saxena, linux-watchdog, Arnd Bergmann,
	linux-pm, Julian Andres Klode, Inki Dae, linux-samsung-soc,
	Ben Dooks, Barry Song, linux-tegra, rtc-linux, linux-omap,
	linux-arm-kernel, Joonyoung Shim, Alessandro Zummo,
	spi-devel-general, Greg Kroah-Hartman, Ralf Baechle,
	Linus Torvalds, Seung-Woo Kim, Liam Girdwood, Felipe Balbi,
	Tony Prisk, Vinod Koul, Kyungmin Park, Mark Brown, Takashi Iwai,
	Dan Williams, Tejun Heo, Samuel Ortiz, David Woodhouse,
	Paul Zimmerman

On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
>> Despite various architectures and platform dependencies, I managed to
>> compile
>> test 45 out of 57 modified files locally using heuristics and
>> defconfigs.
>> If somebody knows how to create a minimal .config with a certain
>> kconfig symbol
>> (and its dependencies) set, I'd love to hear about it.
>
> If you find this out, please, share!

Are you guys looking for "make savedefconfig" ??

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 12:55     ` Viresh Kumar
  0 siblings, 0 replies; 96+ messages in thread
From: Viresh Kumar @ 2013-05-16 12:55 UTC (permalink / raw)
  To: dedekind1
  Cc: linux-mips, alsa-devel, Alessandro Zummo, Wolfram Sang,
	Alexander Shishkin, Linus Walleij, Thierry Reding, linux-fbdev,
	dri-devel, Jaroslav Kysela, linux-ide, Wim Van Sebroeck,
	linux-mtd, linux-i2c, Evgeniy Polyakov, ac100, devel, Kukjin Kim,
	Russell King, Herbert Xu, Samuel Ortiz,
	Florian Tobias Schandinat, Vinod Koul, linux-pm, cpufreq,
	Eduardo Valentin, David Airlie, linux-omap, Tomi Valkeinen,
	Alan Stern, Felipe Balbi, Grant Likely, Zhang Rui,
	David Woodhouse, Deepak Saxena, linux-watchdog, Wan ZongShun,
	Stephen Warren, Julian Andres Klode, Liam Girdwood, Dan Williams,
	Rafael J. Wysocki, linux-samsung-soc, Ben Dooks, Matt Mackall,
	linux-tegra, rtc-linux, Marc Dietrich, linux-arm-kernel,
	Joonyoung Shim, Inki Dae, netdev, Takashi Iwai, linux-usb,
	Seung-Woo Kim, linux-kernel, Ralf Baechle, Tony Prisk,
	Kyungmin Park, Mark Brown, Arnd Bergmann, Barry Song,
	Greg Kroah-Hartman, Tejun Heo, spi-devel-general, Linus Torvalds,
	Paul Zimmerman

On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
>> Despite various architectures and platform dependencies, I managed to
>> compile
>> test 45 out of 57 modified files locally using heuristics and
>> defconfigs.
>> If somebody knows how to create a minimal .config with a certain
>> kconfig symbol
>> (and its dependencies) set, I'd love to hear about it.
>
> If you find this out, please, share!

Are you guys looking for "make savedefconfig" ??

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
  2013-05-16 12:55     ` Viresh Kumar
                         ` (2 preceding siblings ...)
  (?)
@ 2013-05-16 13:11       ` Artem Bityutskiy
  -1 siblings, 0 replies; 96+ messages in thread
From: Artem Bityutskiy @ 2013-05-16 13:11 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: linux-mips, alsa-devel, Alessandro Zummo, Wolfram Sang,
	Alexander Shishkin, Linus Walleij, Thierry Reding, linux-fbdev,
	dri-devel, Jaroslav Kysela, linux-ide, linux-mtd, linux-i2c,
	Evgeniy Polyakov, ac100, devel, Kukjin Kim, Russell King,
	Herbert Xu, Samuel Ortiz, Florian Tobias Schandinat, Vinod Koul,
	linux-pm, cpufreq, Eduardo Valentin

On Thu, 2013-05-16 at 18:25 +0530, Viresh Kumar wrote:
> On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> > On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
> >> Despite various architectures and platform dependencies, I managed to
> >> compile
> >> test 45 out of 57 modified files locally using heuristics and
> >> defconfigs.
> >> If somebody knows how to create a minimal .config with a certain
> >> kconfig symbol
> >> (and its dependencies) set, I'd love to hear about it.
> >
> > If you find this out, please, share!
> 
> Are you guys looking for "make savedefconfig" ??

No. It is more like:

I have changed this strange driver.

I want to compile-test my changes.

I need a defconfig which would have this driver enabled. I also want to
know <arch> for my "make ARCH=<arch>" command.

-- 
Best Regards,
Artem Bityutskiy

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 13:11       ` Artem Bityutskiy
  0 siblings, 0 replies; 96+ messages in thread
From: Artem Bityutskiy @ 2013-05-16 13:11 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: linux-mips, alsa-devel, Alessandro Zummo, Wolfram Sang,
	Alexander Shishkin, Linus Walleij, Thierry Reding, linux-fbdev,
	dri-devel, Jaroslav Kysela, linux-ide, linux-mtd, linux-i2c,
	Evgeniy Polyakov, ac100, devel, Kukjin Kim, Russell King,
	Herbert Xu, Samuel Ortiz, Florian Tobias Schandinat, Vinod Koul,
	linux-pm, cpufreq, Eduardo Valentin

On Thu, 2013-05-16 at 18:25 +0530, Viresh Kumar wrote:
> On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> > On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
> >> Despite various architectures and platform dependencies, I managed to
> >> compile
> >> test 45 out of 57 modified files locally using heuristics and
> >> defconfigs.
> >> If somebody knows how to create a minimal .config with a certain
> >> kconfig symbol
> >> (and its dependencies) set, I'd love to hear about it.
> >
> > If you find this out, please, share!
> 
> Are you guys looking for "make savedefconfig" ??

No. It is more like:

I have changed this strange driver.

I want to compile-test my changes.

I need a defconfig which would have this driver enabled. I also want to
know <arch> for my "make ARCH=<arch>" command.

-- 
Best Regards,
Artem Bityutskiy

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 13:11       ` Artem Bityutskiy
  0 siblings, 0 replies; 96+ messages in thread
From: Artem Bityutskiy @ 2013-05-16 13:11 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Wolfram Sang, linux-kernel, linux-mips, alsa-devel, linux-usb,
	Alexander Shishkin, Linus Walleij, Matt Mackall, linux-fbdev,
	dri-devel, Jaroslav Kysela, linux-ide, Wim Van Sebroeck, netdev,
	linux-mtd, linux-i2c, Evgeniy Polyakov, Wan ZongShun, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Marc Dietrich, Stephen Warren,
	Rafael J. Wysocki, cpufreq, Eduardo Valentin, David Airlie,
	Tomi Valkeinen, Alan Stern, Grant Likely, Zhang Rui,
	Thierry Reding, Deepak Saxena, linux-watchdog, Arnd Bergmann,
	linux-pm, Julian Andres Klode, Inki Dae, linux-samsung-soc,
	Ben Dooks, Barry Song, linux-tegra, rtc-linux, linux-omap,
	linux-arm-kernel, Joonyoung Shim, Alessandro Zummo,
	spi-devel-general, Greg Kroah-Hartman, Ralf Baechle,
	Linus Torvalds, Seung-Woo Kim, Liam Girdwood, Felipe Balbi,
	Tony Prisk, Vinod Koul, Kyungmin Park, Mark Brown, Takashi Iwai,
	Dan Williams, Tejun Heo, Samuel Ortiz, David Woodhouse,
	Paul Zimmerman

On Thu, 2013-05-16 at 18:25 +0530, Viresh Kumar wrote:
> On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> > On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
> >> Despite various architectures and platform dependencies, I managed to
> >> compile
> >> test 45 out of 57 modified files locally using heuristics and
> >> defconfigs.
> >> If somebody knows how to create a minimal .config with a certain
> >> kconfig symbol
> >> (and its dependencies) set, I'd love to hear about it.
> >
> > If you find this out, please, share!
> 
> Are you guys looking for "make savedefconfig" ??

No. It is more like:

I have changed this strange driver.

I want to compile-test my changes.

I need a defconfig which would have this driver enabled. I also want to
know <arch> for my "make ARCH=<arch>" command.

-- 
Best Regards,
Artem Bityutskiy

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 13:11       ` Artem Bityutskiy
  0 siblings, 0 replies; 96+ messages in thread
From: Artem Bityutskiy @ 2013-05-16 13:11 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: linux-mips, alsa-devel, Alessandro Zummo, Wolfram Sang,
	Alexander Shishkin, Linus Walleij, Thierry Reding, linux-fbdev,
	dri-devel, Jaroslav Kysela, linux-ide, Wim Van Sebroeck,
	linux-mtd, linux-i2c, Evgeniy Polyakov, ac100, devel, Kukjin Kim,
	Russell King, Herbert Xu, Samuel Ortiz,
	Florian Tobias Schandinat, Vinod Koul, linux-pm, cpufreq,
	Eduardo Valentin, David Airlie, linux-omap, Tomi Valkeinen,
	Alan Stern, Felipe Balbi, Grant Likely, Zhang Rui,
	David Woodhouse, Deepak Saxena, linux-watchdog, Wan ZongShun,
	Stephen Warren, Julian Andres Klode, Liam Girdwood, Dan Williams,
	Rafael J. Wysocki, linux-samsung-soc, Ben Dooks, Matt Mackall,
	linux-tegra, rtc-linux, Marc Dietrich, linux-arm-kernel,
	Joonyoung Shim, Inki Dae, netdev, Takashi Iwai, linux-usb,
	Seung-Woo Kim, linux-kernel, Ralf Baechle, Tony Prisk,
	Kyungmin Park, Mark Brown, Arnd Bergmann, Barry Song,
	Greg Kroah-Hartman, Tejun Heo, spi-devel-general, Linus Torvalds,
	Paul Zimmerman

On Thu, 2013-05-16 at 18:25 +0530, Viresh Kumar wrote:
> On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> > On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
> >> Despite various architectures and platform dependencies, I managed to
> >> compile
> >> test 45 out of 57 modified files locally using heuristics and
> >> defconfigs.
> >> If somebody knows how to create a minimal .config with a certain
> >> kconfig symbol
> >> (and its dependencies) set, I'd love to hear about it.
> >
> > If you find this out, please, share!
> 
> Are you guys looking for "make savedefconfig" ??

No. It is more like:

I have changed this strange driver.

I want to compile-test my changes.

I need a defconfig which would have this driver enabled. I also want to
know <arch> for my "make ARCH=<arch>" command.

-- 
Best Regards,
Artem Bityutskiy

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 13:11       ` Artem Bityutskiy
  0 siblings, 0 replies; 96+ messages in thread
From: Artem Bityutskiy @ 2013-05-16 13:11 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: linux-mips, alsa-devel, Alessandro Zummo, Wolfram Sang,
	Alexander Shishkin, Linus Walleij, Thierry Reding, linux-fbdev,
	dri-devel, Jaroslav Kysela, linux-ide, linux-mtd, linux-i2c,
	Evgeniy Polyakov, ac100, devel, Kukjin Kim, Russell King,
	Herbert Xu, Samuel Ortiz, Florian Tobias Schandinat, Vinod Koul,
	linux-pm, cpufreq, Eduardo Valentin

On Thu, 2013-05-16 at 18:25 +0530, Viresh Kumar wrote:
> On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> > On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
> >> Despite various architectures and platform dependencies, I managed to
> >> compile
> >> test 45 out of 57 modified files locally using heuristics and
> >> defconfigs.
> >> If somebody knows how to create a minimal .config with a certain
> >> kconfig symbol
> >> (and its dependencies) set, I'd love to hear about it.
> >
> > If you find this out, please, share!
> 
> Are you guys looking for "make savedefconfig" ??

No. It is more like:

I have changed this strange driver.

I want to compile-test my changes.

I need a defconfig which would have this driver enabled. I also want to
know <arch> for my "make ARCH=<arch>" command.

-- 
Best Regards,
Artem Bityutskiy

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
  2013-05-16 13:11       ` Artem Bityutskiy
                           ` (2 preceding siblings ...)
  (?)
@ 2013-05-16 13:17         ` Tomi Valkeinen
  -1 siblings, 0 replies; 96+ messages in thread
From: Tomi Valkeinen @ 2013-05-16 13:17 UTC (permalink / raw)
  To: dedekind1
  Cc: linux-mips, alsa-devel, Alessandro Zummo, Wolfram Sang,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Thierry Reding,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide, linux-mtd,
	linux-i2c, Evgeniy Polyakov, ac100, devel, Kukjin Kim,
	Russell King, Arnd Bergmann, Samuel Ortiz,
	Florian Tobias Schandinat, Vinod Koul, linux-pm, cpufreq, Eduar


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

On 16/05/13 16:11, Artem Bityutskiy wrote:
> On Thu, 2013-05-16 at 18:25 +0530, Viresh Kumar wrote:
>> On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
>>> On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
>>>> Despite various architectures and platform dependencies, I managed to
>>>> compile
>>>> test 45 out of 57 modified files locally using heuristics and
>>>> defconfigs.
>>>> If somebody knows how to create a minimal .config with a certain
>>>> kconfig symbol
>>>> (and its dependencies) set, I'd love to hear about it.
>>>
>>> If you find this out, please, share!
>>
>> Are you guys looking for "make savedefconfig" ??
> 
> No. It is more like:
> 
> I have changed this strange driver.
> 
> I want to compile-test my changes.
> 
> I need a defconfig which would have this driver enabled. I also want to
> know <arch> for my "make ARCH=<arch>" command.

Not quite the same thing, but I sent this a while ago:

http://lkml.indiana.edu/hypermail/linux/kernel/1304.3/02847.html

My "softdepends" feature is probably not needed, as pointed out in the
thread, as the behavior can be implemented with the current Kconfig
language just fine.

I had a quick look at fbdev drivers, and some of them compile fine on
all (well, arm and x86) archs. But many do have real arch dependencies.

I think it'd be a good long term goal to make drivers arch-independent,
and add CONFIG_SHOW_ALL_DRIVERS or such, which would allow compiling
drivers that are not used on your arch, but still compile fine.

 Tomi



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

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

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 13:17         ` Tomi Valkeinen
  0 siblings, 0 replies; 96+ messages in thread
From: Tomi Valkeinen @ 2013-05-16 13:17 UTC (permalink / raw)
  To: dedekind1
  Cc: linux-mips, alsa-devel, Alessandro Zummo, Wolfram Sang,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Thierry Reding,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide, linux-mtd,
	linux-i2c, Evgeniy Polyakov, ac100, devel, Kukjin Kim,
	Russell King, Arnd Bergmann, Samuel Ortiz,
	Florian Tobias Schandinat, Vinod Koul, linux-pm, cpufreq, Eduar


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

On 16/05/13 16:11, Artem Bityutskiy wrote:
> On Thu, 2013-05-16 at 18:25 +0530, Viresh Kumar wrote:
>> On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
>>> On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
>>>> Despite various architectures and platform dependencies, I managed to
>>>> compile
>>>> test 45 out of 57 modified files locally using heuristics and
>>>> defconfigs.
>>>> If somebody knows how to create a minimal .config with a certain
>>>> kconfig symbol
>>>> (and its dependencies) set, I'd love to hear about it.
>>>
>>> If you find this out, please, share!
>>
>> Are you guys looking for "make savedefconfig" ??
> 
> No. It is more like:
> 
> I have changed this strange driver.
> 
> I want to compile-test my changes.
> 
> I need a defconfig which would have this driver enabled. I also want to
> know <arch> for my "make ARCH=<arch>" command.

Not quite the same thing, but I sent this a while ago:

http://lkml.indiana.edu/hypermail/linux/kernel/1304.3/02847.html

My "softdepends" feature is probably not needed, as pointed out in the
thread, as the behavior can be implemented with the current Kconfig
language just fine.

I had a quick look at fbdev drivers, and some of them compile fine on
all (well, arm and x86) archs. But many do have real arch dependencies.

I think it'd be a good long term goal to make drivers arch-independent,
and add CONFIG_SHOW_ALL_DRIVERS or such, which would allow compiling
drivers that are not used on your arch, but still compile fine.

 Tomi



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

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

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 13:17         ` Tomi Valkeinen
  0 siblings, 0 replies; 96+ messages in thread
From: Tomi Valkeinen @ 2013-05-16 13:17 UTC (permalink / raw)
  To: dedekind1
  Cc: Viresh Kumar, Wolfram Sang, linux-kernel, linux-mips, alsa-devel,
	linux-usb, Alexander Shishkin, Linus Walleij, Matt Mackall,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide,
	Wim Van Sebroeck, netdev, linux-mtd, linux-i2c, Evgeniy Polyakov,
	Wan ZongShun, ac100, devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Marc Dietrich, Stephen Warren,
	Rafael J. Wysocki, cpufreq, Eduardo Valentin, David Airlie,
	Alan Stern, Grant Likely, Zhang Rui, Thierry Reding,
	Deepak Saxena, linux-watchdog, Arnd Bergmann, linux-pm,
	Julian Andres Klode, Inki Dae, linux-samsung-soc, Ben Dooks,
	Barry Song, linux-tegra, rtc-linux, linux-omap, linux-arm-kernel,
	Joonyoung Shim, Alessandro Zummo, spi-devel-general,
	Greg Kroah-Hartman, Ralf Baechle, Linus Torvalds, Seung-Woo Kim,
	Liam Girdwood, Felipe Balbi, Tony Prisk, Vinod Koul,
	Kyungmin Park, Mark Brown, Takashi Iwai, Dan Williams, Tejun Heo,
	Samuel Ortiz, David Woodhouse, Paul Zimmerman

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

On 16/05/13 16:11, Artem Bityutskiy wrote:
> On Thu, 2013-05-16 at 18:25 +0530, Viresh Kumar wrote:
>> On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
>>> On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
>>>> Despite various architectures and platform dependencies, I managed to
>>>> compile
>>>> test 45 out of 57 modified files locally using heuristics and
>>>> defconfigs.
>>>> If somebody knows how to create a minimal .config with a certain
>>>> kconfig symbol
>>>> (and its dependencies) set, I'd love to hear about it.
>>>
>>> If you find this out, please, share!
>>
>> Are you guys looking for "make savedefconfig" ??
> 
> No. It is more like:
> 
> I have changed this strange driver.
> 
> I want to compile-test my changes.
> 
> I need a defconfig which would have this driver enabled. I also want to
> know <arch> for my "make ARCH=<arch>" command.

Not quite the same thing, but I sent this a while ago:

http://lkml.indiana.edu/hypermail/linux/kernel/1304.3/02847.html

My "softdepends" feature is probably not needed, as pointed out in the
thread, as the behavior can be implemented with the current Kconfig
language just fine.

I had a quick look at fbdev drivers, and some of them compile fine on
all (well, arm and x86) archs. But many do have real arch dependencies.

I think it'd be a good long term goal to make drivers arch-independent,
and add CONFIG_SHOW_ALL_DRIVERS or such, which would allow compiling
drivers that are not used on your arch, but still compile fine.

 Tomi



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

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 13:17         ` Tomi Valkeinen
  0 siblings, 0 replies; 96+ messages in thread
From: Tomi Valkeinen @ 2013-05-16 13:17 UTC (permalink / raw)
  To: dedekind1
  Cc: Viresh Kumar, Wolfram Sang, linux-kernel, linux-mips, alsa-devel,
	linux-usb, Alexander Shishkin, Linus Walleij, Matt Mackall,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide,
	Wim Van Sebroeck, netdev, linux-mtd, linux-i2c, Evgeniy Polyakov,
	Wan ZongShun, ac100, devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Marc Dietrich, Stephen Warren,
	Rafael J. Wysocki, cpufreq, Eduardo Valentin, David Airlie,
	Alan Stern, Grant Likely, Zhang Rui, Thierry Reding,
	Deepak Saxena, linux-watchdog, Arnd Bergmann, linux-pm,
	Julian Andres Klode, Inki Dae, linux-samsung-soc, Ben Dooks,
	Barry Song, linux-tegra, rtc-linux, linux-omap, linux-arm-kernel,
	Joonyoung Shim, Alessandro Zummo, spi-devel-general,
	Greg Kroah-Hartman, Ralf Baechle, Linus Torvalds, Seung-Woo Kim,
	Liam Girdwood, Felipe Balbi, Tony Prisk, Vinod Koul,
	Kyungmin Park, Mark Brown, Takashi Iwai, Dan Williams, Tejun Heo,
	Samuel Ortiz, David Woodhouse, Paul Zimmerman

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

On 16/05/13 16:11, Artem Bityutskiy wrote:
> On Thu, 2013-05-16 at 18:25 +0530, Viresh Kumar wrote:
>> On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
>>> On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
>>>> Despite various architectures and platform dependencies, I managed to
>>>> compile
>>>> test 45 out of 57 modified files locally using heuristics and
>>>> defconfigs.
>>>> If somebody knows how to create a minimal .config with a certain
>>>> kconfig symbol
>>>> (and its dependencies) set, I'd love to hear about it.
>>>
>>> If you find this out, please, share!
>>
>> Are you guys looking for "make savedefconfig" ??
> 
> No. It is more like:
> 
> I have changed this strange driver.
> 
> I want to compile-test my changes.
> 
> I need a defconfig which would have this driver enabled. I also want to
> know <arch> for my "make ARCH=<arch>" command.

Not quite the same thing, but I sent this a while ago:

http://lkml.indiana.edu/hypermail/linux/kernel/1304.3/02847.html

My "softdepends" feature is probably not needed, as pointed out in the
thread, as the behavior can be implemented with the current Kconfig
language just fine.

I had a quick look at fbdev drivers, and some of them compile fine on
all (well, arm and x86) archs. But many do have real arch dependencies.

I think it'd be a good long term goal to make drivers arch-independent,
and add CONFIG_SHOW_ALL_DRIVERS or such, which would allow compiling
drivers that are not used on your arch, but still compile fine.

 Tomi



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

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 13:17         ` Tomi Valkeinen
  0 siblings, 0 replies; 96+ messages in thread
From: Tomi Valkeinen @ 2013-05-16 13:17 UTC (permalink / raw)
  To: dedekind1
  Cc: linux-mips, alsa-devel, Alessandro Zummo, Wolfram Sang,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Thierry Reding,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide,
	Wim Van Sebroeck, linux-mtd, linux-i2c, Evgeniy Polyakov, ac100,
	devel, Kukjin Kim, Russell King, Arnd Bergmann, Samuel Ortiz,
	Florian Tobias Schandinat, Vinod Koul, linux-pm, cpufreq,
	Eduardo Valentin, David Airlie, linux-omap, Alan Stern,
	Felipe Balbi, Grant Likely, Zhang Rui, David Woodhouse,
	Deepak Saxena, linux-watchdog, Wan ZongShun, Stephen Warren,
	Julian Andres Klode, Liam Girdwood, Dan Williams,
	Rafael J. Wysocki, linux-samsung-soc, Ben Dooks, Matt Mackall,
	linux-tegra, rtc-linux, Marc Dietrich, linux-arm-kernel,
	Joonyoung Shim, Inki Dae, netdev, Takashi Iwai, linux-usb,
	Seung-Woo Kim, linux-kernel, Ralf Baechle, Tony Prisk,
	Herbert Xu, Kyungmin Park, Mark Brown, Barry Song,
	Greg Kroah-Hartman, Tejun Heo, spi-devel-general, Linus Torvalds,
	Paul Zimmerman

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

On 16/05/13 16:11, Artem Bityutskiy wrote:
> On Thu, 2013-05-16 at 18:25 +0530, Viresh Kumar wrote:
>> On 16 May 2013 17:27, Artem Bityutskiy <dedekind1@gmail.com> wrote:
>>> On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
>>>> Despite various architectures and platform dependencies, I managed to
>>>> compile
>>>> test 45 out of 57 modified files locally using heuristics and
>>>> defconfigs.
>>>> If somebody knows how to create a minimal .config with a certain
>>>> kconfig symbol
>>>> (and its dependencies) set, I'd love to hear about it.
>>>
>>> If you find this out, please, share!
>>
>> Are you guys looking for "make savedefconfig" ??
> 
> No. It is more like:
> 
> I have changed this strange driver.
> 
> I want to compile-test my changes.
> 
> I need a defconfig which would have this driver enabled. I also want to
> know <arch> for my "make ARCH=<arch>" command.

Not quite the same thing, but I sent this a while ago:

http://lkml.indiana.edu/hypermail/linux/kernel/1304.3/02847.html

My "softdepends" feature is probably not needed, as pointed out in the
thread, as the behavior can be implemented with the current Kconfig
language just fine.

I had a quick look at fbdev drivers, and some of them compile fine on
all (well, arm and x86) archs. But many do have real arch dependencies.

I think it'd be a good long term goal to make drivers arch-independent,
and add CONFIG_SHOW_ALL_DRIVERS or such, which would allow compiling
drivers that are not used on your arch, but still compile fine.

 Tomi



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

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

* Re: [PATCH 23/33] drivers/usb/host: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` [PATCH 23/33] drivers/usb/host: " Wolfram Sang
@ 2013-05-16 14:27   ` Alan Stern
  0 siblings, 0 replies; 96+ messages in thread
From: Alan Stern @ 2013-05-16 14:27 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, Greg Kroah-Hartman, linux-usb

On Thu, 16 May 2013, 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>
> ---
>  drivers/usb/host/ohci-nxp.c |    6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
> index f4988fb..f303cb0 100644
> --- a/drivers/usb/host/ohci-nxp.c
> +++ b/drivers/usb/host/ohci-nxp.c
> @@ -300,12 +300,6 @@ static int usb_hcd_nxp_probe(struct platform_device *pdev)
>  	}
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "Failed to get MEM resource\n");
> -		ret =  -ENOMEM;
> -		goto out8;
> -	}
> -
>  	hcd->regs = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(hcd->regs)) {
>  		ret = PTR_ERR(hcd->regs);
> 

Acked-by: Alan Stern <stern@rowland.harvard.edu>


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

* Re: [PATCH 31/33] arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` [PATCH 31/33] arch/mips/lantiq/xway: " Wolfram Sang
@ 2013-05-16 14:42   ` John Crispin
  0 siblings, 0 replies; 96+ messages in thread
From: John Crispin @ 2013-05-16 14:42 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, Ralf Baechle, linux-mips

On 16/05/13 13:15, 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>





> ---
>   arch/mips/lantiq/xway/gptu.c |    4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/arch/mips/lantiq/xway/gptu.c b/arch/mips/lantiq/xway/gptu.c
> index 9861c86..d6a79b8 100644
> --- a/arch/mips/lantiq/xway/gptu.c
> +++ b/arch/mips/lantiq/xway/gptu.c
> @@ -144,10 +144,6 @@ static int gptu_probe(struct platform_device *pdev)
>   	}
>
>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "Failed to get resource\n");
> -		return -ENOMEM;
> -	}
>
>   	/* remap gptu register range */
>   	gptu_membase = devm_ioremap_resource(&pdev->dev, res);


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

* Re: [PATCH 13/33] drivers/net/ethernet/renesas: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` [PATCH 13/33] drivers/net/ethernet/renesas: " Wolfram Sang
@ 2013-05-16 15:37   ` Joe Perches
  0 siblings, 0 replies; 96+ messages in thread
From: Joe Perches @ 2013-05-16 15:37 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, netdev

On Thu, 2013-05-16 at 13:15 +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
[]
> diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
[]
> @@ -2745,11 +2745,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
>  	if (mdp->cd->tsu) {
>  		struct resource *rtsu;
>  		rtsu = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> -		if (!rtsu) {
> -			dev_err(&pdev->dev, "Not found TSU resource\n");
> -			ret = -ENODEV;
> -			goto out_release;
> -		}
>  		mdp->tsu_addr = devm_ioremap_resource(&pdev->dev, rtsu);
>  		if (IS_ERR(mdp->tsu_addr)) {
>  			ret = PTR_ERR(mdp->tsu_addr);

I'm not sure it matters, but at least one of these
conversions will now return -EINVAL instead of -ENODEV



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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
  2013-05-16 13:11       ` Artem Bityutskiy
  (?)
  (?)
@ 2013-05-16 16:13         ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 16:13 UTC (permalink / raw)
  To: Artem Bityutskiy
  Cc: Viresh Kumar, linux-kernel, linux-mips, alsa-devel, linux-usb,
	Alexander Shishkin, Linus Walleij, Matt Mackall, linux-fbdev,
	dri-devel, Jaroslav Kysela, linux-ide, Wim Van Sebroeck, netdev,
	linux-mtd, linux-i2c, Evgeniy Polyakov, Wan ZongShun, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu, Florian


> I need a defconfig which would have this driver enabled. 

My wish would be a minimal config. Right now, I try to build the driver
with the current config and when that fails I grep through the
(uncompressed) defconfigs for the symbol needed. Gives me 45/57 success
rate on this series. Not perfect, but the best I could come up with
without writing a .config-generator myself.

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 16:13         ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 16:13 UTC (permalink / raw)
  To: Artem Bityutskiy
  Cc: Viresh Kumar, linux-kernel, linux-mips, alsa-devel, linux-usb,
	Alexander Shishkin, Linus Walleij, Matt Mackall, linux-fbdev,
	dri-devel, Jaroslav Kysela, linux-ide, Wim Van Sebroeck, netdev,
	linux-mtd, linux-i2c, Evgeniy Polyakov, Wan ZongShun, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu, Florian


> I need a defconfig which would have this driver enabled. 

My wish would be a minimal config. Right now, I try to build the driver
with the current config and when that fails I grep through the
(uncompressed) defconfigs for the symbol needed. Gives me 45/57 success
rate on this series. Not perfect, but the best I could come up with
without writing a .config-generator myself.

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 16:13         ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 16:13 UTC (permalink / raw)
  To: Artem Bityutskiy
  Cc: Viresh Kumar, linux-kernel, linux-mips, alsa-devel, linux-usb,
	Alexander Shishkin, Linus Walleij, Matt Mackall, linux-fbdev,
	dri-devel, Jaroslav Kysela, linux-ide, Wim Van Sebroeck, netdev,
	linux-mtd, linux-i2c, Evgeniy Polyakov, Wan ZongShun, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Marc Dietrich, Stephen Warren,
	Rafael J. Wysocki, cpufreq, Eduardo Valentin, David Airlie,
	Tomi Valkeinen, Alan Stern, Grant Likely, Zhang Rui,
	Thierry Reding, Deepak Saxena, linux-watchdog, Arnd Bergmann,
	linux-pm, Julian Andres Klode, Inki Dae, linux-samsung-soc,
	Ben Dooks, Barry Song, linux-tegra, rtc-linux, linux-omap,
	linux-arm-kernel, Joonyoung Shim, Alessandro Zummo,
	spi-devel-general, Greg Kroah-Hartman, Ralf Baechle,
	Linus Torvalds, Seung-Woo Kim, Liam Girdwood, Felipe Balbi,
	Tony Prisk, Vinod Koul, Kyungmin Park, Mark Brown, Takashi Iwai,
	Dan Williams, Tejun Heo, Samuel Ortiz, David Woodhouse,
	Paul Zimmerman


> I need a defconfig which would have this driver enabled. 

My wish would be a minimal config. Right now, I try to build the driver
with the current config and when that fails I grep through the
(uncompressed) defconfigs for the symbol needed. Gives me 45/57 success
rate on this series. Not perfect, but the best I could come up with
without writing a .config-generator myself.

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 16:13         ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-16 16:13 UTC (permalink / raw)
  To: Artem Bityutskiy
  Cc: linux-mips, alsa-devel, Alessandro Zummo, Liam Girdwood,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Thierry Reding,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide,
	Wim Van Sebroeck, linux-mtd, linux-i2c, Evgeniy Polyakov, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu, Samuel Ortiz,
	Florian Tobias Schandinat, Vinod Koul, linux-pm, cpufreq,
	Eduardo Valentin, David Airlie, linux-omap, Tomi Valkeinen,
	Alan Stern, Felipe Balbi, Grant Likely, Zhang Rui,
	David Woodhouse, Deepak Saxena, linux-watchdog, Wan ZongShun,
	Stephen Warren, Julian Andres Klode, Dan Williams,
	Rafael J. Wysocki, linux-samsung-soc, Ben Dooks, Matt Mackall,
	linux-tegra, rtc-linux, Marc Dietrich, linux-arm-kernel,
	Joonyoung Shim, Inki Dae, netdev, Takashi Iwai, linux-usb,
	Seung-Woo Kim, linux-kernel, Ralf Baechle, Tony Prisk,
	Kyungmin Park, Mark Brown, Arnd Bergmann, Barry Song,
	Greg Kroah-Hartman, Tejun Heo, spi-devel-general, Linus Torvalds,
	Paul Zimmerman


> I need a defconfig which would have this driver enabled. 

My wish would be a minimal config. Right now, I try to build the driver
with the current config and when that fails I grep through the
(uncompressed) defconfigs for the symbol needed. Gives me 45/57 success
rate on this series. Not perfect, but the best I could come up with
without writing a .config-generator myself.

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
  2013-05-16 11:15 ` Wolfram Sang
  (?)
  (?)
@ 2013-05-16 18:29   ` Stephen Warren
  -1 siblings, 0 replies; 96+ messages in thread
From: Stephen Warren @ 2013-05-16 18:29 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mips, alsa-devel, linux-usb, Liam Girdwood,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Matt Mackall,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide, netdev,
	linux-mtd, linux-i2c, Evgeniy Polyakov, Wan ZongShun, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Rafael J. Wysocki, cpufreq,
	Eduardo Valentin

On 05/16/2013 05:15 AM, Wolfram Sang wrote:
> Lately, I have been experimenting how to improve the devm interface to make
> writing device drivers easier and less error prone while also getting rid of
> its subtle issues. I think it has more potential but still needs work and
> definately conistency, especiall in its usage.
...

The Tegra parts in patches 4, 5, 8, 15, 16, 17, 29 all,
Acked-by: Stephen Warren <swarren@nvidia.com>

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 18:29   ` Stephen Warren
  0 siblings, 0 replies; 96+ messages in thread
From: Stephen Warren @ 2013-05-16 18:29 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mips, alsa-devel, linux-usb, Liam Girdwood,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Matt Mackall,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide, netdev,
	linux-mtd, linux-i2c, Evgeniy Polyakov, Wan ZongShun, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Rafael J. Wysocki, cpufreq,
	Eduardo Valentin

On 05/16/2013 05:15 AM, Wolfram Sang wrote:
> Lately, I have been experimenting how to improve the devm interface to make
> writing device drivers easier and less error prone while also getting rid of
> its subtle issues. I think it has more potential but still needs work and
> definately conistency, especiall in its usage.
...

The Tegra parts in patches 4, 5, 8, 15, 16, 17, 29 all,
Acked-by: Stephen Warren <swarren@nvidia.com>

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 18:29   ` Stephen Warren
  0 siblings, 0 replies; 96+ messages in thread
From: Stephen Warren @ 2013-05-16 18:29 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, ac100, Alan Stern, Alessandro Zummo,
	Alexander Shishkin, alsa-devel, Arnd Bergmann, Barry Song,
	Ben Dooks, cpufreq, Dan Williams, David Airlie, David Woodhouse,
	Deepak Saxena, devel, dri-devel, Eduardo Valentin,
	Evgeniy Polyakov, Felipe Balbi, Florian Tobias Schandinat,
	Grant Likely, Greg Kroah-Hartman, Herbert Xu, Inki Dae,
	Jaroslav Kysela, Joonyoung Shim, Julian Andres Klode, Kukjin Kim,
	Kyungmin Park, Liam Girdwood, Linus Torvalds, Linus Walleij,
	linux-arm-kernel, linux-fbdev, linux-i2c, linux-ide, linux-mips,
	linux-mtd, linux-omap, linux-pm, linux-samsung-soc, linux-tegra,
	linux-usb, linux-watchdog, Marc Dietrich, Mark Brown,
	Matt Mackall, netdev, Paul Zimmerman, Rafael J. Wysocki,
	Ralf Baechle, rtc-linux, Russell King, Samuel Ortiz,
	Seung-Woo Kim, spi-devel-general, Takashi Iwai, Tejun Heo,
	Thierry Reding, Tomi Valkeinen, Tony Prisk, Vinod Koul,
	Viresh Kumar, Wan ZongShun, Wim Van Sebroeck, Zhang Rui

On 05/16/2013 05:15 AM, Wolfram Sang wrote:
> Lately, I have been experimenting how to improve the devm interface to make
> writing device drivers easier and less error prone while also getting rid of
> its subtle issues. I think it has more potential but still needs work and
> definately conistency, especiall in its usage.
...

The Tegra parts in patches 4, 5, 8, 15, 16, 17, 29 all,
Acked-by: Stephen Warren <swarren@nvidia.com>

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-16 18:29   ` Stephen Warren
  0 siblings, 0 replies; 96+ messages in thread
From: Stephen Warren @ 2013-05-16 18:29 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mips, alsa-devel, linux-usb, Liam Girdwood,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Matt Mackall,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide,
	Wim Van Sebroeck, netdev, linux-mtd, linux-i2c, Evgeniy Polyakov,
	Wan ZongShun, ac100, devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Marc Dietrich, Rafael J. Wysocki,
	cpufreq, Eduardo Valentin, David Airlie, Tomi Valkeinen,
	Alan Stern, Grant Likely, Zhang Rui, Thierry Reding,
	Deepak Saxena, linux-watchdog, Arnd Bergmann, linux-pm,
	Julian Andres Klode, Inki Dae, linux-samsung-soc, Ben Dooks,
	Barry Song, linux-tegra, rtc-linux, linux-omap, linux-arm-kernel,
	Joonyoung Shim, Alessandro Zummo, spi-devel-general,
	Greg Kroah-Hartman, Ralf Baechle, Linus Torvalds, Seung-Woo Kim,
	linux-kernel, Felipe Balbi, Tony Prisk, Vinod Koul,
	Kyungmin Park, Mark Brown, Takashi Iwai, Dan Williams, Tejun Heo,
	Samuel Ortiz, David Woodhouse, Paul Zimmerman

On 05/16/2013 05:15 AM, Wolfram Sang wrote:
> Lately, I have been experimenting how to improve the devm interface to make
> writing device drivers easier and less error prone while also getting rid of
> its subtle issues. I think it has more potential but still needs work and
> definately conistency, especiall in its usage.
...

The Tegra parts in patches 4, 5, 8, 15, 16, 17, 29 all,
Acked-by: Stephen Warren <swarren@nvidia.com>

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

* Re: [PATCH 14/33] drivers/pinctrl: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` [PATCH 14/33] drivers/pinctrl: " Wolfram Sang
@ 2013-05-20 11:39   ` Linus Walleij
  2013-05-20 17:13     ` Wolfram Sang
  0 siblings, 1 reply; 96+ messages in thread
From: Linus Walleij @ 2013-05-20 11:39 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel

On Thu, May 16, 2013 at 1:15 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 think I have already applied this?

Yours,
Linus Walleij

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

* RE: [PATCH 20/33] drivers/thermal: don't check resource with devm_ioremap_resource
  2013-05-16 11:15 ` [PATCH 20/33] drivers/thermal: " Wolfram Sang
@ 2013-05-20 15:38   ` Zhang, Rui
  0 siblings, 0 replies; 96+ messages in thread
From: Zhang, Rui @ 2013-05-20 15:38 UTC (permalink / raw)
  To: Wolfram Sang, linux-kernel; +Cc: Eduardo Valentin, linux-pm



> -----Original Message-----
> From: Wolfram Sang [mailto:wsa@the-dreams.de]
> Sent: Thursday, May 16, 2013 7:16 PM
> To: linux-kernel@vger.kernel.org
> Cc: Wolfram Sang; Zhang, Rui; Eduardo Valentin; linux-
> pm@vger.kernel.org
> Subject: [PATCH 20/33] drivers/thermal: don't check resource with
> devm_ioremap_resource
> Importance: High
> 
> 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'd prefer the RFC version, besides, I have two patches to fix
armada_thermal.c and spear_thermal.c as well.
Thus, RFC version applied to thermal -next tree.

Thanks,
rui
> ---
>  drivers/thermal/armada_thermal.c |   10 ----------
>  drivers/thermal/dove_thermal.c   |    4 ----
>  drivers/thermal/exynos_thermal.c |    5 -----
>  3 files changed, 19 deletions(-)
> 
> diff --git a/drivers/thermal/armada_thermal.c
> b/drivers/thermal/armada_thermal.c
> index 5b4d75f..54ffd64 100644
> --- a/drivers/thermal/armada_thermal.c
> +++ b/drivers/thermal/armada_thermal.c
> @@ -169,21 +169,11 @@ static int armada_thermal_probe(struct
> platform_device *pdev)
>  		return -ENOMEM;
> 
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "Failed to get platform resource\n");
> -		return -ENODEV;
> -	}
> -
>  	priv->sensor = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(priv->sensor))
>  		return PTR_ERR(priv->sensor);
> 
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> -	if (!res) {
> -		dev_err(&pdev->dev, "Failed to get platform resource\n");
> -		return -ENODEV;
> -	}
> -
>  	priv->control = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(priv->control))
>  		return PTR_ERR(priv->control);
> diff --git a/drivers/thermal/dove_thermal.c
> b/drivers/thermal/dove_thermal.c index 4b15a5f..a088d13 100644
> --- a/drivers/thermal/dove_thermal.c
> +++ b/drivers/thermal/dove_thermal.c
> @@ -149,10 +149,6 @@ static int dove_thermal_probe(struct
> platform_device *pdev)
>  		return PTR_ERR(priv->sensor);
> 
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> -	if (!res) {
> -		dev_err(&pdev->dev, "Failed to get platform resource\n");
> -		return -ENODEV;
> -	}
>  	priv->control = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(priv->control))
>  		return PTR_ERR(priv->control);
> diff --git a/drivers/thermal/exynos_thermal.c
> b/drivers/thermal/exynos_thermal.c
> index d20ce9e..788b1dd 100644
> --- a/drivers/thermal/exynos_thermal.c
> +++ b/drivers/thermal/exynos_thermal.c
> @@ -925,11 +925,6 @@ static int exynos_tmu_probe(struct platform_device
> *pdev)
>  	INIT_WORK(&data->irq_work, exynos_tmu_work);
> 
>  	data->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!data->mem) {
> -		dev_err(&pdev->dev, "Failed to get platform resource\n");
> -		return -ENOENT;
> -	}
> -
>  	data->base = devm_ioremap_resource(&pdev->dev, data->mem);
>  	if (IS_ERR(data->base))
>  		return PTR_ERR(data->base);
> --
> 1.7.10.4


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

* Re: [PATCH 30/33] arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
  2013-05-16 11:15   ` Wolfram Sang
@ 2013-05-20 16:38     ` Kukjin Kim
  -1 siblings, 0 replies; 96+ messages in thread
From: Kukjin Kim @ 2013-05-20 16:38 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Ben Dooks, Kukjin Kim, Russell King,
	linux-arm-kernel, linux-samsung-soc

On 05/16/13 20:15, 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>

Looks good to me, applied into Samsung tree.

Wolfram, if you want to take this into your tree, let me know.

Thanks.

- Kukjin

> ---
>   arch/arm/plat-samsung/adc.c |    5 -----
>   1 file changed, 5 deletions(-)
>
> diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
> index ca07cb1..79690f2 100644
> --- a/arch/arm/plat-samsung/adc.c
> +++ b/arch/arm/plat-samsung/adc.c
> @@ -381,11 +381,6 @@ static int s3c_adc_probe(struct platform_device *pdev)
>   	}
>
>   	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!regs) {
> -		dev_err(dev, "failed to find registers\n");
> -		return -ENXIO;
> -	}
> -
>   	adc->regs = devm_ioremap_resource(dev, regs);
>   	if (IS_ERR(adc->regs))
>   		return PTR_ERR(adc->regs);


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

* [PATCH 30/33] arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
@ 2013-05-20 16:38     ` Kukjin Kim
  0 siblings, 0 replies; 96+ messages in thread
From: Kukjin Kim @ 2013-05-20 16:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/16/13 20:15, 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>

Looks good to me, applied into Samsung tree.

Wolfram, if you want to take this into your tree, let me know.

Thanks.

- Kukjin

> ---
>   arch/arm/plat-samsung/adc.c |    5 -----
>   1 file changed, 5 deletions(-)
>
> diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
> index ca07cb1..79690f2 100644
> --- a/arch/arm/plat-samsung/adc.c
> +++ b/arch/arm/plat-samsung/adc.c
> @@ -381,11 +381,6 @@ static int s3c_adc_probe(struct platform_device *pdev)
>   	}
>
>   	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!regs) {
> -		dev_err(dev, "failed to find registers\n");
> -		return -ENXIO;
> -	}
> -
>   	adc->regs = devm_ioremap_resource(dev, regs);
>   	if (IS_ERR(adc->regs))
>   		return PTR_ERR(adc->regs);

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

* Re: [PATCH 08/33] drivers/i2c/busses: don't check resource with devm_ioremap_resource
  2013-05-16 11:15   ` Wolfram Sang
@ 2013-05-20 16:40     ` Kukjin Kim
  -1 siblings, 0 replies; 96+ messages in thread
From: Kukjin Kim @ 2013-05-20 16:40 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Kukjin Kim, Stephen Warren, linux-samsung-soc,
	linux-i2c, Ben Dooks, Barry Song, linux-tegra, linux-arm-kernel

On 05/16/13 20:15, 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>

For i2c-s3c2410:
Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

- Kukjin

> ---
>   drivers/i2c/busses/i2c-s3c2410.c |    5 -----
>   drivers/i2c/busses/i2c-sirf.c    |    6 ------
>   drivers/i2c/busses/i2c-tegra.c   |    5 -----
>   3 files changed, 16 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
> index 6e8ee92..cab1c91 100644
> --- a/drivers/i2c/busses/i2c-s3c2410.c
> +++ b/drivers/i2c/busses/i2c-s3c2410.c
> @@ -1082,11 +1082,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
>   	/* map the registers */
>
>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (res == NULL) {
> -		dev_err(&pdev->dev, "cannot find IO resource\n");
> -		return -ENOENT;
> -	}
> -
>   	i2c->regs = devm_ioremap_resource(&pdev->dev, res);
>
>   	if (IS_ERR(i2c->regs))
> diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c
> index 5a7ad24..a63c7d5 100644
> --- a/drivers/i2c/busses/i2c-sirf.c
> +++ b/drivers/i2c/busses/i2c-sirf.c
> @@ -303,12 +303,6 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev)
>   	adap->class = I2C_CLASS_HWMON;
>
>   	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (mem_res == NULL) {
> -		dev_err(&pdev->dev, "Unable to get MEM resource\n");
> -		err = -EINVAL;
> -		goto out;
> -	}
> -
>   	siic->base = devm_ioremap_resource(&pdev->dev, mem_res);
>   	if (IS_ERR(siic->base)) {
>   		err = PTR_ERR(siic->base);
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index b60ff90..9aa1b60 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -714,11 +714,6 @@ static int tegra_i2c_probe(struct platform_device *pdev)
>   	int ret = 0;
>
>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "no mem resource\n");
> -		return -EINVAL;
> -	}
> -
>   	base = devm_ioremap_resource(&pdev->dev, res);
>   	if (IS_ERR(base))
>   		return PTR_ERR(base);

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

* [PATCH 08/33] drivers/i2c/busses: don't check resource with devm_ioremap_resource
@ 2013-05-20 16:40     ` Kukjin Kim
  0 siblings, 0 replies; 96+ messages in thread
From: Kukjin Kim @ 2013-05-20 16:40 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/16/13 20:15, 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>

For i2c-s3c2410:
Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

- Kukjin

> ---
>   drivers/i2c/busses/i2c-s3c2410.c |    5 -----
>   drivers/i2c/busses/i2c-sirf.c    |    6 ------
>   drivers/i2c/busses/i2c-tegra.c   |    5 -----
>   3 files changed, 16 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
> index 6e8ee92..cab1c91 100644
> --- a/drivers/i2c/busses/i2c-s3c2410.c
> +++ b/drivers/i2c/busses/i2c-s3c2410.c
> @@ -1082,11 +1082,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
>   	/* map the registers */
>
>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (res == NULL) {
> -		dev_err(&pdev->dev, "cannot find IO resource\n");
> -		return -ENOENT;
> -	}
> -
>   	i2c->regs = devm_ioremap_resource(&pdev->dev, res);
>
>   	if (IS_ERR(i2c->regs))
> diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c
> index 5a7ad24..a63c7d5 100644
> --- a/drivers/i2c/busses/i2c-sirf.c
> +++ b/drivers/i2c/busses/i2c-sirf.c
> @@ -303,12 +303,6 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev)
>   	adap->class = I2C_CLASS_HWMON;
>
>   	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (mem_res == NULL) {
> -		dev_err(&pdev->dev, "Unable to get MEM resource\n");
> -		err = -EINVAL;
> -		goto out;
> -	}
> -
>   	siic->base = devm_ioremap_resource(&pdev->dev, mem_res);
>   	if (IS_ERR(siic->base)) {
>   		err = PTR_ERR(siic->base);
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index b60ff90..9aa1b60 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -714,11 +714,6 @@ static int tegra_i2c_probe(struct platform_device *pdev)
>   	int ret = 0;
>
>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "no mem resource\n");
> -		return -EINVAL;
> -	}
> -
>   	base = devm_ioremap_resource(&pdev->dev, res);
>   	if (IS_ERR(base))
>   		return PTR_ERR(base);

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

* Re: [PATCH 30/33] arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
  2013-05-20 16:38     ` Kukjin Kim
@ 2013-05-20 17:11       ` Wolfram Sang
  -1 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-20 17:11 UTC (permalink / raw)
  To: Kukjin Kim
  Cc: linux-kernel, Ben Dooks, Russell King, linux-arm-kernel,
	linux-samsung-soc

On Tue, May 21, 2013 at 01:38:23AM +0900, Kukjin Kim wrote:
> On 05/16/13 20:15, 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>
> 
> Looks good to me, applied into Samsung tree.
> 
> Wolfram, if you want to take this into your tree, let me know.

It is already upstream :)


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

* [PATCH 30/33] arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
@ 2013-05-20 17:11       ` Wolfram Sang
  0 siblings, 0 replies; 96+ messages in thread
From: Wolfram Sang @ 2013-05-20 17:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, May 21, 2013 at 01:38:23AM +0900, Kukjin Kim wrote:
> On 05/16/13 20:15, 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>
> 
> Looks good to me, applied into Samsung tree.
> 
> Wolfram, if you want to take this into your tree, let me know.

It is already upstream :)

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

* Re: [PATCH 30/33] arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
  2013-05-20 17:11       ` Wolfram Sang
@ 2013-05-20 17:13         ` Kukjin Kim
  -1 siblings, 0 replies; 96+ messages in thread
From: Kukjin Kim @ 2013-05-20 17:13 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Kukjin Kim, linux-kernel, Ben Dooks, Russell King,
	linux-arm-kernel, linux-samsung-soc

On 05/21/13 02:11, Wolfram Sang wrote:
> On Tue, May 21, 2013 at 01:38:23AM +0900, Kukjin Kim wrote:
>> On 05/16/13 20:15, 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>
>>
>> Looks good to me, applied into Samsung tree.
>>
>> Wolfram, if you want to take this into your tree, let me know.
>
> It is already upstream :)
>
Oh, OK. Let me drop it in my tree ;-)

Thanks.

- Kukjin

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

* [PATCH 30/33] arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
@ 2013-05-20 17:13         ` Kukjin Kim
  0 siblings, 0 replies; 96+ messages in thread
From: Kukjin Kim @ 2013-05-20 17:13 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/21/13 02:11, Wolfram Sang wrote:
> On Tue, May 21, 2013 at 01:38:23AM +0900, Kukjin Kim wrote:
>> On 05/16/13 20:15, 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>
>>
>> Looks good to me, applied into Samsung tree.
>>
>> Wolfram, if you want to take this into your tree, let me know.
>
> It is already upstream :)
>
Oh, OK. Let me drop it in my tree ;-)

Thanks.

- Kukjin

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

* Re: [PATCH 14/33] drivers/pinctrl: don't check resource with devm_ioremap_resource
  2013-05-20 11:39   ` Linus Walleij
@ 2013-05-20 17:13     ` Wolfram Sang
  2013-05-20 18:34       ` Linus Walleij
  0 siblings, 1 reply; 96+ messages in thread
From: Wolfram Sang @ 2013-05-20 17:13 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-kernel

On Mon, May 20, 2013 at 01:39:28PM +0200, Linus Walleij wrote:
> On Thu, May 16, 2013 at 1:15 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 think I have already applied this?

Ah, you already applied the RFC? Shouldn't matter. Linus pulled this
series meanwhile, too.


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

* Re: [PATCH 14/33] drivers/pinctrl: don't check resource with devm_ioremap_resource
  2013-05-20 17:13     ` Wolfram Sang
@ 2013-05-20 18:34       ` Linus Walleij
  0 siblings, 0 replies; 96+ messages in thread
From: Linus Walleij @ 2013-05-20 18:34 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel

On Mon, May 20, 2013 at 7:13 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> On Mon, May 20, 2013 at 01:39:28PM +0200, Linus Walleij wrote:
>> On Thu, May 16, 2013 at 1:15 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 think I have already applied this?
>
> Ah, you already applied the RFC? Shouldn't matter. Linus pulled this
> series meanwhile, too.

I realized that a bit later, OK no problem, I'll get it out of my
tree somehow.

Yours,
Linus Walleij

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
  2013-05-16 11:15 ` Wolfram Sang
  (?)
@ 2013-05-23 20:32   ` Thierry Reding
  -1 siblings, 0 replies; 96+ messages in thread
From: Thierry Reding @ 2013-05-23 20:32 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mips, alsa-devel, linux-usb, Liam Girdwood,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Matt Mackall,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide, netdev,
	linux-mtd, linux-i2c, Evgeniy Polyakov, Wan ZongShun, ac100,
	devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Stephen Warren, Rafael J. Wysocki,
	cpufreq


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

On Thu, May 16, 2013 at 01:15:28PM +0200, Wolfram Sang wrote:
> Lately, I have been experimenting how to improve the devm interface to make
> writing device drivers easier and less error prone while also getting rid of
> its subtle issues. I think it has more potential but still needs work and
> definately conistency, especiall in its usage.
> 
> The first thing I come up with is a low hanging fruit regarding
> devm_ioremap_resouce(). This function already checks if the passed resource is
> valid and gives an error message if not. So, we can remove similar checks from
> the drivers and get rid of a bit of code and a number of inconsistent error
> strings.

Sorry for jumping in so late. I generally like the idea. One small
inconvenience is that devm_ioremap_resource() returns -EINVAL if
res == NULL, which means that drivers will now also return -EINVAL
in cases where no resource was returned. Typically drivers handle
this by returning something like -ENODEV, -ENXIO, -ENOENT. Some do
return -EINVAL but perhaps having a separate error code (and maybe
error message as well) for a missing resource would be helpful.

Doing this would be rather easy now that you've paved the way by
making devm_ioremap_resource() usage consistent across drivers.

Thierry

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

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

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-23 20:32   ` Thierry Reding
  0 siblings, 0 replies; 96+ messages in thread
From: Thierry Reding @ 2013-05-23 20:32 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, ac100, Alan Stern, Alessandro Zummo,
	Alexander Shishkin, alsa-devel, Arnd Bergmann, Barry Song,
	Ben Dooks, cpufreq, Dan Williams, David Airlie, David Woodhouse,
	Deepak Saxena, devel, dri-devel, Eduardo Valentin,
	Evgeniy Polyakov, Felipe Balbi, Florian Tobias Schandinat,
	Grant Likely, Greg Kroah-Hartman, Herbert Xu, Inki Dae,
	Jaroslav Kysela, Joonyoung Shim, Julian Andres Klode, Kukjin Kim,
	Kyungmin Park, Liam Girdwood, Linus Torvalds, Linus Walleij,
	linux-arm-kernel, linux-fbdev, linux-i2c, linux-ide, linux-mips,
	linux-mtd, linux-omap, linux-pm, linux-samsung-soc, linux-tegra,
	linux-usb, linux-watchdog, Marc Dietrich, Mark Brown,
	Matt Mackall, netdev, Paul Zimmerman, Rafael J. Wysocki,
	Ralf Baechle, rtc-linux, Russell King, Samuel Ortiz,
	Seung-Woo Kim, spi-devel-general, Stephen Warren, Takashi Iwai,
	Tejun Heo, Tomi Valkeinen, Tony Prisk, Vinod Koul, Viresh Kumar,
	Wan ZongShun, Wim Van Sebroeck, Zhang Rui

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

On Thu, May 16, 2013 at 01:15:28PM +0200, Wolfram Sang wrote:
> Lately, I have been experimenting how to improve the devm interface to make
> writing device drivers easier and less error prone while also getting rid of
> its subtle issues. I think it has more potential but still needs work and
> definately conistency, especiall in its usage.
> 
> The first thing I come up with is a low hanging fruit regarding
> devm_ioremap_resouce(). This function already checks if the passed resource is
> valid and gives an error message if not. So, we can remove similar checks from
> the drivers and get rid of a bit of code and a number of inconsistent error
> strings.

Sorry for jumping in so late. I generally like the idea. One small
inconvenience is that devm_ioremap_resource() returns -EINVAL if
res == NULL, which means that drivers will now also return -EINVAL
in cases where no resource was returned. Typically drivers handle
this by returning something like -ENODEV, -ENXIO, -ENOENT. Some do
return -EINVAL but perhaps having a separate error code (and maybe
error message as well) for a missing resource would be helpful.

Doing this would be rather easy now that you've paved the way by
making devm_ioremap_resource() usage consistent across drivers.

Thierry

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

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

* Re: [PATCH 00/33] devm improvement series, part 1, take 2
@ 2013-05-23 20:32   ` Thierry Reding
  0 siblings, 0 replies; 96+ messages in thread
From: Thierry Reding @ 2013-05-23 20:32 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-mips, alsa-devel, linux-usb, Liam Girdwood,
	Alexander Shishkin, Viresh Kumar, Linus Walleij, Matt Mackall,
	linux-fbdev, dri-devel, Jaroslav Kysela, linux-ide,
	Wim Van Sebroeck, netdev, linux-mtd, linux-i2c, Evgeniy Polyakov,
	Wan ZongShun, ac100, devel, Kukjin Kim, Russell King, Herbert Xu,
	Florian Tobias Schandinat, Marc Dietrich, Stephen Warren,
	Rafael J. Wysocki, cpufreq, Eduardo Valentin, David Airlie,
	Tomi Valkeinen, Alan Stern, Grant Likely, Zhang Rui,
	Deepak Saxena, linux-watchdog, Arnd Bergmann, linux-pm,
	Julian Andres Klode, Inki Dae, linux-samsung-soc, Ben Dooks,
	Barry Song, linux-tegra, rtc-linux, linux-omap, linux-arm-kernel,
	Joonyoung Shim, Alessandro Zummo, spi-devel-general,
	Greg Kroah-Hartman, Ralf Baechle, Linus Torvalds, Seung-Woo Kim,
	linux-kernel, Felipe Balbi, Tony Prisk, Vinod Koul,
	Kyungmin Park, Mark Brown, Takashi Iwai, Dan Williams, Tejun Heo,
	Samuel Ortiz, David Woodhouse, Paul Zimmerman

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

On Thu, May 16, 2013 at 01:15:28PM +0200, Wolfram Sang wrote:
> Lately, I have been experimenting how to improve the devm interface to make
> writing device drivers easier and less error prone while also getting rid of
> its subtle issues. I think it has more potential but still needs work and
> definately conistency, especiall in its usage.
> 
> The first thing I come up with is a low hanging fruit regarding
> devm_ioremap_resouce(). This function already checks if the passed resource is
> valid and gives an error message if not. So, we can remove similar checks from
> the drivers and get rid of a bit of code and a number of inconsistent error
> strings.

Sorry for jumping in so late. I generally like the idea. One small
inconvenience is that devm_ioremap_resource() returns -EINVAL if
res == NULL, which means that drivers will now also return -EINVAL
in cases where no resource was returned. Typically drivers handle
this by returning something like -ENODEV, -ENXIO, -ENOENT. Some do
return -EINVAL but perhaps having a separate error code (and maybe
error message as well) for a missing resource would be helpful.

Doing this would be rather easy now that you've paved the way by
making devm_ioremap_resource() usage consistent across drivers.

Thierry

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

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

end of thread, other threads:[~2013-05-23 20:36 UTC | newest]

Thread overview: 96+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-16 11:15 [PATCH 00/33] devm improvement series, part 1, take 2 Wolfram Sang
2013-05-16 11:15 ` Wolfram Sang
2013-05-16 11:15 ` Wolfram Sang
2013-05-16 11:15 ` [PATCH 01/33] drivers/ata: don't check resource with devm_ioremap_resource Wolfram Sang
2013-05-16 11:15 ` [PATCH 02/33] drivers/char/hw_random: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 03/33] drivers/cpufreq: " Wolfram Sang
2013-05-16 11:15   ` Viresh Kumar
     [not found] ` <1368702961-4325-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-05-16 11:15   ` [PATCH 04/33] drivers/dma: " Wolfram Sang
2013-05-16 11:15     ` Wolfram Sang
2013-05-16 11:15   ` [PATCH 17/33] drivers/spi: " Wolfram Sang
2013-05-16 11:15     ` Wolfram Sang
2013-05-16 11:15 ` [PATCH 05/33] drivers/gpio: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 06/33] drivers/gpu/drm/exynos: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 07/33] drivers/gpu/host1x/drm: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 08/33] drivers/i2c/busses: " Wolfram Sang
2013-05-16 11:15   ` Wolfram Sang
     [not found]   ` <1368702961-4325-9-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-05-16 12:22     ` Barry Song
2013-05-16 12:22       ` Barry Song
2013-05-16 12:22       ` Barry Song
2013-05-20 16:40   ` Kukjin Kim
2013-05-20 16:40     ` Kukjin Kim
2013-05-16 11:15 ` [PATCH 09/33] drivers/memory: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 10/33] drivers/mfd: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 11/33] drivers/misc: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 12/33] drivers/mtd/nand: " Wolfram Sang
2013-05-16 11:15   ` Wolfram Sang
2013-05-16 11:15 ` [PATCH 13/33] drivers/net/ethernet/renesas: " Wolfram Sang
2013-05-16 15:37   ` Joe Perches
2013-05-16 11:15 ` [PATCH 14/33] drivers/pinctrl: " Wolfram Sang
2013-05-20 11:39   ` Linus Walleij
2013-05-20 17:13     ` Wolfram Sang
2013-05-20 18:34       ` Linus Walleij
2013-05-16 11:15 ` [PATCH 15/33] drivers/pwm: " Wolfram Sang
2013-05-16 11:15   ` Wolfram Sang
2013-05-16 11:15 ` [PATCH 16/33] drivers/rtc: " Wolfram Sang
2013-05-16 11:15   ` Wolfram Sang
2013-05-16 11:15   ` Wolfram Sang
2013-05-16 11:15 ` [PATCH 18/33] drivers/staging/dwc2: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 19/33] drivers/staging/nvec: " Wolfram Sang
2013-05-16 11:15   ` Wolfram Sang
2013-05-16 11:15 ` [PATCH 20/33] drivers/thermal: " Wolfram Sang
2013-05-20 15:38   ` Zhang, Rui
2013-05-16 11:15 ` [PATCH 21/33] drivers/usb/chipidea: " Wolfram Sang
2013-05-16 11:29   ` Alexander Shishkin
2013-05-16 11:15 ` [PATCH 22/33] drivers/usb/gadget: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 23/33] drivers/usb/host: " Wolfram Sang
2013-05-16 14:27   ` Alan Stern
2013-05-16 11:15 ` [PATCH 24/33] drivers/usb/phy: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 25/33] drivers/video/omap2: " Wolfram Sang
2013-05-16 11:15   ` Wolfram Sang
2013-05-16 11:15 ` [PATCH 26/33] drivers/video/omap2/dss: " Wolfram Sang
2013-05-16 11:15   ` Wolfram Sang
2013-05-16 11:15 ` [PATCH 27/33] drivers/w1/masters: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 28/33] drivers/watchdog: " Wolfram Sang
2013-05-16 11:15 ` [PATCH 29/33] arch/arm/mach-tegra: " Wolfram Sang
2013-05-16 11:15   ` Wolfram Sang
2013-05-16 11:15 ` [PATCH 30/33] arch/arm/plat-samsung: " Wolfram Sang
2013-05-16 11:15   ` Wolfram Sang
2013-05-20 16:38   ` Kukjin Kim
2013-05-20 16:38     ` Kukjin Kim
2013-05-20 17:11     ` Wolfram Sang
2013-05-20 17:11       ` Wolfram Sang
2013-05-20 17:13       ` Kukjin Kim
2013-05-20 17:13         ` Kukjin Kim
2013-05-16 11:15 ` [PATCH 31/33] arch/mips/lantiq/xway: " Wolfram Sang
2013-05-16 14:42   ` John Crispin
2013-05-16 11:16 ` [PATCH 32/33] sound/soc/fsl: " Wolfram Sang
2013-05-16 11:16 ` [PATCH 33/33] sound/soc/kirkwood: " Wolfram Sang
2013-05-16 11:57 ` [PATCH 00/33] devm improvement series, part 1, take 2 Artem Bityutskiy
2013-05-16 11:57   ` Artem Bityutskiy
2013-05-16 11:57   ` Artem Bityutskiy
2013-05-16 12:55   ` Viresh Kumar
2013-05-16 12:55     ` Viresh Kumar
2013-05-16 12:55     ` Viresh Kumar
2013-05-16 12:55     ` Viresh Kumar
2013-05-16 13:11     ` Artem Bityutskiy
2013-05-16 13:11       ` Artem Bityutskiy
2013-05-16 13:11       ` Artem Bityutskiy
2013-05-16 13:11       ` Artem Bityutskiy
2013-05-16 13:11       ` Artem Bityutskiy
2013-05-16 13:17       ` Tomi Valkeinen
2013-05-16 13:17         ` Tomi Valkeinen
2013-05-16 13:17         ` Tomi Valkeinen
2013-05-16 13:17         ` Tomi Valkeinen
2013-05-16 13:17         ` Tomi Valkeinen
2013-05-16 16:13       ` Wolfram Sang
2013-05-16 16:13         ` Wolfram Sang
2013-05-16 16:13         ` Wolfram Sang
2013-05-16 16:13         ` Wolfram Sang
2013-05-16 18:29 ` Stephen Warren
2013-05-16 18:29   ` Stephen Warren
2013-05-16 18:29   ` Stephen Warren
2013-05-16 18:29   ` Stephen Warren
2013-05-23 20:32 ` Thierry Reding
2013-05-23 20:32   ` Thierry Reding
2013-05-23 20:32   ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.