Linux-RISC-V Archive on lore.kernel.org
 help / color / 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: linux-samsung-soc@vger.kernel.org,
	YueHaibing <yuehaibing@huawei.com>,
	linux-arm-msm@vger.kernel.org, openbmc@lists.ozlabs.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-spi@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com,
	linux-rpi-kernel@lists.infradead.org,
	linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux-riscv@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH -next 19/36] spi: npcm: use devm_platform_ioremap_resource() to simplify code
Date: Wed, 4 Sep 2019 21:59:01 +0800
Message-ID: <20190904135918.25352-20-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-npcm-pspi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/spi/spi-npcm-pspi.c b/drivers/spi/spi-npcm-pspi.c
index 5c56cae..b191d57 100644
--- a/drivers/spi/spi-npcm-pspi.c
+++ b/drivers/spi/spi-npcm-pspi.c
@@ -341,7 +341,6 @@ static int npcm_pspi_probe(struct platform_device *pdev)
 {
 	struct npcm_pspi *priv;
 	struct spi_master *master;
-	struct resource *res;
 	unsigned long clk_hz;
 	struct device_node *np = pdev->dev.of_node;
 	int num_cs, i;
@@ -368,8 +367,7 @@ static int npcm_pspi_probe(struct platform_device *pdev)
 	priv->is_save_param = false;
 	priv->id = pdev->id;
 
-	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)) {
 		ret = PTR_ERR(priv->base);
 		goto out_master_put;
-- 
2.7.4



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

  parent reply index

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 13:58 [PATCH -next 00/36] " 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 ` YueHaibing [this message]
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 ` [PATCH -next 28/36] spi: st-ssc4: " YueHaibing
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 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=20190904135918.25352-20-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

Linux-RISC-V Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-riscv/0 linux-riscv/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-riscv linux-riscv/ https://lore.kernel.org/linux-riscv \
		linux-riscv@lists.infradead.org
	public-inbox-index linux-riscv

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-riscv


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