mbox series

[-next,00/30] pinctrl: use devm_platform_ioremap_resource() to simplify code

Message ID 20191017122640.22976-1-yuehaibing@huawei.com (mailing list archive)
Headers show
Series pinctrl: use devm_platform_ioremap_resource() to simplify code | expand

Message

Yue Haibing Oct. 17, 2019, 12:26 p.m. UTC
devm_platform_ioremap_resource() internally have platform_get_resource()
and devm_ioremap_resource() in it. So instead of calling them separately
use devm_platform_ioremap_resource() directly.

YueHaibing (30):
  pinctrl: pxa25x: use devm_platform_ioremap_resource() to simplify code
  pinctrl: pxa27x: use devm_platform_ioremap_resource() to simplify code
  pinctrl: cygnus-mux: use devm_platform_ioremap_resource() to simplify
    code
  pinctrl: pic32: use devm_platform_ioremap_resource() to simplify code
  pinctrl: nsp-gpio: use devm_platform_ioremap_resource() to simplify
    code
  pinctrl: nsp: use devm_platform_ioremap_resource() to simplify code
  pinctrl: ns2: use devm_platform_ioremap_resource() to simplify code
  pinctrl: bcm281xx: use devm_platform_ioremap_resource() to simplify
    code
  pinctrl: sunxi: use devm_platform_ioremap_resource() to simplify code
  pinctrl: tegra: use devm_platform_ioremap_resource() to simplify code
  pinctrl: msm: use devm_platform_ioremap_resource() to simplify code
  pinctrl: spear: use devm_platform_ioremap_resource() to simplify code
  pinctrl: zte: use devm_platform_ioremap_resource() to simplify code
  pinctrl: at91: use devm_platform_ioremap_resource() to simplify code
  pinctrl: oxnas: use devm_platform_ioremap_resource() to simplify code
  pinctrl: pistachio: use devm_platform_ioremap_resource() to simplify
    code
  pinctrl: lpc18xx: use devm_platform_ioremap_resource() to simplify
    code
  pinctrl: da850-pupd: use devm_platform_ioremap_resource() to simplify
    code
  pinctrl: tb10x: use devm_platform_ioremap_resource() to simplify code
  pinctrl: u300: use devm_platform_ioremap_resource() to simplify code
  pinctrl: vt8500: use devm_platform_ioremap_resource() to simplify code
  pinctrl: xway: use devm_platform_ioremap_resource() to simplify code
  pinctrl: rza2: use devm_platform_ioremap_resource() to simplify code
  pinctrl: digicolor: use devm_platform_ioremap_resource() to simplify
    code
  pinctrl: coh901: use devm_platform_ioremap_resource() to simplify code
  pinctrl: bm1880: use devm_platform_ioremap_resource() to simplify code
  pinctrl: artpec6: use devm_platform_ioremap_resource() to simplify
    code
  pinctrl: actions: use devm_platform_ioremap_resource() to simplify
    code
  pinctrl: at91-pio4: use devm_platform_ioremap_resource() to simplify
    code
  pinctrl: iproc: use devm_platform_ioremap_resource() to simplify code

 drivers/pinctrl/actions/pinctrl-owl.c      |  4 +---
 drivers/pinctrl/bcm/pinctrl-bcm281xx.c     |  4 +---
 drivers/pinctrl/bcm/pinctrl-cygnus-mux.c   |  7 ++-----
 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c   |  3 +--
 drivers/pinctrl/bcm/pinctrl-ns2-mux.c      |  6 ++----
 drivers/pinctrl/bcm/pinctrl-nsp-gpio.c     |  7 ++-----
 drivers/pinctrl/bcm/pinctrl-nsp-mux.c      |  6 ++----
 drivers/pinctrl/pinctrl-artpec6.c          |  4 +---
 drivers/pinctrl/pinctrl-at91-pio4.c        |  3 +--
 drivers/pinctrl/pinctrl-at91.c             |  4 +---
 drivers/pinctrl/pinctrl-bm1880.c           |  4 +---
 drivers/pinctrl/pinctrl-coh901.c           |  4 +---
 drivers/pinctrl/pinctrl-da850-pupd.c       |  4 +---
 drivers/pinctrl/pinctrl-digicolor.c        |  4 +---
 drivers/pinctrl/pinctrl-lpc18xx.c          |  4 +---
 drivers/pinctrl/pinctrl-oxnas.c            |  4 +---
 drivers/pinctrl/pinctrl-pic32.c            |  4 +---
 drivers/pinctrl/pinctrl-pistachio.c        |  4 +---
 drivers/pinctrl/pinctrl-rza2.c             |  4 +---
 drivers/pinctrl/pinctrl-tb10x.c            |  4 +---
 drivers/pinctrl/pinctrl-u300.c             |  4 +---
 drivers/pinctrl/pinctrl-xway.c             |  4 +---
 drivers/pinctrl/pxa/pinctrl-pxa25x.c       | 13 ++++---------
 drivers/pinctrl/pxa/pinctrl-pxa27x.c       | 13 ++++---------
 drivers/pinctrl/qcom/pinctrl-msm.c         |  3 +--
 drivers/pinctrl/spear/pinctrl-plgpio.c     |  4 +---
 drivers/pinctrl/spear/pinctrl-spear.c      |  4 +---
 drivers/pinctrl/sunxi/pinctrl-sunxi.c      |  4 +---
 drivers/pinctrl/tegra/pinctrl-tegra-xusb.c |  4 +---
 drivers/pinctrl/tegra/pinctrl-tegra.c      |  3 +--
 drivers/pinctrl/vt8500/pinctrl-wmt.c       |  4 +---
 drivers/pinctrl/zte/pinctrl-zx.c           |  4 +---
 32 files changed, 42 insertions(+), 110 deletions(-)

Comments

Alexandre Belloni Oct. 17, 2019, 1:09 p.m. UTC | #1
Hi,

On 17/10/2019 20:26:10+0800, YueHaibing wrote:
> devm_platform_ioremap_resource() internally have platform_get_resource()
> and devm_ioremap_resource() in it. So instead of calling them separately
> use devm_platform_ioremap_resource() directly.
> 

Shouldn't we stop with this insanity? The net gain is exactly 2 lines
per driver and this puts the full review load on the maintainers.

We end up with crap like:

https://lore.kernel.org/lkml/9bbcce19c777583815c92ce3c2ff2586@www.loen.fr/

What is the end goal here ?

platform_get_resource and devm_ioremap_resource will have to stay even
after you have done the conversion.