Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp146612ybh; Fri, 2 Aug 2019 20:04:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFwmBnU6bt9o9A03GIbfRqgOmI1A31P8KUMl9SlSPbw4lc/7IndVhoNsIvh7wNzO/4f5YO X-Received: by 2002:a17:902:d890:: with SMTP id b16mr207441plz.315.1564801466126; Fri, 02 Aug 2019 20:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564801466; cv=none; d=google.com; s=arc-20160816; b=vcf1n3Jl69T5BFgO8siHSKaDZmezDjLoinkOETrSiz+H27pfy13Q1Nqf+mZu4lSd2a 7DFxGUX+t2Hm00BVCcuQElBCWHkaphfVRBejNYVRSlrtRQChRCmxKI5F5QqY5jdClpMk Gg1ZCR0H0OKXGzw8mfHt7J4siFGLmY38aVYzTM/cjdMnG1coVYTBsNmIVNTRtZMcejvL DH8rtDWQqxBoDlj0AKjAHDMcVobRilHEekIYZHE0fm1a6dY4Lj2j2QmVMaiiD68M43Cj RdA1zQICAoRX4nJC1BpIeRfrpIK+LjjxHXCTGjpKAOWsaFib49+sSnPSJTJOXzOjULti PRqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=WzAcsFerEdk5RZJr4c8tXuc2GLOW2VOhbsRTiL3jM2s=; b=xjv/tGQyFWPAcV3/Oo4MPz5Tp0MMbfFmHdOLZt8BFKVvG2bK+56UTyn6mhh7oJZLqb GgrfLQB65VtTZGbypOX0YyFQtvcW3YbIZv4Euby3mdBqF07kA77xojwhK9AFSjjGambm /ATMNQNtV3GFLpQhYZ0wjY4hrZKVDis4rLEk0SgoMXzqp0RBPNE5txbX2tvoLgdawTjB SFsSBFx7GC68UcJa0smdvDCXhtTg+iH+ZaXVG3E+wkKptNvL1y42fVUC7JgQr8pZ+ImY yybsc3DlZB81Hwe5eTue44qbWeJeK2Z/RBSrC+FthRjmtVhjsL4bZHclNOU7MV4EjqEP KOfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9si4937735pgm.409.2019.08.02.20.04.11; Fri, 02 Aug 2019 20:04:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404921AbfHBNcB (ORCPT + 99 others); Fri, 2 Aug 2019 09:32:01 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3737 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404443AbfHBNbT (ORCPT ); Fri, 2 Aug 2019 09:31:19 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 040855C56A2A8F2ACCCA; Fri, 2 Aug 2019 21:31:15 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Fri, 2 Aug 2019 21:31:08 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , CC: , , , , , , , , , YueHaibing Subject: [PATCH -next 03/12] crypto: exynos - use devm_platform_ioremap_resource() to simplify code Date: Fri, 2 Aug 2019 21:28:00 +0800 Message-ID: <20190802132809.8116-4-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20190802132809.8116-1-yuehaibing@huawei.com> References: <20190802132809.8116-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/exynos-rng.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/exynos-rng.c b/drivers/crypto/exynos-rng.c index 2cfabb9..cbd8ca6 100644 --- a/drivers/crypto/exynos-rng.c +++ b/drivers/crypto/exynos-rng.c @@ -268,7 +268,6 @@ static struct rng_alg exynos_rng_alg = { static int exynos_rng_probe(struct platform_device *pdev) { struct exynos_rng_dev *rng; - struct resource *res; int ret; if (exynos_rng_dev) @@ -289,8 +288,7 @@ static int exynos_rng_probe(struct platform_device *pdev) return PTR_ERR(rng->clk); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rng->mem = devm_ioremap_resource(&pdev->dev, res); + rng->mem = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rng->mem)) return PTR_ERR(rng->mem); -- 2.7.4