From: Patrice CHOTARD <patrice.chotard@st.com>
To: Guenter Roeck <linux@roeck-us.net>,
Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: "linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
"linux-kernel@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>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
Maxime Ripard <maxime.ripard@bootlin.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: Thu, 4 Apr 2019 09:23:49 +0000 [thread overview]
Message-ID: <8283ed6e-baf6-280f-d2dd-9ab96493dfb7@st.com> (raw)
In-Reply-To: <1554231713-14137-1-git-send-email-linux@roeck-us.net>
Hi
On 4/2/19 9:01 PM, 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>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Marc Gonzalez <marc.w.gonzalez@free.fr>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/st_lpc_wdt.c | 4 +---
For st_lpc_wdt
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Thanks
next prev parent reply other threads:[~2019-04-04 9:24 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
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 [this message]
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=8283ed6e-baf6-280f-d2dd-9ab96493dfb7@st.com \
--to=patrice.chotard@st.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=maxime.ripard@bootlin.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=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