Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp642497ybh; Sat, 3 Aug 2019 06:51:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuS7d4ylU9WzKzGphiM48ZzGeAuxNPTXtwQtS932qOybR4B9KYA5wy3I+NWv40/8dyFFAS X-Received: by 2002:a65:5144:: with SMTP id g4mr76396546pgq.202.1564840274152; Sat, 03 Aug 2019 06:51:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564840274; cv=none; d=google.com; s=arc-20160816; b=uKIVHPWqYiiZqNvCxyzslSYWUfPxoYqYJrxXvLnsEKgJPpDePS4HCQ/w/j0mXJ4JTF RnTZYFJ0rKSuFQ9rBil0CeI6KoT9E8wu8Hi69p9FvBrQfKWRmE4YKomU5s82BziBmSSC +WvvgPm1AXE31fQZbiR2WOsfVW5qDzFPA6DKfV9CQNAv/1WYZBhl0u2Bzj1wGCoR17r6 leejtDG/UCZGbzx62TXAARD8gMt+R9IbY3SklXCf5osZ/kkCdAE3r0HfaZpwGZtHY3Wu r5LbEjX/YnpGtkMrSLWBVSosZ2tj85flXGRCDPHmMEEW/hVKDKr7vrdH5utmyM/ksjyr /2QQ== 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=jGUtbu5rFYXuxKQv5rC+eRMYaed21roOaMJO3HyTn5g=; b=wQRRZvWuF4Ifq6MVQZ38+OXehcq4InXWibnIMUikz/mhKb7OsdeSDgzWka/xw7T379 m592fjur3ZAT+K4kdLwiwX69JpsmjFvh4GODtACMIX552eRXiAHwVunevcEgnmxWACdy rcddzJV0VzhzHfMsgNo/HAoQ0j9Ydvir/gKll66w9d0PsDjLwe1BCog8Mc8kUaLsyN7n 430WA0adySQ/9nXBSbDc3bkF0YWCemdi3u8HrKeWnqjBkQsfaw2muq3JAdqZFR+xLlNV 9ESFxFIGcp8Yz6cxk/EWyYAZRxg0BZdVzoaVquro78hgPjv3bPcB3KvH5B0ueq3clFLo +7Dg== 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 w6si8938794pjr.100.2019.08.03.06.51.00; Sat, 03 Aug 2019 06:51:14 -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 S2394164AbfHBNrO (ORCPT + 99 others); Fri, 2 Aug 2019 09:47:14 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35066 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731713AbfHBNrM (ORCPT ); Fri, 2 Aug 2019 09:47:12 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id D20C772E3A367252B563; Fri, 2 Aug 2019 21:31:22 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Fri, 2 Aug 2019 21:31:15 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , CC: , , , , , , , , , YueHaibing Subject: [PATCH -next 06/12] crypto: mediatek - use devm_platform_ioremap_resource() to simplify code Date: Fri, 2 Aug 2019 21:28:03 +0800 Message-ID: <20190802132809.8116-7-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/mediatek/mtk-platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/mediatek/mtk-platform.c b/drivers/crypto/mediatek/mtk-platform.c index 125318a..12462136 100644 --- a/drivers/crypto/mediatek/mtk-platform.c +++ b/drivers/crypto/mediatek/mtk-platform.c @@ -481,7 +481,6 @@ static int mtk_desc_ring_alloc(struct mtk_cryp *cryp) static int mtk_crypto_probe(struct platform_device *pdev) { - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); struct mtk_cryp *cryp; int i, err; @@ -489,7 +488,7 @@ static int mtk_crypto_probe(struct platform_device *pdev) if (!cryp) return -ENOMEM; - cryp->base = devm_ioremap_resource(&pdev->dev, res); + cryp->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(cryp->base)) return PTR_ERR(cryp->base); -- 2.7.4