From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A837C3A5AA for ; Thu, 5 Sep 2019 11:06:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4E882339E for ; Thu, 5 Sep 2019 11:06:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388207AbfIELG5 convert rfc822-to-8bit (ORCPT ); Thu, 5 Sep 2019 07:06:57 -0400 Received: from unicorn.mansr.com ([81.2.72.234]:59326 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733182AbfIELG4 (ORCPT ); Thu, 5 Sep 2019 07:06:56 -0400 Received: by unicorn.mansr.com (Postfix, from userid 51770) id B3B4B17FE3; Thu, 5 Sep 2019 12:06:54 +0100 (BST) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: YueHaibing Cc: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH -next 12/15] thermal: tango: use devm_platform_ioremap_resource() to simplify code References: <20190904122939.23780-1-yuehaibing@huawei.com> <20190904122939.23780-13-yuehaibing@huawei.com> Date: Thu, 05 Sep 2019 12:06:54 +0100 In-Reply-To: <20190904122939.23780-13-yuehaibing@huawei.com> (yuehaibing@huawei.com's message of "Wed, 4 Sep 2019 20:29:36 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org YueHaibing writes: > 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: Mans Rullgard > --- > drivers/thermal/tango_thermal.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/thermal/tango_thermal.c b/drivers/thermal/tango_thermal.c > index 304b461..f44441b 100644 > --- a/drivers/thermal/tango_thermal.c > +++ b/drivers/thermal/tango_thermal.c > @@ -73,7 +73,6 @@ static void tango_thermal_init(struct tango_thermal_priv *priv) > > static int tango_thermal_probe(struct platform_device *pdev) > { > - struct resource *res; > struct tango_thermal_priv *priv; > struct thermal_zone_device *tzdev; > > @@ -81,8 +80,7 @@ static int tango_thermal_probe(struct platform_device *pdev) > if (!priv) > return -ENOMEM; > > - 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)) > return PTR_ERR(priv->base); > > -- > 2.7.4 > -- Måns Rullgård