All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: <miquel.raynal@bootlin.com>, <rui.zhang@intel.com>,
	<edubezval@gmail.com>, <daniel.lezcano@linaro.org>,
	<amit.kucheria@verdurent.com>, <eric@anholt.net>,
	<wahrenst@gmx.net>, <f.fainelli@gmail.com>, <rjui@broadcom.com>,
	<sbranden@broadcom.com>, <mmayer@broadcom.com>,
	<computersforpeace@gmail.com>, <gregory.0xf0@gmail.com>,
	<matthias.bgg@gmail.com>, <agross@kernel.org>, <heiko@sntech.de>,
	<mcoquelin.stm32@gmail.com>, <alexandre.torgue@st.com>,
	<marc.w.gonzalez@free.fr>, <talel@amazon.com>,
	<jun.nie@linaro.org>, <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@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-rpi-kernel@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-arm-msm@vger.kernel.org>,
	<linux-rockchip@lists.infradead.org>,
	<linux-stm32@st-md-mailman.stormreply.com>
Subject: Re: [PATCH -next 12/15] thermal: tango: use devm_platform_ioremap_resource() to simplify code
Date: Thu, 05 Sep 2019 12:06:54 +0100	[thread overview]
Message-ID: <yw1xmufj6lyp.fsf@mansr.com> (raw)
In-Reply-To: <20190904122939.23780-13-yuehaibing@huawei.com> (yuehaibing@huawei.com's message of "Wed, 4 Sep 2019 20:29:36 +0800")

YueHaibing <yuehaibing@huawei.com> writes:

> 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: Mans Rullgard <mans@mansr.com>

> ---
>  drivers/thermal/tango_thermal.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/thermal/tango_thermal.c b/drivers/thermal/tango_thermal.c
> index 304b461..f44441b 100644
> --- a/drivers/thermal/tango_thermal.c
> +++ b/drivers/thermal/tango_thermal.c
> @@ -73,7 +73,6 @@ static void tango_thermal_init(struct tango_thermal_priv *priv)
>
>  static int tango_thermal_probe(struct platform_device *pdev)
>  {
> -	struct resource *res;
>  	struct tango_thermal_priv *priv;
>  	struct thermal_zone_device *tzdev;
>
> @@ -81,8 +80,7 @@ static int tango_thermal_probe(struct platform_device *pdev)
>  	if (!priv)
>  		return -ENOMEM;
>
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	priv->base = devm_ioremap_resource(&pdev->dev, res);
> +	priv->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(priv->base))
>  		return PTR_ERR(priv->base);
>
> -- 
> 2.7.4
>

-- 
Måns Rullgård

WARNING: multiple messages have this Message-ID (diff)
From: "Måns Rullgård" <mans@mansr.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: miquel.raynal@bootlin.com, rui.zhang@intel.com,
	edubezval@gmail.com, daniel.lezcano@linaro.org,
	amit.kucheria@verdurent.com, eric@anholt.net, wahrenst@gmx.net,
	f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com,
	mmayer@broadcom.com, computersforpeace@gmail.com,
	gregory.0xf0@gmail.com, matthias.bgg@gmail.com,
	agross@kernel.org, heiko@sntech.de, mcoquelin.stm32@gmail.com,
	alexandre.torgue@st.com, marc.w.gonzalez@free.fr,
	talel@amazon.com, jun.nie@linaro.org, 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@vger.kernel.org,
	linux-kernel@vger.kerne
Subject: Re: [PATCH -next 12/15] thermal: tango: use devm_platform_ioremap_resource() to simplify code
Date: Thu, 05 Sep 2019 12:06:54 +0100	[thread overview]
Message-ID: <yw1xmufj6lyp.fsf@mansr.com> (raw)
In-Reply-To: <20190904122939.23780-13-yuehaibing@huawei.com> (yuehaibing@huawei.com's message of "Wed, 4 Sep 2019 20:29:36 +0800")

YueHaibing <yuehaibing@huawei.com> writes:

> 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: Mans Rullgard <mans@mansr.com>

> ---
>  drivers/thermal/tango_thermal.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/thermal/tango_thermal.c b/drivers/thermal/tango_thermal.c
> index 304b461..f44441b 100644
> --- a/drivers/thermal/tango_thermal.c
> +++ b/drivers/thermal/tango_thermal.c
> @@ -73,7 +73,6 @@ static void tango_thermal_init(struct tango_thermal_priv *priv)
>
>  static int tango_thermal_probe(struct platform_device *pdev)
>  {
> -	struct resource *res;
>  	struct tango_thermal_priv *priv;
>  	struct thermal_zone_device *tzdev;
>
> @@ -81,8 +80,7 @@ static int tango_thermal_probe(struct platform_device *pdev)
>  	if (!priv)
>  		return -ENOMEM;
>
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	priv->base = devm_ioremap_resource(&pdev->dev, res);
> +	priv->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(priv->base))
>  		return PTR_ERR(priv->base);
>
> -- 
> 2.7.4
>

-- 
Måns Rullgård

WARNING: multiple messages have this Message-ID (diff)
From: "Måns Rullgård" <mans@mansr.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: mmayer@broadcom.com, eric@anholt.net, miquel.raynal@bootlin.com,
	linux-stm32@st-md-mailman.stormreply.com, heiko@sntech.de,
	amit.kucheria@verdurent.com, f.fainelli@gmail.com,
	daniel.lezcano@linaro.org, phil@raspberrypi.org,
	linux-rockchip@lists.infradead.org, agross@kernel.org,
	bcm-kernel-feedback-list@broadcom.com,
	linux-arm-msm@vger.kernel.org, rui.zhang@intel.com,
	david.hernandezsanchez@st.com, alexandre.torgue@st.com,
	marc.w.gonzalez@free.fr, rjui@broadcom.com, edubezval@gmail.com,
	linux-mediatek@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org, gregory.0xf0@gmail.com,
	matthias.bgg@gmail.com, horms+renesas@verge.net.au,
	talel@amazon.com, linux-arm-kernel@lists.infradead.org,
	sbranden@broadcom.com, wsa+renesas@sang-engineering.com,
	gregkh@linuxfoundation.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, wahrenst@gmx.net,
	mcoquelin.stm32@gmail.com, jun.nie@linaro.org,
	computersforpeace@gmail.com, shawnguo@kernel.org
Subject: Re: [PATCH -next 12/15] thermal: tango: use devm_platform_ioremap_resource() to simplify code
Date: Thu, 05 Sep 2019 12:06:54 +0100	[thread overview]
Message-ID: <yw1xmufj6lyp.fsf@mansr.com> (raw)
In-Reply-To: <20190904122939.23780-13-yuehaibing@huawei.com> (yuehaibing@huawei.com's message of "Wed, 4 Sep 2019 20:29:36 +0800")

YueHaibing <yuehaibing@huawei.com> writes:

> 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: Mans Rullgard <mans@mansr.com>

> ---
>  drivers/thermal/tango_thermal.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/thermal/tango_thermal.c b/drivers/thermal/tango_thermal.c
> index 304b461..f44441b 100644
> --- a/drivers/thermal/tango_thermal.c
> +++ b/drivers/thermal/tango_thermal.c
> @@ -73,7 +73,6 @@ static void tango_thermal_init(struct tango_thermal_priv *priv)
>
>  static int tango_thermal_probe(struct platform_device *pdev)
>  {
> -	struct resource *res;
>  	struct tango_thermal_priv *priv;
>  	struct thermal_zone_device *tzdev;
>
> @@ -81,8 +80,7 @@ static int tango_thermal_probe(struct platform_device *pdev)
>  	if (!priv)
>  		return -ENOMEM;
>
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	priv->base = devm_ioremap_resource(&pdev->dev, res);
> +	priv->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(priv->base))
>  		return PTR_ERR(priv->base);
>
> -- 
> 2.7.4
>

-- 
Måns Rullgård

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-09-05 11:06 UTC|newest]

Thread overview: 73+ 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 ` YueHaibing
2019-09-04 12:29 ` YueHaibing
2019-09-04 12:29 ` [PATCH -next 01/15] thermal: armada: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:43   ` Miquel Raynal
2019-09-04 12:43     ` Miquel Raynal
2019-09-04 12:43     ` Miquel Raynal
2019-09-04 12:29 ` [PATCH -next 02/15] thermal: bcm2835: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-05 18:41   ` Stefan Wahren
2019-09-05 18:41     ` Stefan Wahren
2019-09-04 12:29 ` [PATCH -next 03/15] thermal: brcmstb: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 17:00   ` Florian Fainelli
2019-09-04 17:00     ` Florian Fainelli
2019-09-04 12:29 ` [PATCH -next 04/15] thermal: hisilicon: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29 ` [PATCH -next 05/15] thermal: dove: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29 ` [PATCH -next 06/15] thermal: mtk: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29 ` [PATCH -next 07/15] thermal: kirkwood: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29 ` [PATCH -next 08/15] thermal: tsens: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 21:50   ` Bjorn Andersson
2019-09-04 21:50     ` Bjorn Andersson
2019-09-04 21:50     ` Bjorn Andersson
2019-09-05  6:15   ` Amit Kucheria
2019-09-05  6:15     ` Amit Kucheria
2019-09-05  6:15     ` Amit Kucheria
2019-09-04 12:29 ` [PATCH -next 09/15] thermal: rockchip: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-10-04 21:49   ` Heiko Stuebner
2019-10-04 21:49     ` Heiko Stuebner
2019-10-04 21:49     ` Heiko Stuebner
2019-09-04 12:29 ` [PATCH -next 10/15] thermal: spear: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29 ` [PATCH -next 11/15] thermal: stm32: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29 ` [PATCH -next 12/15] thermal: tango: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-05 11:06   ` Måns Rullgård [this message]
2019-09-05 11:06     ` Måns Rullgård
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 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 13:15   ` Talel Shenhar
2019-09-04 13:15     ` Talel Shenhar
2019-09-04 13:15     ` Talel Shenhar
2019-09-04 12:29 ` [PATCH -next 14/15] thermal: zx2967: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29 ` [PATCH -next 15/15] thermal: rcar: " YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 12:29   ` YueHaibing
2019-09-04 17:25   ` Wolfram Sang
2019-09-04 17:25     ` Wolfram Sang
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=yw1xmufj6lyp.fsf@mansr.com \
    --to=mans@mansr.com \
    --cc=agross@kernel.org \
    --cc=alexandre.torgue@st.com \
    --cc=amit.kucheria@verdurent.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=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 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.