Linux-RTC Archive on lore.kernel.org
 help / color / Atom feed
From: Kevin Hilman <khilman@baylibre.com>
To: YueHaibing <yuehaibing@huawei.com>,
	a.zummo@towertech.it, alexandre.belloni@bootlin.com,
	joel@jms.id.au, andrew@aj.id.au, nicolas.ferre@microchip.com,
	ludovic.desroches@microchip.com, computersforpeace@gmail.com,
	gregory.0xf0@gmail.com, f.fainelli@gmail.com,
	bcm-kernel-feedback-list@broadcom.com, linus.walleij@linaro.org,
	baruch@tkos.co.il, paul@crapouillou.net, vz@mleia.com,
	slemieux.tyco@gmail.com, eddie.huang@mediatek.com,
	sean.wang@mediatek.com, matthias.bgg@gmail.com,
	patrice.chotard@st.com, mcoquelin.stm32@gmail.com,
	alexandre.torgue@st.com, mripard@kernel.org, wens@csie.org,
	thierry.reding@gmail.com, jonathanh@nvidia.com,
	linux@prisktech.co.nz, michal.simek@xilinx.com
Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-aspeed@lists.ozlabs.org, linux-amlogic@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-tegra@vger.kernel.org, YueHaibing <yuehaibing@huawei.com>
Subject: Re: [PATCH -next 16/34] rtc: meson: use devm_platform_ioremap_resource() to simplify code
Date: Mon, 07 Oct 2019 11:09:15 -0700
Message-ID: <7hk19gfmwk.fsf@baylibre.com> (raw)
In-Reply-To: <20191006102953.57536-17-yuehaibing@huawei.com>

YueHaibing <yuehaibing@huawei.com> writes:

> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Kevin Hilman <khilman@baylibre.com>

> ---
>  drivers/rtc/rtc-meson.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/rtc/rtc-meson.c b/drivers/rtc/rtc-meson.c
> index e08b981..9bd8478 100644
> --- a/drivers/rtc/rtc-meson.c
> +++ b/drivers/rtc/rtc-meson.c
> @@ -292,7 +292,6 @@ static int meson_rtc_probe(struct platform_device *pdev)
>  	};
>  	struct device *dev = &pdev->dev;
>  	struct meson_rtc *rtc;
> -	struct resource *res;
>  	void __iomem *base;
>  	int ret;
>  	u32 tm;
> @@ -312,8 +311,7 @@ static int meson_rtc_probe(struct platform_device *pdev)
>  	rtc->rtc->ops = &meson_rtc_ops;
>  	rtc->rtc->range_max = U32_MAX;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	base = devm_ioremap_resource(dev, res);
> +	base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(base))
>  		return PTR_ERR(base);
>  
> -- 
> 2.7.4

  reply index

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-06 10:29 [PATCH -next 00/34] rtc: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 01/34] rtc: asm9260: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 02/34] rtc: rtc-aspeed: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 03/34] rtc: brcmstb-waketimer: " YueHaibing
2019-10-07 18:15   ` Florian Fainelli
2019-10-06 10:29 ` [PATCH -next 04/34] rtc: at91sam9: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 05/34] rtc: cadence: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 06/34] rtc: coh901331: " YueHaibing
2019-10-09  7:46   ` Linus Walleij
2019-10-06 10:29 ` [PATCH -next 07/34] rtc: davinci: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 08/34] rtc: digicolor: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 09/34] rtc: ds1216: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 10/34] rtc: ds1511: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 11/34] rtc: ds1553: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 12/34] rtc: ep93xx: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 13/34] rtc: jz4740: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 14/34] rtc: lpc24xx: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 15/34] rtc: lpc32xx: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 16/34] rtc: meson: " YueHaibing
2019-10-07 18:09   ` Kevin Hilman [this message]
2019-10-07 20:01   ` Martin Blumenstingl
2019-10-06 10:29 ` [PATCH -next 17/34] rtc: mt7622: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 18/34] rtc: mv: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 19/34] rtc: omap: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 20/34] rtc: pic32: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 21/34] rtc: rtd119x: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 22/34] rtc: s3c: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 23/34] rtc: sa1100: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 24/34] rtc: spear: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 25/34] rtc: stk17ta8: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 26/34] rtc: ds1286: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 27/34] rtc: st-lpc: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 28/34] rtc: stm32: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 29/34] rtc: sunxi: " YueHaibing
2019-10-07  8:11   ` Chen-Yu Tsai
2019-10-06 10:29 ` [PATCH -next 30/34] rtc: tegra: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 31/34] rtc: tx4939: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 32/34] rtc: vt8500: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 33/34] rtc: xgene: " YueHaibing
2019-10-06 10:29 ` [PATCH -next 34/34] rtc: zynqmp: " YueHaibing
2019-10-07 10:10 ` [PATCH -next 00/34] rtc: " Alexandre Belloni

Reply instructions:

You may reply publically 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=7hk19gfmwk.fsf@baylibre.com \
    --to=khilman@baylibre.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@aj.id.au \
    --cc=baruch@tkos.co.il \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=computersforpeace@gmail.com \
    --cc=eddie.huang@mediatek.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregory.0xf0@gmail.com \
    --cc=joel@jms.id.au \
    --cc=jonathanh@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@prisktech.co.nz \
    --cc=ludovic.desroches@microchip.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=michal.simek@xilinx.com \
    --cc=mripard@kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=patrice.chotard@st.com \
    --cc=paul@crapouillou.net \
    --cc=sean.wang@mediatek.com \
    --cc=slemieux.tyco@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=vz@mleia.com \
    --cc=wens@csie.org \
    --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

Linux-RTC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rtc/0 linux-rtc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rtc linux-rtc/ https://lore.kernel.org/linux-rtc \
		linux-rtc@vger.kernel.org
	public-inbox-index linux-rtc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rtc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git