linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amit Kucheria <amit.kucheria@linaro.org>
To: YueHaibing <yuehaibing@huawei.com>
Cc: miquel.raynal@bootlin.com, Zhang Rui <rui.zhang@intel.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Eric Anholt <eric@anholt.net>,
	wahrenst@gmx.net, f.fainelli@gmail.com, rjui@broadcom.com,
	sbranden@broadcom.com, Markus Mayer <mmayer@broadcom.com>,
	computersforpeace@gmail.com, gregory.0xf0@gmail.com,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Andy Gross <agross@kernel.org>, Heiko Stuebner <heiko@sntech.de>,
	mcoquelin.stm32@gmail.com, alexandre.torgue@st.com,
	Marc Gonzalez <marc.w.gonzalez@free.fr>,
	mans@mansr.com, talel@amazon.com, Jun Nie <jun.nie@linaro.org>,
	Shawn Guo <shawnguo@kernel.org>,
	phil@raspberrypi.org, gregkh@linuxfoundation.org,
	david.hernandezsanchez@st.com, horms+renesas@verge.net.au,
	wsa+renesas@sang-engineering.com,
	bcm-kernel-feedback-list@broadcom.com,
	Linux PM list <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-rpi-kernel@lists.infradead.org,
	lakml <linux-arm-kernel@lists.infradead.org>,
	linux-mediatek@lists.infradead.org,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	linux-rockchip@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH -next 08/15] thermal: tsens: use devm_platform_ioremap_resource() to simplify code
Date: Thu, 5 Sep 2019 11:45:30 +0530	[thread overview]
Message-ID: <CAHLCerOVuNEAkCggBoDU4NgbzhTVxpdJXeTXVrTs5tp7ZVtSMg@mail.gmail.com> (raw)
In-Reply-To: <20190904122939.23780-9-yuehaibing@huawei.com>

On Wed, Sep 4, 2019 at 6:05 PM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: Amit Kucheria <amit.kucheria@linaro.org>

> ---
>  drivers/thermal/qcom/tsens-common.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c
> index 528df88..43ce4fb 100644
> --- a/drivers/thermal/qcom/tsens-common.c
> +++ b/drivers/thermal/qcom/tsens-common.c
> @@ -155,7 +155,6 @@ int __init init_common(struct tsens_priv *priv)
>  {
>         void __iomem *tm_base, *srot_base;
>         struct device *dev = priv->dev;
> -       struct resource *res;
>         u32 enabled;
>         int ret, i, j;
>         struct platform_device *op = of_find_device_by_node(priv->dev->of_node);
> @@ -166,8 +165,7 @@ int __init init_common(struct tsens_priv *priv)
>         if (op->num_resources > 1) {
>                 /* DT with separate SROT and TM address space */
>                 priv->tm_offset = 0;
> -               res = platform_get_resource(op, IORESOURCE_MEM, 1);
> -               srot_base = devm_ioremap_resource(&op->dev, res);
> +               srot_base = devm_platform_ioremap_resource(op, 1);
>                 if (IS_ERR(srot_base)) {
>                         ret = PTR_ERR(srot_base);
>                         goto err_put_device;
> @@ -184,8 +182,7 @@ int __init init_common(struct tsens_priv *priv)
>                 priv->tm_offset = 0x1000;
>         }
>
> -       res = platform_get_resource(op, IORESOURCE_MEM, 0);
> -       tm_base = devm_ioremap_resource(&op->dev, res);
> +       tm_base = devm_platform_ioremap_resource(op, 0);
>         if (IS_ERR(tm_base)) {
>                 ret = PTR_ERR(tm_base);
>                 goto err_put_device;
> --
> 2.7.4
>
>

  parent reply	other threads:[~2019-09-05  6:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 12:29 [PATCH -next 00/15] use devm_platform_ioremap_resource() to simplify code YueHaibing
2019-09-04 12:29 ` [PATCH -next 01/15] thermal: armada: " YueHaibing
2019-09-04 12:43   ` Miquel Raynal
2019-09-04 12:29 ` [PATCH -next 02/15] thermal: bcm2835: " YueHaibing
2019-09-05 18:41   ` Stefan Wahren
2019-09-04 12:29 ` [PATCH -next 03/15] thermal: brcmstb: " YueHaibing
2019-09-04 17:00   ` Florian Fainelli
2019-09-04 12:29 ` [PATCH -next 04/15] thermal: hisilicon: " YueHaibing
2019-09-04 12:29 ` [PATCH -next 05/15] thermal: dove: " YueHaibing
2019-09-04 12:29 ` [PATCH -next 06/15] thermal: mtk: " YueHaibing
2019-09-04 12:29 ` [PATCH -next 07/15] thermal: kirkwood: " YueHaibing
2019-09-04 12:29 ` [PATCH -next 08/15] thermal: tsens: " YueHaibing
2019-09-04 21:50   ` Bjorn Andersson
2019-09-05  6:15   ` Amit Kucheria [this message]
2019-09-04 12:29 ` [PATCH -next 09/15] thermal: rockchip: " YueHaibing
2019-10-04 21:49   ` Heiko Stuebner
2019-09-04 12:29 ` [PATCH -next 10/15] thermal: spear: " YueHaibing
2019-09-04 12:29 ` [PATCH -next 11/15] thermal: stm32: " YueHaibing
2019-09-04 12:29 ` [PATCH -next 12/15] thermal: tango: " YueHaibing
2019-09-05 11:06   ` Måns Rullgård
2019-09-04 12:29 ` [PATCH -next 13/15] thermal: thermal_mmio: " YueHaibing
2019-09-04 13:15   ` Talel Shenhar
2019-09-04 12:29 ` [PATCH -next 14/15] thermal: zx2967: " YueHaibing
2019-09-04 12:29 ` [PATCH -next 15/15] thermal: rcar: " YueHaibing
2019-09-04 17:25   ` Wolfram Sang

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=CAHLCerOVuNEAkCggBoDU4NgbzhTVxpdJXeTXVrTs5tp7ZVtSMg@mail.gmail.com \
    --to=amit.kucheria@linaro.org \
    --cc=agross@kernel.org \
    --cc=alexandre.torgue@st.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=computersforpeace@gmail.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=david.hernandezsanchez@st.com \
    --cc=edubezval@gmail.com \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.0xf0@gmail.com \
    --cc=heiko@sntech.de \
    --cc=horms+renesas@verge.net.au \
    --cc=jun.nie@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mans@mansr.com \
    --cc=marc.w.gonzalez@free.fr \
    --cc=matthias.bgg@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=mmayer@broadcom.com \
    --cc=phil@raspberrypi.org \
    --cc=rjui@broadcom.com \
    --cc=rui.zhang@intel.com \
    --cc=sbranden@broadcom.com \
    --cc=shawnguo@kernel.org \
    --cc=talel@amazon.com \
    --cc=wahrenst@gmx.net \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yuehaibing@huawei.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;
as well as URLs for NNTP newsgroup(s).