Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp133464ybh; Fri, 2 Aug 2019 19:45:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRlczTFGM3WngTBsHQlE2I8gDzKMHrtP/hMHcNYdOxUgJ9GLKDYj0NtVQ+2YiA0Pc5SwmC X-Received: by 2002:a17:902:a607:: with SMTP id u7mr134925173plq.43.1564800335428; Fri, 02 Aug 2019 19:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564800335; cv=none; d=google.com; s=arc-20160816; b=gV13PwHyiC0qbxG0p3rXtNjmIklCf6YB+q3Hc5SX0IbJZWBz4e7GH5Nd3pqHE7uTUM frR5yTM12DAaGWua1P8g32KuRYo3KKc+Boqb35+NTvwoylcQupzc9M45r47aNH6klkio xx5MvWDuSquB7peus6B9ZavRpM4phgqMvOh86bRSyuXQB/OTDXx72T8C33AATQGdxnfp q7w0MdKShi90vfY1Ht1hhLBMRTSwOvSHg3NacVTTKPUILq00YNXzBnv35FAS7/DExFze nC+hreZLvZraBVcxo3lt+GhC0IOTGhS6ZhfCQX0LO7td1aQ1TTiuCVB88xhusQ7qjoFq 1MqA== 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=fky0Xnjx4MJj/EKOB0qkVvJ93Ut2UbJcYBm8NIuSGJY=; b=nWAM5BhE2tvu4M4edvOtEmRLsI4IiuOxFunDFhLmLYdwzTh6EmfD3Bu2u0OayPCm9F scPvcAhWEOuxmLRywYZjNiHHnqcCnNAbol7WG5Pjl73gsu4LOAYW0YIwr6tlh4zx4c2R PdmQ5s5i7C3p+dCRSYyijrIlNkLeQktryvyScFZrztFP+NfsDtiV4Z4S67CF0P4vFTF1 NN/mURPlmDiuer6N/8Wh6zd4p7hEP+2n3nKccCHhiYsg/p9AolijJSc6h0lZm1qEZk4X 0m+l1bAlzDJ0Xiym6FZYa0vFHSxymkVs+7w0i39MkwMD/mhOOB0bq/6TyRdhWnZ3t8EU n/EQ== 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 p1si43791625pff.250.2019.08.02.19.45.21; Fri, 02 Aug 2019 19:45:35 -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 S2404663AbfHBNbc (ORCPT + 99 others); Fri, 2 Aug 2019 09:31:32 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4156 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404534AbfHBNbb (ORCPT ); Fri, 2 Aug 2019 09:31:31 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 8921D36A4EFDC54AC5A2; Fri, 2 Aug 2019 21:31:25 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Fri, 2 Aug 2019 21:31:19 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , CC: , , , , , , , , , YueHaibing Subject: [PATCH -next 08/12] crypto: sunxi-ss - use devm_platform_ioremap_resource() to simplify code Date: Fri, 2 Aug 2019 21:28:05 +0800 Message-ID: <20190802132809.8116-9-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/sunxi-ss/sun4i-ss-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-core.c b/drivers/crypto/sunxi-ss/sun4i-ss-core.c index 2e87042..9aa6fe0 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss-core.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-core.c @@ -225,7 +225,6 @@ static struct sun4i_ss_alg_template ss_algs[] = { static int sun4i_ss_probe(struct platform_device *pdev) { - struct resource *res; u32 v; int err, i; unsigned long cr; @@ -240,8 +239,7 @@ static int sun4i_ss_probe(struct platform_device *pdev) if (!ss) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ss->base = devm_ioremap_resource(&pdev->dev, res); + ss->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ss->base)) { dev_err(&pdev->dev, "Cannot request MMIO\n"); return PTR_ERR(ss->base); -- 2.7.4