Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp130100ybh; Fri, 2 Aug 2019 19:41:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWPaNWohYQFvGXDtKy3GM8pAHpfKu6qfSMEwl48L9ybVwxQdAy3SmuoVpk8tjqEnZftsRZ X-Received: by 2002:a17:902:925:: with SMTP id 34mr133250601plm.334.1564800060706; Fri, 02 Aug 2019 19:41:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564800060; cv=none; d=google.com; s=arc-20160816; b=bXqIi6H/DxUFiy3HsJKIQ1zrePzV1QYA25kQhWuw9f74umPfGqwZ/LITCSRhYXos1h qnvjkxGX0YChnpKJL+02dAjga0SIw+gCIE8JQfH9+hgQ0Eq/C1lEji9e9BqWPcZHAmqY ZIONId/+DWAvZ8nMk23WPc+3NVheAH49SmMBXP3fhQY5dXxN3rqZijAcd77aRBrOjPkZ bPkhI+76WXFY5/LP0aYqsf3dBGHSDMFuWjoCrS3TYKsKB2TC9SsTad8sjPGITQY63a5D /ouvbWTkqgOBhuEpZlu9XShck8kXsa6moHiquGuSkwBpsHyQPxHR3fZrBk4cQ8ou23FT SndA== 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=g6LxameIbWkJYTC0HH2UIAQZwyfpbJb+20NVpnZxzGo=; b=pXCdhlfmxtbFmykh32GEGgy4UaVwRMI/G45ztc+m95SnVlEzOLW/zI9MXFiccqWfGe EogPkWa2Z/FtfWYmBh1kNL0runxPCNm1UYHYsERwCrBUVCpzjIkcADAy8sB+k1z087uO Jgx0kVa87DIYruML9esS7XiJGuiRH4d4CmpzU3SUy//X6sjvvOj+loxitK8rQvDRcaNC 8svDdfI47icq0NdyhsSTcToAu0MYjRItQ4d5Uaxq6VP/YefsidaC7loUyJnXriWXwghq beYltuKD2dnOV7pRP8CCVlQKWtlxdZy4aYkHdLBhXyP2ffyGUKTmVONpisRX8++a/ita hMTA== 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 gn5si37269798plb.170.2019.08.02.19.40.47; Fri, 02 Aug 2019 19:41:00 -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 S2404429AbfHBNbU (ORCPT + 99 others); Fri, 2 Aug 2019 09:31:20 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3738 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390806AbfHBNbS (ORCPT ); Fri, 2 Aug 2019 09:31:18 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2B2934A726CC38C759D6; Fri, 2 Aug 2019 21:31:15 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Fri, 2 Aug 2019 21:31:07 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , CC: , , , , , , , , , YueHaibing Subject: [PATCH -next 02/12] crypto: ccp - use devm_platform_ioremap_resource() to simplify code Date: Fri, 2 Aug 2019 21:27:59 +0800 Message-ID: <20190802132809.8116-3-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/ccp/sp-platform.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/ccp/sp-platform.c b/drivers/crypto/ccp/sp-platform.c index 1b45236..831aac1 100644 --- a/drivers/crypto/ccp/sp-platform.c +++ b/drivers/crypto/ccp/sp-platform.c @@ -125,7 +125,6 @@ static int sp_platform_probe(struct platform_device *pdev) struct sp_platform *sp_platform; struct device *dev = &pdev->dev; enum dev_dma_attr attr; - struct resource *ior; int ret; ret = -ENOMEM; @@ -146,8 +145,7 @@ static int sp_platform_probe(struct platform_device *pdev) goto e_err; } - ior = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sp->io_map = devm_ioremap_resource(dev, ior); + sp->io_map = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(sp->io_map)) { ret = PTR_ERR(sp->io_map); goto e_err; -- 2.7.4