Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp636154ybe; Wed, 4 Sep 2019 05:35:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxlC6C4net8PsYmyqdXA+x7Q9ouYolugCUwNoTYZDbTre51Al3lYNJ14ePPwO48JGE27w4h X-Received: by 2002:a17:902:b404:: with SMTP id x4mr8720368plr.76.1567600546072; Wed, 04 Sep 2019 05:35:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567600546; cv=none; d=google.com; s=arc-20160816; b=tgNpknM0QL9dImFCYbgp1xxGgxho66Eua+oKlLghEpUa32DXGlT8Dr2bdT85DHGHbO NZQ7LOcQxR9taxKSQlWaj8qO9r1Jvy/cmeRR3+ou831pJ1SF4Ic3eeGzqDI0P4Vo0nTt 1TRiHB3bZ2Ey3FfnOA2Lpxpagri7D60o2gbKa+7NlVemPnLzz5cwWxj6QWuXtJHnCyPp TGUpCdvButVJZG4ucmqnqD8AL0Dxc0I0wmEbiZHozOzJjdWbVsxrIM3cAHEu1sBj1VVn Ha44QKREhmULT+VZSEeVskNVjdYBAaoLtiK9yQLssmX3z+0kbtSdUNC2V0s0MJw8Cfph f+hw== 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=oiVVM3RmJl4Dl1+wBJtF6DW8F798A5w+N/xl1QSyur4=; b=isAvUlEI3rsxmfa8ybtJ21vBCFN5Hic94jnHAHFUFzXQKdCkdH4O3pQItMwSzpg6A2 fKrWl1oFBslafxceYclL/LILrR26Fsz08ZZuBho9B3W7RRw1dkOSaGApVrcuyRj0HpHH axM5nt5384Prx6YsaTTbKluw8qHIcaUYH37iqKPtl16p+yhA7xaQmM7mdkdh//ybrmgR VZOAqezDv8oTjxzYRM6xyialk6pxCdru4l2NJSWnEZtF9JYj0mHDtSMnubX/pV4KO1ac YrMZHHLaLkDkq7/zRNJ3N9Wjb/U4JXU6aNctjIt8m7v597QdGABafscdBP14jnV99EWK 1L/g== 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 84si14170449pfw.121.2019.09.04.05.35.29; Wed, 04 Sep 2019 05:35:46 -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 S1730088AbfIDMec (ORCPT + 99 others); Wed, 4 Sep 2019 08:34:32 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6644 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728878AbfIDMec (ORCPT ); Wed, 4 Sep 2019 08:34:32 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id AA0FC24F25A245F49CBC; Wed, 4 Sep 2019 20:34:29 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 20:34:19 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , Subject: [PATCH -next 01/15] thermal: armada: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 20:29:25 +0800 Message-ID: <20190904122939.23780-2-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20190904122939.23780-1-yuehaibing@huawei.com> References: <20190904122939.23780-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/thermal/armada_thermal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c index 709a22f..70fe9c6 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c @@ -708,12 +708,10 @@ static int armada_thermal_probe_legacy(struct platform_device *pdev, struct armada_thermal_priv *priv) { struct armada_thermal_data *data = priv->data; - struct resource *res; void __iomem *base; /* First memory region points towards the status register */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); -- 2.7.4