linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: <broonie@kernel.org>, <f.fainelli@gmail.com>, <rjui@broadcom.com>,
	<sbranden@broadcom.com>, <eric@anholt.net>, <wahrenst@gmx.net>,
	<shc_work@mail.ru>, <agross@kernel.org>, <khilman@baylibre.com>,
	<matthias.bgg@gmail.com>, <shawnguo@kernel.org>,
	<s.hauer@pengutronix.de>, <kernel@pengutronix.de>,
	<festevam@gmail.com>, <linux-imx@nxp.com>,
	<avifishman70@gmail.com>, <tmaimon77@gmail.com>,
	<tali.perry1@gmail.com>, <venture@google.com>, <yuenn@google.com>,
	<benjaminfair@google.com>, <kgene@kernel.org>, <krzk@kernel.org>,
	<andi@etezian.org>, <palmer@sifive.com>,
	<paul.walmsley@sifive.com>, <baohua@kernel.org>,
	<mripard@kernel.org>, <wens@csie.org>, <ldewangan@nvidia.com>,
	<thierry.reding@gmail.com>, <jonathanh@nvidia.com>,
	<yamada.masahiro@socionext.com>, <michal.simek@xilinx.com>
Cc: <bcm-kernel-feedback-list@broadcom.com>,
	<linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-rpi-kernel@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-arm-msm@vger.kernel.org>,
	<linux-amlogic@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>, <openbmc@lists.ozlabs.org>,
	<linux-samsung-soc@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>, <linux-tegra@vger.kernel.org>,
	YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH -next 28/36] spi: st-ssc4: use devm_platform_ioremap_resource() to simplify code
Date: Wed, 4 Sep 2019 21:59:10 +0800	[thread overview]
Message-ID: <20190904135918.25352-29-yuehaibing@huawei.com> (raw)
In-Reply-To: <20190904135918.25352-1-yuehaibing@huawei.com>

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>
---
 drivers/spi/spi-st-ssc4.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-st-ssc4.c b/drivers/spi/spi-st-ssc4.c
index 840a6bf..0c24c49 100644
--- a/drivers/spi/spi-st-ssc4.c
+++ b/drivers/spi/spi-st-ssc4.c
@@ -298,7 +298,6 @@ static int spi_st_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct spi_master *master;
-	struct resource *res;
 	struct spi_st *spi_st;
 	int irq, ret = 0;
 	u32 var;
@@ -331,8 +330,7 @@ static int spi_st_probe(struct platform_device *pdev)
 	init_completion(&spi_st->done);
 
 	/* Get resources */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	spi_st->base = devm_ioremap_resource(&pdev->dev, res);
+	spi_st->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(spi_st->base)) {
 		ret = PTR_ERR(spi_st->base);
 		goto clk_disable;
-- 
2.7.4



  parent reply	other threads:[~2019-09-04 14:01 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 13:58 [PATCH -next 00/36] use devm_platform_ioremap_resource() to simplify code YueHaibing
2019-09-04 13:58 ` [PATCH -next 01/36] spi: altera: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 02/36] spi: a3700: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 03/36] spi: ath79: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 04/36] spi: spi-axi: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 05/36] spi: bcm2835aux: " YueHaibing
2019-09-05 18:38   ` Stefan Wahren
2019-09-04 13:58 ` [PATCH -next 06/36] spi: bcm2835: " YueHaibing
2019-09-05 18:39   ` Stefan Wahren
2019-09-04 13:58 ` [PATCH -next 07/36] spi: bcm63xx-hsspi: " YueHaibing
2019-09-04 22:10   ` Florian Fainelli
2019-09-04 13:58 ` [PATCH -next 08/36] spi: cadence: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 09/36] spi: octeon: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 10/36] spi: clps711x: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 11/36] spi: coldfire-qspi: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 12/36] spi: dw-mmio: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 13/36] spi: spi-geni-qcom: " YueHaibing
2019-09-04 20:44   ` Bjorn Andersson
2019-09-04 13:58 ` [PATCH -next 14/36] spi: lp-8841: " YueHaibing
2019-09-04 13:58 ` [PATCH -next 15/36] spi: meson-spicc: " YueHaibing
2019-09-04 14:13   ` Neil Armstrong
2019-09-04 13:58 ` [PATCH -next 16/36] spi: spi-meson-spifc: " YueHaibing
2019-09-04 14:14   ` Neil Armstrong
2019-09-04 13:58 ` [PATCH -next 17/36] spi: mt7621: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 18/36] spi: mxs: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 19/36] spi: npcm: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 20/36] spi: nuc900: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 21/36] spi: oc-tiny: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 22/36] spi: pic32-sqi: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 23/36] spi: spi-qcom-qspi: " YueHaibing
2019-09-04 20:46   ` Bjorn Andersson
2019-09-04 13:59 ` [PATCH -next 24/36] spi: rb4xx: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 25/36] spi: s3c24xx: " YueHaibing
2019-09-04 14:28   ` Krzysztof Kozlowski
2019-09-04 14:39     ` Mark Brown
2019-09-04 15:09       ` Krzysztof Kozlowski
2019-09-04 16:13         ` Mark Brown
2019-09-04 14:42     ` Yuehaibing
2019-09-07 23:38       ` Andi Shyti
     [not found]   ` <CGME20190905100902eucas1p1ce36a6d769640de92f9ff880728a3d26@eucas1p1.samsung.com>
2019-09-05 10:08     ` Sylwester Nawrocki
2019-09-04 13:59 ` [PATCH -next 26/36] spi: sifive: " YueHaibing
2019-09-04 22:20   ` Paul Walmsley
2019-09-04 13:59 ` [PATCH -next 27/36] spi: sirf: " YueHaibing
2019-09-04 13:59 ` YueHaibing [this message]
2019-09-04 13:59 ` [PATCH -next 29/36] spi: sun4i: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 30/36] spi: sun6i: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 31/36] spi: tegra: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 32/36] spi: uniphier: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 33/36] spi: xlp: " YueHaibing
2019-09-04 13:59 ` [PATCH -next 34/36] spi: zynqmp: " YueHaibing
2019-09-05  5:19   ` Michal Simek
2019-09-04 13:59 ` [PATCH -next 35/36] spi: zynq-qspi: " YueHaibing
2019-09-05  5:19   ` Michal Simek
2019-09-04 13:59 ` [PATCH -next 36/36] spi: fsl-spi: " YueHaibing

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=20190904135918.25352-29-yuehaibing@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=agross@kernel.org \
    --cc=andi@etezian.org \
    --cc=avifishman70@gmail.com \
    --cc=baohua@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=benjaminfair@google.com \
    --cc=broonie@kernel.org \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=festevam@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=kernel@pengutronix.de \
    --cc=kgene@kernel.org \
    --cc=khilman@baylibre.com \
    --cc=krzk@kernel.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=michal.simek@xilinx.com \
    --cc=mripard@kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=palmer@sifive.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rjui@broadcom.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sbranden@broadcom.com \
    --cc=shawnguo@kernel.org \
    --cc=shc_work@mail.ru \
    --cc=tali.perry1@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=venture@google.com \
    --cc=wahrenst@gmx.net \
    --cc=wens@csie.org \
    --cc=yamada.masahiro@socionext.com \
    --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;
as well as URLs for NNTP newsgroup(s).