From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
Joel Stanley <joel@jms.id.au>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Baruch Siach <baruch@tkos.co.il>,
Keguang Zhang <keguang.zhang@gmail.com>,
Vladimir Zapolskiy <vz@mleia.com>,
Kevin Hilman <khilman@baylibre.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Avi Fishman <avifishman70@gmail.com>,
Nancy Yuen <yuenn@google.com>,
Brendan Higgins <brendanhiggins@google.com>,
Wan ZongShun <mcuos.com@gmail.com>,
Michal Simek <michal.simek@xilinx.com>,
Sylvain Lemieux <slemieux.tyco@gmail.com>,
Kukjin Kim <kgene@kernel.org>, Barry Song <baohua@kernel.org>,
Orson Zhai <orsonzhai@gmail.com>,
Patrice Chotard <patrice.chotard@st.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Chen-Yu Tsai <wens@csie.org>,
Marc Gonzalez <marc.w.gonzalez@free.fr>,
Thierry Reding <thierry.reding@gmail.com>,
Shawn Guo <shawnguo@kernel.org>
Subject: Re: [PATCH] watchdog: Convert to use devm_platform_ioremap_resource
Date: Wed, 3 Apr 2019 08:08:11 +0200 [thread overview]
Message-ID: <20190403060811.kiqs2oalrgtyqvhw@flea> (raw)
In-Reply-To: <1554231713-14137-1-git-send-email-linux@roeck-us.net>
[-- Attachment #1: Type: text/plain, Size: 2026 bytes --]
On Tue, Apr 02, 2019 at 12:01:53PM -0700, Guenter Roeck wrote:
> Use devm_platform_ioremap_resource to reduce source code size,
> improve readability, and reduce the likelyhood of bugs.
>
> The conversion was done automatically with coccinelle using the
> following semantic patch.
>
> @r@
> identifier res, pdev;
> expression a;
> expression index;
> expression e;
> @@
>
> <+...
> - res = platform_get_resource(pdev, IORESOURCE_MEM, index);
> - a = devm_ioremap_resource(e, res);
> + a = devm_platform_ioremap_resource(pdev, index);
> ...+>
>
> @depends on r@
> identifier r.res;
> @@
> - struct resource *res;
> ... when != res
>
> @@
> identifier res, pdev;
> expression index;
> expression a;
> @@
> - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, index);
> - a = devm_ioremap_resource(&pdev->dev, res);
> + a = devm_platform_ioremap_resource(pdev, index);
>
> Cc: Joel Stanley <joel@jms.id.au>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: Keguang Zhang <keguang.zhang@gmail.com>
> Cc: Vladimir Zapolskiy <vz@mleia.com>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: Avi Fishman <avifishman70@gmail.com>
> Cc: Nancy Yuen <yuenn@google.com>
> Cc: Brendan Higgins <brendanhiggins@google.com>
> Cc: Wan ZongShun <mcuos.com@gmail.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Sylvain Lemieux <slemieux.tyco@gmail.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Barry Song <baohua@kernel.org>
> Cc: Orson Zhai <orsonzhai@gmail.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
> Cc: Maxime Ripard <maxime.ripard@bootlin.com>
For sunxi_wdt
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Thanks!
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2019-04-03 6:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 19:01 [PATCH] watchdog: Convert to use devm_platform_ioremap_resource Guenter Roeck
2019-04-02 21:29 ` Alexandre Belloni
2019-04-03 0:22 ` Joel Stanley
2019-04-03 4:18 ` Linus Walleij
2019-04-03 6:08 ` Maxime Ripard [this message]
2019-04-03 7:09 ` Michal Simek
2019-04-03 8:47 ` Thierry Reding
2019-04-03 15:10 ` Florian Fainelli
2019-04-04 9:23 ` Patrice CHOTARD
2019-04-05 17:59 ` Vladimir Zapolskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190403060811.kiqs2oalrgtyqvhw@flea \
--to=maxime.ripard@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=avifishman70@gmail.com \
--cc=baohua@kernel.org \
--cc=baruch@tkos.co.il \
--cc=brendanhiggins@google.com \
--cc=f.fainelli@gmail.com \
--cc=joel@jms.id.au \
--cc=keguang.zhang@gmail.com \
--cc=kgene@kernel.org \
--cc=khilman@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=marc.w.gonzalez@free.fr \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mcuos.com@gmail.com \
--cc=michal.simek@xilinx.com \
--cc=nicolas.ferre@microchip.com \
--cc=orsonzhai@gmail.com \
--cc=patrice.chotard@st.com \
--cc=shawnguo@kernel.org \
--cc=slemieux.tyco@gmail.com \
--cc=thierry.reding@gmail.com \
--cc=vz@mleia.com \
--cc=wens@csie.org \
--cc=wim@linux-watchdog.org \
--cc=yuenn@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox