Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp441156ybe; Wed, 4 Sep 2019 23:47:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiGnlj3yD1oZh141abb6KMT5VHuRtK6GrXayVeIKlJAMpqbI6kHeWebrS0U5rVuzLzUvha X-Received: by 2002:a62:ee0a:: with SMTP id e10mr1944524pfi.197.1567666026710; Wed, 04 Sep 2019 23:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567666026; cv=none; d=google.com; s=arc-20160816; b=lPW0ZzWk0YCtGpTLhfLTtQhKXT4CtN6j5fWpgnpQudosB9od4AJKNN/9hn0pg5Q0/Q ODtWgJQXyivVL9tm7c16t97pVm0ZBR8UD4CCwjGxYoXHAw1dD9lWijB/JYuaO7xfUKwO GpPOcKdUGsAYvetqUPz5/ca03dI231MoAtRIxUApZqhfICuwNd2nn057yKI1UKDBaSUa +EnoaGjEjKhA5Sk38QbmED6g3IpfyJehKiMdG/OWkfVW4KsIwhn4WGZdw2g4cli0Yzlo rexDCSxEfK0KGeZFn4zXgaGrKtsai2+UPhGtJx7uFwSKtcyuuATKCgGfhvjNz6Ev1Osh ebPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Lxv2YjVDy5w6AQ+Z95Jd1OHt1865rQWbHzl1H0ckHb4=; b=s48mxx3kAOt7zY/OFY4se7Ma0gyPg1kxpH5ySfJI7+f7aIIi153xqAe4NTMwN3IFxx oZ0tL1UNNf2RkeWlZ7kR24fLsa3P/CTeRkGCAhA9GhYCvSBVP7BY840CUfc+apDhYHq8 dJQUZwoJIs9MptyyszaOB38ONvMC6CED91l5u6OoVf+JGLuPQMc8L0J71dv3WvqRpZyE fmNdVtI3aekLzpYQ2X8M/Vg7Dh7Y/J0c/Rd/r+4fbCqO7PvuHUqN7NtTJAg50ldu6tqk M/LlOJAACcRcpEpYpAjQP73V0n3YEXOIDIEjZ4YZRshK+mrAZmtrSapyv2lgD6wupXQG X3zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IurRXFpo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v16si1157160plo.264.2019.09.04.23.46.48; Wed, 04 Sep 2019 23:47:06 -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; dkim=pass header.i=@linaro.org header.s=google header.b=IurRXFpo; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731051AbfIEGPn (ORCPT + 99 others); Thu, 5 Sep 2019 02:15:43 -0400 Received: from mail-vk1-f195.google.com ([209.85.221.195]:37716 "EHLO mail-vk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725921AbfIEGPn (ORCPT ); Thu, 5 Sep 2019 02:15:43 -0400 Received: by mail-vk1-f195.google.com with SMTP id v78so227123vke.4 for ; Wed, 04 Sep 2019 23:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Lxv2YjVDy5w6AQ+Z95Jd1OHt1865rQWbHzl1H0ckHb4=; b=IurRXFpodLHrXjhNeDu0PBjJR6aKmlNT/dzeEONMU1V5mjYfCIsKTQIXkLXspZuRLT SO2IeUW73ig0y4hTpIc1LeJScYwe/7jF3x1ItS7fkoJd9YSTWsUH2sI/3COuK4II6o/r +Kj20DSoITETteLabp2V7jA4ju9DbWda2nuGTSuEzhZ1KGohbqZEVKqkpRJCAhcLSXD9 kEdWKNMJEgbkZzacsvDJtyDbgG7jhbcfx/K1U5vEhgoviC+KwrwJF0gUE3d7mSshVMHg A0LYcz1miwyWZt1OUA9B7KkZFPklzUWf8pMOs0ddGs8nwCkutop0K9qwCxD0ooyRsoi+ ohUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Lxv2YjVDy5w6AQ+Z95Jd1OHt1865rQWbHzl1H0ckHb4=; b=sS5WN5Zb3Qi7IxeChYkAkIYWcoo5ilWAP4OTzXz+xoCvx99cOmkX+iF/7DLjWu19/I MW+sp5PMLE00Jj2zebUN4BnpD+wDx4cmp2RP0liUkMahKlkS6NS9GCiQ7PPGBDGcROek bu+7Bo55glPh3VNykduOyc7tYcoCek3gtjSPJhJP0U8/2L3K0xp4tjbj3VehFYwFwdID SssTD9YtwEPgk/5W27TMqqv3O1Inj+yCSpQSu3LezleDTG7f1jmmoPWFNMcWybZNqukl K1nc61X5pA/O6I4V/ThPNWBj4o44Xq8RB7HKLpDG98KFUvDTdKSEkjGDf9chlDYYADCd 8O9A== X-Gm-Message-State: APjAAAXPAllU6IM2HoyWYxypzsYQYX5Y7B7K4XjPUmH3LuBrtc93wBVr TnCaUkR4HVELyMc4NoPdvOrsXs5DebqMXj8VUvbLKg== X-Received: by 2002:a1f:4981:: with SMTP id w123mr690507vka.13.1567664142296; Wed, 04 Sep 2019 23:15:42 -0700 (PDT) MIME-Version: 1.0 References: <20190904122939.23780-1-yuehaibing@huawei.com> <20190904122939.23780-9-yuehaibing@huawei.com> In-Reply-To: <20190904122939.23780-9-yuehaibing@huawei.com> From: Amit Kucheria Date: Thu, 5 Sep 2019 11:45:30 +0530 Message-ID: Subject: Re: [PATCH -next 08/15] thermal: tsens: use devm_platform_ioremap_resource() to simplify code To: YueHaibing Cc: miquel.raynal@bootlin.com, Zhang Rui , Eduardo Valentin , Daniel Lezcano , Eric Anholt , wahrenst@gmx.net, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, Markus Mayer , computersforpeace@gmail.com, gregory.0xf0@gmail.com, Matthias Brugger , Andy Gross , Heiko Stuebner , mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, Marc Gonzalez , mans@mansr.com, talel@amazon.com, Jun Nie , Shawn Guo , phil@raspberrypi.org, gregkh@linuxfoundation.org, david.hernandezsanchez@st.com, horms+renesas@verge.net.au, wsa+renesas@sang-engineering.com, bcm-kernel-feedback-list@broadcom.com, Linux PM list , LKML , linux-rpi-kernel@lists.infradead.org, lakml , linux-mediatek@lists.infradead.org, linux-arm-msm , linux-rockchip@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 4, 2019 at 6:05 PM YueHaibing wrote: > > Use devm_platform_ioremap_resource() to simplify the code a bit. > This is detected by coccinelle. > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing Acked-by: Amit Kucheria > --- > drivers/thermal/qcom/tsens-common.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c > index 528df88..43ce4fb 100644 > --- a/drivers/thermal/qcom/tsens-common.c > +++ b/drivers/thermal/qcom/tsens-common.c > @@ -155,7 +155,6 @@ int __init init_common(struct tsens_priv *priv) > { > void __iomem *tm_base, *srot_base; > struct device *dev = priv->dev; > - struct resource *res; > u32 enabled; > int ret, i, j; > struct platform_device *op = of_find_device_by_node(priv->dev->of_node); > @@ -166,8 +165,7 @@ int __init init_common(struct tsens_priv *priv) > if (op->num_resources > 1) { > /* DT with separate SROT and TM address space */ > priv->tm_offset = 0; > - res = platform_get_resource(op, IORESOURCE_MEM, 1); > - srot_base = devm_ioremap_resource(&op->dev, res); > + srot_base = devm_platform_ioremap_resource(op, 1); > if (IS_ERR(srot_base)) { > ret = PTR_ERR(srot_base); > goto err_put_device; > @@ -184,8 +182,7 @@ int __init init_common(struct tsens_priv *priv) > priv->tm_offset = 0x1000; > } > > - res = platform_get_resource(op, IORESOURCE_MEM, 0); > - tm_base = devm_ioremap_resource(&op->dev, res); > + tm_base = devm_platform_ioremap_resource(op, 0); > if (IS_ERR(tm_base)) { > ret = PTR_ERR(tm_base); > goto err_put_device; > -- > 2.7.4 > >