Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp137729ybh; Fri, 2 Aug 2019 19:51:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVz8seEBH/Wd6m8UZwZIlUTQ6Zj7xSL4ybGZAi8Y+aROfqWO9Rt0RMR450DHs8FHhzWFYL X-Received: by 2002:a63:db47:: with SMTP id x7mr126302466pgi.375.1564800702571; Fri, 02 Aug 2019 19:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564800702; cv=none; d=google.com; s=arc-20160816; b=ahXb6IBTBmODNTx6S719BELMsQ1S6cSAg+G8/sUz2fvntQlyOS+Qwr7IRJtJ7MllPe 3lmXVODPYDs1p6mY6ogH7aoCV0VfoQiqVgdQdjFDekXnWS5Q7ha30EqfEMxHxxf8Nqa2 FyVFu+EZoAdcfq2EHbLmsHD9kmwVA8mKj/MuSNiQ5KenExHfq/h+fm3zFhMBXTOYmJbi BM9M26IZ1O9OCIMTCSCxky97xfCx7TuI/PE7fWvuXy/Q9U53A2ofjyfJoraSMvTfwNL+ LF3l1oELvzuPpZHP3k9n0L32v9/1JICqpow7TlKg5egJAsfkVkQOVmG9rcs9eTey0Iga qKGA== 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=PVOvyhyv/L6oCyJJEVsHQdd27bbgN0hw0skGneKm3JQ=; b=OlEugt7skfAlIgg9kLFk/gDZw0Q1qle7Wg42ZjDP9X6ZTH9JrkrdQERbFegqkJsKY3 ivfAn6vZwIKXjX7PoNgBMA6vd7teoKFQwTT6Na8E1UGH0w+UOHXCVZZ3VB1+vGLfm4ww uHGpM+Ztu4Jsasa5W/6VRuai3rRuuecJ2TlEdmpA0jPanhTAnV385IYf76Y5yGDg5SOK 4UUQhG9Ez5ojM0s1zLNstXapwNBVGxzXPg+gXvzniwYqt2yL1qbCX+wZJdts7PQHNc/6 zKeQHisyUc4JLVBPQL/1xDk6egGxfZiXPeGulrhagrFXEL/Ngt9uqLrnkM5tLW8OqLEI NCzw== 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 v24si40893263pgk.509.2019.08.02.19.51.29; Fri, 02 Aug 2019 19:51:42 -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 S2404829AbfHBNbk (ORCPT + 99 others); Fri, 2 Aug 2019 09:31:40 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:51390 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404807AbfHBNbj (ORCPT ); Fri, 2 Aug 2019 09:31:39 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id A59F7FD3EBDACD2476D6; Fri, 2 Aug 2019 21:31:35 +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:26 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , CC: , , , , , , , , , YueHaibing Subject: [PATCH -next 11/12] crypto: qce - use devm_platform_ioremap_resource() to simplify code Date: Fri, 2 Aug 2019 21:28:08 +0800 Message-ID: <20190802132809.8116-12-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/qce/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index ef1d74e..08d4ce3 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -167,7 +167,6 @@ static int qce_crypto_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct qce_device *qce; - struct resource *res; int ret; qce = devm_kzalloc(dev, sizeof(*qce), GFP_KERNEL); @@ -177,8 +176,7 @@ static int qce_crypto_probe(struct platform_device *pdev) qce->dev = dev; platform_set_drvdata(pdev, qce); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - qce->base = devm_ioremap_resource(&pdev->dev, res); + qce->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(qce->base)) return PTR_ERR(qce->base); -- 2.7.4