linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: <herbert@gondor.apana.org.au>, <lars.persson@axis.com>,
	<jesper.nilsson@axis.com>, <davem@davemloft.net>,
	<thomas.lendacky@amd.com>, <gary.hook@amd.com>, <krzk@kernel.org>,
	<kgene@kernel.org>, <antoine.tenart@bootlin.com>,
	<matthias.bgg@gmail.com>, <jamie@jamieiles.com>,
	<agross@kernel.org>, <heiko@sntech.de>,
	<mcoquelin.stm32@gmail.com>, <alexandre.torgue@st.com>,
	<clabbe.montjoie@gmail.com>, <mripard@kernel.org>,
	<wens@csie.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-crypto@vger.kernel.org>,
	<linux-arm-kernel@axis.com>, <linux-samsung-soc@vger.kernel.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>,
	YueHaibing <yuehaibing@huawei.com>
Subject: [PATCH -next 04/12] crypto: img-hash - use devm_platform_ioremap_resource() to simplify code
Date: Fri, 2 Aug 2019 21:28:01 +0800	[thread overview]
Message-ID: <20190802132809.8116-5-yuehaibing@huawei.com> (raw)
In-Reply-To: <20190802132809.8116-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/crypto/img-hash.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c
index d27c812..f5a71fa 100644
--- a/drivers/crypto/img-hash.c
+++ b/drivers/crypto/img-hash.c
@@ -958,9 +958,7 @@ static int img_hash_probe(struct platform_device *pdev)
 	crypto_init_queue(&hdev->queue, IMG_HASH_QUEUE_LENGTH);
 
 	/* Register bank */
-	hash_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
-	hdev->io_base = devm_ioremap_resource(dev, hash_res);
+	hdev->io_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(hdev->io_base)) {
 		err = PTR_ERR(hdev->io_base);
 		dev_err(dev, "can't ioremap, returned %d\n", err);
-- 
2.7.4



  parent reply	other threads:[~2019-08-02 13:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02 13:27 [PATCH -next 00/12] crypto: use devm_platform_ioremap_resource() to simplify code YueHaibing
2019-08-02 13:27 ` [PATCH -next 01/12] crypto: artpec6 - " YueHaibing
2019-08-02 13:27 ` [PATCH -next 02/12] crypto: ccp " YueHaibing
2019-08-02 13:28 ` [PATCH -next 03/12] crypto: exynos " YueHaibing
2019-08-05  9:18   ` Krzysztof Kozlowski
2019-08-02 13:28 ` YueHaibing [this message]
2019-08-02 13:28 ` [PATCH -next 05/12] crypto: inside-secure " YueHaibing
2019-08-02 16:17   ` Antoine Tenart
2019-08-02 13:28 ` [PATCH -next 06/12] crypto: mediatek " YueHaibing
2019-08-02 13:28 ` [PATCH -next 07/12] crypto: picoxcell " YueHaibing
2019-08-03 14:13   ` Jamie Iles
2019-08-02 13:28 ` [PATCH -next 08/12] crypto: sunxi-ss " YueHaibing
2019-08-02 13:28 ` [PATCH -next 09/12] crypto: rockchip " YueHaibing
2019-08-02 16:09   ` Heiko Stuebner
2019-08-02 13:28 ` [PATCH -next 10/12] crypto: stm32 " YueHaibing
2019-08-02 13:28 ` [PATCH -next 11/12] crypto: qce " YueHaibing
2019-08-02 13:28 ` [PATCH -next 12/12] crypto: qcom-rng " YueHaibing
2019-08-09  6:20 ` [PATCH -next 00/12] crypto: " 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=20190802132809.8116-5-yuehaibing@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=agross@kernel.org \
    --cc=alexandre.torgue@st.com \
    --cc=antoine.tenart@bootlin.com \
    --cc=clabbe.montjoie@gmail.com \
    --cc=davem@davemloft.net \
    --cc=gary.hook@amd.com \
    --cc=heiko@sntech.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=jamie@jamieiles.com \
    --cc=jesper.nilsson@axis.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lars.persson@axis.com \
    --cc=linux-arm-kernel@axis.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mripard@kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=wens@csie.org \
    /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).