linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrice CHOTARD <patrice.chotard@st.com>
To: YueHaibing <yuehaibing@huawei.com>,
	"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
	"mpm@selenic.com" <mpm@selenic.com>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"nicolas.ferre@microchip.com" <nicolas.ferre@microchip.com>,
	"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
	"ludovic.desroches@microchip.com"
	<ludovic.desroches@microchip.com>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"rjui@broadcom.com" <rjui@broadcom.com>,
	"sbranden@broadcom.com" <sbranden@broadcom.com>,
	"bcm-kernel-feedback-list@broadcom.com" 
	<bcm-kernel-feedback-list@broadcom.com>,
	"eric@anholt.net" <eric@anholt.net>,
	"wahrenst@gmx.net" <wahrenst@gmx.net>,
	"l.stelmach@samsung.com" <l.stelmach@samsung.com>,
	"kgene@kernel.org" <kgene@kernel.org>,
	"krzk@kernel.org" <krzk@kernel.org>,
	"khilman@baylibre.com" <khilman@baylibre.com>,
	"dsaxena@plexity.net" <dsaxena@plexity.net>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-rpi-kernel@lists.infradead.org" 
	<linux-rpi-kernel@lists.infradead.org>,
	"linux-samsung-soc@vger.kernel.org" 
	<linux-samsung-soc@vger.kernel.org>,
	"linux-amlogic@lists.infradead.org" 
	<linux-amlogic@lists.infradead.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH -next 11/13] hwrng: st - use devm_platform_ioremap_resource() to simplify code
Date: Wed, 16 Oct 2019 11:29:15 +0000	[thread overview]
Message-ID: <d9fd5224-a858-e7ea-eb71-2ed6696a6ffd@st.com> (raw)
In-Reply-To: <20191016104621.26056-12-yuehaibing@huawei.com>

Hi

On 10/16/19 12:46 PM, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/char/hw_random/st-rng.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c
> index 8634483..783c24e 100644
> --- a/drivers/char/hw_random/st-rng.c
> +++ b/drivers/char/hw_random/st-rng.c
> @@ -72,7 +72,6 @@ static int st_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
>  static int st_rng_probe(struct platform_device *pdev)
>  {
>  	struct st_rng_data *ddata;
> -	struct resource *res;
>  	struct clk *clk;
>  	void __iomem *base;
>  	int ret;
> @@ -81,8 +80,7 @@ static int st_rng_probe(struct platform_device *pdev)
>  	if (!ddata)
>  		return -ENOMEM;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	base = devm_ioremap_resource(&pdev->dev, res);
> +	base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(base))
>  		return PTR_ERR(base);
>  

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>

Thanks

  reply	other threads:[~2019-10-16 11:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 10:46 [PATCH -next 00/13] hwrng: use devm_platform_ioremap_resource() to simplify code YueHaibing
2019-10-16 10:46 ` [PATCH -next 01/13] hwrng: atmel - " YueHaibing
2019-10-17  9:32   ` Ludovic Desroches
2019-10-16 10:46 ` [PATCH -next 02/13] hwrng: bcm2835 " YueHaibing
2019-10-16 16:41   ` Florian Fainelli
2019-10-16 10:46 ` [PATCH -next 03/13] hwrng: exynos " YueHaibing
     [not found]   ` <CGME20191018150543eucas1p1cf4312467597ad7c76f258e924d8184a@eucas1p1.samsung.com>
2019-10-18 15:05     ` Łukasz Stelmach
2019-10-16 10:46 ` [PATCH -next 04/13] hwrng: hisi " YueHaibing
2019-10-16 10:46 ` [PATCH -next 05/13] hwrng: ks-sa " YueHaibing
2019-10-16 10:46 ` [PATCH -next 06/13] hwrng: meson " YueHaibing
2019-10-16 16:26   ` Kevin Hilman
2019-10-16 10:46 ` [PATCH -next 07/13] hwrng: npcm " YueHaibing
2019-10-16 10:46 ` [PATCH -next 08/13] hwrng: omap " YueHaibing
2019-10-16 10:46 ` [PATCH -next 09/13] hwrng: pasemi " YueHaibing
2019-10-16 10:46 ` [PATCH -next 10/13] hwrng: pic32 " YueHaibing
2019-10-16 10:46 ` [PATCH -next 11/13] hwrng: st " YueHaibing
2019-10-16 11:29   ` Patrice CHOTARD [this message]
2019-10-16 10:46 ` [PATCH -next 12/13] hwrng: tx4939 " YueHaibing
2019-10-16 10:46 ` [PATCH -next 13/13] hwrng: xgene " YueHaibing
2019-10-16 16:44 ` [PATCH -next 00/13] hwrng: " Florian Fainelli
2019-10-17  1:27   ` Yuehaibing
2019-10-25 15:20 ` Herbert Xu

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=d9fd5224-a858-e7ea-eb71-2ed6696a6ffd@st.com \
    --to=patrice.chotard@st.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=dsaxena@plexity.net \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=kgene@kernel.org \
    --cc=khilman@baylibre.com \
    --cc=krzk@kernel.org \
    --cc=l.stelmach@samsung.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=mpm@selenic.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=wahrenst@gmx.net \
    --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).