Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp142048ybh; Fri, 2 Aug 2019 19:58:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/PwQC35w4iaO0N+CmFg7ZQGsPBhYfGLqoSH9d6tsBwz1kWWDvOsrhxyhN18hvq5YTYm5F X-Received: by 2002:a62:7990:: with SMTP id u138mr60231296pfc.191.1564801114447; Fri, 02 Aug 2019 19:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564801114; cv=none; d=google.com; s=arc-20160816; b=MZLKpHNECMTj1oIYROgclaeeWpOUcqRuVr8E4XBjstupN8BwS1gOnSgOuaEYe43ga5 MbKWvEQ61TG1lFc1SYud9j3vac3dbEbeO1W7hZo80VdyU3Pb71TK8eDRpjdSheCh1zNy y7FyI7pBeZYRrhipytrIAO8/dBTAHM+ChhgMz6kkCTZQf/va5KBlj5ieQYW5fuO61DuW AD4V6UCsDz3C6qHTvVNwvbYam9TRKRVVCxkyrzBGjhl3yRtpRQJt4/Ru2LbjgSqZ85a0 scKPl7s414JQCEhnoI6mZy55bYHbz7RUCZ8jW1IqppfydAwxZ+ND3cCgtYtD/59fPq3u AGCQ== 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=5eOnU8YiXg+6PjKf8H1iTe8FSYxE7Wx+6mTl7xo1yvE=; b=CPhzLb00RpMubHDf9A5EzJF9AjaX34bjX5YzZ87XOXM4ypG8hmwt6QNWFX3EfY+f77 MlrDRZXzj/6AneMhD42Fuaxs5IFK3AQHFN7VuJxd4+2sEWbIrMGuDddfnwlsAEjegbhl hfUm4tndebvVWziWpLf7sP66P4UWLp+vlyPywhbZ4FDOR7Vxd0/teLmaaTNYgQid7Lzj /RPXYKeMkLnoUZgNfNm1uEm33STSC0jLvUKLsRr7+Zd6IPOUuqI94Rr9w0fLJjqxb8Ot V9MTf+YqvMvIGpm7XYLIJslSN6BuHSuXCHzeHaxb/EDb/Z1xL9O1b+Nm0bZjx1eh/cP+ 1XtQ== 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 b13si38949260pfo.59.2019.08.02.19.58.20; Fri, 02 Aug 2019 19:58:34 -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 S2388800AbfHBNbv (ORCPT + 99 others); Fri, 2 Aug 2019 09:31:51 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:52068 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404641AbfHBNbc (ORCPT ); Fri, 2 Aug 2019 09:31:32 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B88493E7E23E4170A517; Fri, 2 Aug 2019 21:31:30 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Fri, 2 Aug 2019 21:31:21 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , CC: , , , , , , , , , YueHaibing Subject: [PATCH -next 09/12] crypto: rockchip - use devm_platform_ioremap_resource() to simplify code Date: Fri, 2 Aug 2019 21:28:06 +0800 Message-ID: <20190802132809.8116-10-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/rockchip/rk3288_crypto.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/rockchip/rk3288_crypto.c b/drivers/crypto/rockchip/rk3288_crypto.c index 8d7e254..e5714ef 100644 --- a/drivers/crypto/rockchip/rk3288_crypto.c +++ b/drivers/crypto/rockchip/rk3288_crypto.c @@ -311,7 +311,6 @@ MODULE_DEVICE_TABLE(of, crypto_of_id_table); static int rk_crypto_probe(struct platform_device *pdev) { - struct resource *res; struct device *dev = &pdev->dev; struct rk_crypto_info *crypto_info; int err = 0; @@ -339,8 +338,7 @@ static int rk_crypto_probe(struct platform_device *pdev) spin_lock_init(&crypto_info->lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - crypto_info->reg = devm_ioremap_resource(&pdev->dev, res); + crypto_info->reg = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(crypto_info->reg)) { err = PTR_ERR(crypto_info->reg); goto err_crypto; -- 2.7.4