Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp670437ybe; Wed, 4 Sep 2019 06:06:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYxDphSNPj6ppuBguX/lyoo3NX1+uCK4veVioSjPlGqPhp0TkYBTKEvip3roMYLJhGUr6R X-Received: by 2002:a17:90a:bb91:: with SMTP id v17mr4661693pjr.84.1567602418672; Wed, 04 Sep 2019 06:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567602418; cv=none; d=google.com; s=arc-20160816; b=T0kTAoOMAuDqnmPhpLZbnzotegrHExRRlOZwZu+R/MabaohmthkQv7U3e+pX3LqGfS Z9ytY/scpNWCCYYgMwghxmQVpmy4C8AA5LseXj9KAgqIXbUfIbkbhPqt2xIzQoOC9kD5 vbVgi4KYlk6CxOP82lvhv4i/vtD0qsECVzCImj53r9IlRb6sP9pUyhiwB5CS6eIRKYkK yb9Ll5lDe7URJw8UlNTOHKVwjBid632vov239ZlSnML7gvuoePsaNJ6dZX4vMd4iIweM YQfkCAYtlL60VnB/R4R70/N0Zx1/jrDnUpNQJFJZmwQu/UJV8lEmyGl5JPz5YCIw2fQi tk7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=uygv1BdmnvxLihvGJD4AWNVMyWt1SBTKAQuRVxlabHk=; b=WC4cAeB4NN7TZkNoALceyBF+TtGS+bKlBhshKcavWDj8LUeo4WAwA+EasFPKBbtFEz S2EyyyYTPWC6X59JOLBl5raTlXAuo5P3XN/EPe5qU5/OLHgZtI/b4oc+q0kbZ43dakHP n9AtGcbo1Y+m93MArccEkXyeLER5Kae6PQnWTF4mDKDUPHFx0cEXDjcolK/GLYvB4f7z EcY8KsaLTXEtl1BYLpxcRXBD7QIeZvivaO1e6mDnb3Bi+PUAUBIBPLAEbwFR/rtDbjNw tsdeIBdK+/5OF/rwD5wC1TL0gYEAATHFLzKetd4u1pkTAn/apO5kiqQW5pHRyA5JG/Ni z96Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 n24si12891002pfa.167.2019.09.04.06.06.43; Wed, 04 Sep 2019 06:06:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730281AbfIDNFp (ORCPT + 99 others); Wed, 4 Sep 2019 09:05:45 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:34632 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729888AbfIDNFp (ORCPT ); Wed, 4 Sep 2019 09:05:45 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id EC78CDC15B65CCCF9CCB; Wed, 4 Sep 2019 21:05:41 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 21:05:32 +0800 From: YueHaibing To: , , , , , , , , , , , , CC: , Subject: [PATCH -next] scsi: ufs-hisi: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 21:04:57 +0800 Message-ID: <20190904130457.24744-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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/scsi/ufs/ufs-hisi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufs-hisi.c b/drivers/scsi/ufs/ufs-hisi.c index f4d1dca..6bbb167 100644 --- a/drivers/scsi/ufs/ufs-hisi.c +++ b/drivers/scsi/ufs/ufs-hisi.c @@ -447,13 +447,11 @@ static int ufs_hisi_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op) static int ufs_hisi_get_resource(struct ufs_hisi_host *host) { - struct resource *mem_res; struct device *dev = host->hba->dev; struct platform_device *pdev = to_platform_device(dev); /* get resource of ufs sys ctrl */ - mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - host->ufs_sys_ctrl = devm_ioremap_resource(dev, mem_res); + host->ufs_sys_ctrl = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(host->ufs_sys_ctrl)) return PTR_ERR(host->ufs_sys_ctrl); -- 2.7.4