Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp734696ybe; Wed, 4 Sep 2019 07:02:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVPiA8li+Gz0sVBduXQ588PSFOLGo+kb6ei7ito7mukJlEO2CccSn25uNR6qqRR0gOmU+8 X-Received: by 2002:a17:90a:8911:: with SMTP id u17mr5343979pjn.128.1567605778230; Wed, 04 Sep 2019 07:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567605778; cv=none; d=google.com; s=arc-20160816; b=Q0ZdOOefJPq36qbyZYUr05zHP2UN3BzdUo5kkBy/RzONRzlKrHAZYEjoycwVCwKoOb AzM0sh1IIs3TfebF2Qfl919hzV9qgm7gZ81s1AOuYt6lhcz1bEBLDzeKCF8iPgRN+u1Y D7793XXFEsk0BxD+OW1jza06MIKvv6/ul/apkDWA98PMtHKy4EssiMDFif3kwFOIQAbm Ipnfi1uLHqsrBpfhroEVloIsyf/TtZAst6WhJ/pferhCtWDMNW8zatzuV21kMQANEuN8 TjOevDqbrswOahowt1KPxpeO4OkOirxwOTG4OnLhyuz0xzXNCuwYIFSy6wXQLLdbPJoj ip/A== 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=+Ld82/zq6jGwt4a9IeWImDKQN4kQbsCDo8rNLdYK50g=; b=zBWqFgeOXYzkGXlZE+C8BLRYV1kyMhKey4f04QqYZrVvzvxl9ioyS7x4KziX7X/HyB YCt/d5TbfAb5qbeyK5h6cCAN6FW+GZ3tD5QeV2Jd8nZQE0WsOizyPYj2pIs0yPbLZ1Xs QmgWV5sez6cIVmcwGQE4kE/u/4GcOSltYO3A9D7HEd9mTqoBBV2rd8xeLJ66DKSeejG4 arQxP9EN7dtxsj5IKcJBUbJ5CA6hWFCr3kPT5+a8n8SHOGGj2+Y0dOiyKUB1xGQQeAs7 jXEhVNwVAoRxQ8u60QgHL5pXtrR9ApF/ks36TyJ/TTdMJWuS/87ds2hBpGaDvwy3PF0Y E1lg== 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 s5si2401855pjk.68.2019.09.04.07.02.39; Wed, 04 Sep 2019 07:02: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 S1731100AbfIDOBO (ORCPT + 99 others); Wed, 4 Sep 2019 10:01:14 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6660 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731079AbfIDOBM (ORCPT ); Wed, 4 Sep 2019 10:01:12 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 64AA0552B6C1803ACA56; Wed, 4 Sep 2019 22:01:09 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 22:01:02 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , , , YueHaibing Subject: [PATCH -next 32/36] spi: uniphier: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 21:59:14 +0800 Message-ID: <20190904135918.25352-33-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20190904135918.25352-1-yuehaibing@huawei.com> References: <20190904135918.25352-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-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/spi/spi-uniphier.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-uniphier.c b/drivers/spi/spi-uniphier.c index c1e6f32..e10eeff 100644 --- a/drivers/spi/spi-uniphier.c +++ b/drivers/spi/spi-uniphier.c @@ -419,7 +419,6 @@ static int uniphier_spi_probe(struct platform_device *pdev) { struct uniphier_spi_priv *priv; struct spi_master *master; - struct resource *res; unsigned long clk_rate; int irq; int ret; @@ -434,8 +433,7 @@ static int uniphier_spi_probe(struct platform_device *pdev) priv->master = master; priv->is_save_param = false; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(&pdev->dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) { ret = PTR_ERR(priv->base); goto out_master_put; -- 2.7.4