Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1429018ybp; Fri, 4 Oct 2019 14:50:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaU/6zhnd2rmMeBvMatjhYGt+rQDRiAYkDSZ8802Qfjk6J4Y84YS5U7Me4C3XgVfsnWrNF X-Received: by 2002:a17:906:6c98:: with SMTP id s24mr14068619ejr.28.1570225847512; Fri, 04 Oct 2019 14:50:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570225847; cv=none; d=google.com; s=arc-20160816; b=jGAW8v+0UOlZSAgXyUkR1/YfQEgAV0jXhOuoVuqiEXdaXikG1V5lJjIy7mmoL8Jyvs 0mWUjOFxqnbt4GGSznRx1+ndQPgiaVzkzYndSonVgGMd9udZhqAmIVndNu4MA97c7VeK Owf3W7l4kk5Y2MozB2wtcPk0CP/dTnlCOTHOe706gpHFOodnj1OkuaUWgCRnAnzfwK6R dRqX5HcPiPwz69ZLILRqpR/z1UQtANjkhcOygC3+u4p9nuN02NpRFx5iv6NlvucaCbDj tONhVbUCMJyeszamy1nV/xLTDcpZUl7OOjaMKT+rFQ56z9j3SZQcZFuaNH5CfV0QKYDS 4EhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kWEMZ6skpNVtVFC6cG8bJdWUmgq+kE5p8UugQo6ZtIo=; b=kHhiiueoKEKTRUzsJFh7pytkQSNrShz64p3EPXdnUOwO9o71U2HBu+PSRG8tNfiSLG yGvf4mnHEzBenD2M1hi4z/PKIjtovGN518grbRkYzeY5+Wrd0bJabZhd96dhI7t2r5Xl bU181B1LsVR4h38/ugodEqO9yEMZ3FTXjPYnVuz8Q35cNsBLDSRMEKxBt1v4LfUXudgN zQsFZktmyWjZ53hn15hjPYYUUG530UC0ib6oWH6t1ho0QLJFS5iQFAt/1p+gpPDKsJhS bFwTdbqSup/WhbvnWHnhk5eGFQF4TYR50Q6f9LVxCi+R+CBxa2zAbKPJvvTnp9Gwg2K/ lOuw== 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 x30si4296805edi.351.2019.10.04.14.50.23; Fri, 04 Oct 2019 14:50:47 -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 S1730590AbfJDVuR (ORCPT + 99 others); Fri, 4 Oct 2019 17:50:17 -0400 Received: from gloria.sntech.de ([185.11.138.130]:38224 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727548AbfJDVuR (ORCPT ); Fri, 4 Oct 2019 17:50:17 -0400 Received: from 94.112.246.102.static.b2b.upcbusiness.cz ([94.112.246.102] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iGVSP-0006tk-DS; Fri, 04 Oct 2019 23:49:49 +0200 From: Heiko Stuebner 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, 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 09/15] thermal: rockchip: use devm_platform_ioremap_resource() to simplify code Date: Fri, 04 Oct 2019 23:49:47 +0200 Message-ID: <6308452.QoXZFhLlpT@phil> In-Reply-To: <20190904122939.23780-10-yuehaibing@huawei.com> References: <20190904122939.23780-1-yuehaibing@huawei.com> <20190904122939.23780-10-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, 4. September 2019, 14:29:33 CEST schrieb YueHaibing: > Use devm_platform_ioremap_resource() to simplify the code a bit. > This is detected by coccinelle. > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing Reviewed-by: Heiko Stuebner > --- > drivers/thermal/rockchip_thermal.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c > index 343c2f5..044e6eb 100644 > --- a/drivers/thermal/rockchip_thermal.c > +++ b/drivers/thermal/rockchip_thermal.c > @@ -1219,7 +1219,6 @@ static int rockchip_thermal_probe(struct platform_device *pdev) > struct device_node *np = pdev->dev.of_node; > struct rockchip_thermal_data *thermal; > const struct of_device_id *match; > - struct resource *res; > int irq; > int i; > int error; > @@ -1245,8 +1244,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev) > if (!thermal->chip) > return -EINVAL; > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - thermal->regs = devm_ioremap_resource(&pdev->dev, res); > + thermal->regs = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(thermal->regs)) > return PTR_ERR(thermal->regs); > >