Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp46769ybe; Wed, 4 Sep 2019 14:53:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcQkYnnrim0fg2LvOx4dfLGBTHWHeEsf7bLqfHQIF2RuDLEgonR4oYzFqhitn1862uVox1 X-Received: by 2002:a17:90a:b393:: with SMTP id e19mr413669pjr.118.1567633991018; Wed, 04 Sep 2019 14:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567633991; cv=none; d=google.com; s=arc-20160816; b=cLaCr9XjVJH4gTJN3wpOR/PV8zbWHjWQD62BdQCuvsKrtW2pyfKcPuZ6qbBm1KdGXA 1luGJiu/dzGYZAhR1IIziP6byKRvNsBmUJ9WuAcqt5dFAqjoy4XPuNYamKHZD5WLnJQ4 roOsnnaKmA7UQwT4alqS5e77nr0+8HOc5j1bvKnwYdHJFsSmMolyGYIEHq4o5iu96Or5 uYHFMKPIFDwJhEyxST8LJKWsaaItMtcgU8QD54Z3wPbTttirv9dHA77MKITHwbEsamNF YSUASgDfdHibq9cd4zLDP5fCUSnTMnbmM70G05HV85SoRcvpEIiD//QiTjKmYXOag7vz wS5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8+W3OmsE39CBrAqbMD2zucygtqzvFfD25TTwncsech0=; b=Vx+jz+z2HaOPr0iz3ZxFiM2TlDU1xM7yDpsG8mubggAqfyOpcAz5j7Kjkiz60LiSss XMEpl7Ehy4cmJ5YmRXlYjY8fjhqCijV7BMCh3RGPXOMoCAJsTIQYBB+8RmMz7c3/g7uZ bUoIQ6+MfUroGkBvTRcFeHFJydJf1oxOn4Q3zelyT+WY33rvhApLAlnZT1JlHQXsHwMS j8el1xr0QxySETfF+hl8xN50W33JFscGPTi1SVUg9yEvu7mWDq0F3tL4fq9ELFKmaWv4 2RflnqSkdQobe5iea2Edk7jIxzqMBDLsFlox0EgmjcCrrc6AojUzRa8+LSyVjH8Lt4LW rA4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GjpcQGU0; 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 l186si17835302pge.215.2019.09.04.14.52.54; Wed, 04 Sep 2019 14:53:10 -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=GjpcQGU0; 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 S1730299AbfIDVuo (ORCPT + 99 others); Wed, 4 Sep 2019 17:50:44 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:36067 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727789AbfIDVuo (ORCPT ); Wed, 4 Sep 2019 17:50:44 -0400 Received: by mail-pf1-f195.google.com with SMTP id y22so173904pfr.3 for ; Wed, 04 Sep 2019 14:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8+W3OmsE39CBrAqbMD2zucygtqzvFfD25TTwncsech0=; b=GjpcQGU018si9YdNfH37M4Jo6uFHTdY0pqnKW1bI2T4aZO3/19Jl5FH8QdTr0Txf8r lbdktBIKjY2hxc0z7a5SHCBYbyQppUU8ZGyzcF8t2+flQ2Lwlaci+p+gktP+EW6EDqmr 7s3ugo5oTSkkJtiu8ZB2vHh7nTcCkJZ54OVg2D6VObo1g+/f028Cz07rHoklB10LETyV dFLuT9gELB49hdOz0T2z4JW8dQv635Vj0nXxpecfeEsOaJpbIBJvSdsZWsjU0QjyIfUH 6VYX5tAcR4yuR3xTSFjlWWV60la4AcfUIWbgbdwQcCg1cQrBM60/vQn9sZI9Ky7KMt6T 2ZMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8+W3OmsE39CBrAqbMD2zucygtqzvFfD25TTwncsech0=; b=lMYo8QB/PzC/20jC+HS90eleVKKmZDifMW9hYBLfxn0455Wegrdr33H+/RrY6yWlNl PRZ8NterwtVIrS6+LnRoCAGWCJ5YUC98OYYbFIM/wqqadHIgT99UhWHzMeK1+XdLxAfa PU4hI+ggyMo/ZFdGpGQdlj5lL5BseA7yCU23vVYhxFJEqz5/hLaVA0AgN/NGqgsBJYuy ILn9qICp2qBMzF9qV0GkZ2ufZwEOquUSaRKIGl1SeBtYSvdj/Fn3uyWaUOvWfVue2KKX nJzf6kbhMIU3dpbF6sTJs1BnpGD5qjvXEPWPaXcqexcJhRfRAfpqZNjJi6YoD1K7O+/L H6Kw== X-Gm-Message-State: APjAAAWropROZiGIg67xyAK/bmo9qfZPGKdDV1MNRvvlLY1SJwX8N9nR 0g3J3zzWQSA3SoHw+Uj8ywSDcA== X-Received: by 2002:a17:90a:cc0c:: with SMTP id b12mr375908pju.138.1567633843429; Wed, 04 Sep 2019 14:50:43 -0700 (PDT) Received: from tuxbook-pro (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id w2sm88618pgc.32.2019.09.04.14.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 14:50:42 -0700 (PDT) Date: Wed, 4 Sep 2019 14:50:39 -0700 From: Bjorn Andersson To: YueHaibing Cc: miquel.raynal@bootlin.com, rui.zhang@intel.com, edubezval@gmail.com, daniel.lezcano@linaro.org, amit.kucheria@verdurent.com, eric@anholt.net, wahrenst@gmx.net, f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, mmayer@broadcom.com, computersforpeace@gmail.com, gregory.0xf0@gmail.com, matthias.bgg@gmail.com, agross@kernel.org, heiko@sntech.de, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, marc.w.gonzalez@free.fr, mans@mansr.com, talel@amazon.com, jun.nie@linaro.org, shawnguo@kernel.org, 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@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH -next 08/15] thermal: tsens: use devm_platform_ioremap_resource() to simplify code Message-ID: <20190904215039.GG580@tuxbook-pro> References: <20190904122939.23780-1-yuehaibing@huawei.com> <20190904122939.23780-9-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190904122939.23780-9-yuehaibing@huawei.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 04 Sep 05:29 PDT 2019, YueHaibing wrote: > Use devm_platform_ioremap_resource() to simplify the code a bit. > This is detected by coccinelle. > Reviewed-by: Bjorn Andersson > Reported-by: Hulk Robot > Signed-off-by: YueHaibing > --- > 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 > >