Message ID | 20230308060357.45647-1-yang.lee@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp167032wrd; Tue, 7 Mar 2023 22:25:12 -0800 (PST) X-Google-Smtp-Source: AK7set+gdNnqDZh+K/j1Vgugoao4xTuWX1oUyZUN8wVzK4gk+J3xQdmrRNUr6dnAvgUDtU8ouFHl X-Received: by 2002:a17:906:6951:b0:8aa:c358:fc01 with SMTP id c17-20020a170906695100b008aac358fc01mr14951595ejs.67.1678256712317; Tue, 07 Mar 2023 22:25:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678256712; cv=none; d=google.com; s=arc-20160816; b=Jg3FV8h1thyVqx+vMvdZo14CMV2jAVbC7rtaqWmDkJfLCmKSLI+1Gqz8JXEqDeS71L +rTwgBjRyVVqSsU7buynhGB6olK6omocyR+UmAV9yoLyr7rFETILWkJSfheL5+FGFQG3 /SwVGC91KX5J6jmwhYFgIdfVOpeVJlH9+ZIrHYm1ATCA98CE4y48iLxtjiLOeZgzCVzD ZDMLOkmq2ccBlvBw1nlcTkYbl0FmluB54tqWknlNk6h/KPSimicDkq+U4Vn+ldkOE+sj Xy9XcT+Vmnhp8Snb8Hq1/uzEwlnpVWWUTX9YEXRRZqmRCXtWuRKYnxWoNfBT6XLNhSac /7kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=O5QFB1BlZnJBpY0fQP0yE+q9U559LxHXkLsBG0/27OI=; b=DDh15/TncX84qRTEUeMJAstrRckyHjNFKHaWcM1lTk2ebS30kjhi6RPBSHcFuL48R+ wPdBH9KPz9CY+gbYxP/QKX1Zgdkdn12w8duwx+vxHfpUn/Oef59w/8pGHN6hWN5quW1w xi2kwI1Fqil5dCL+vJIx93MbYDvnWVYPzHnBC5lxkNHSoJxr74QUuU+NegLC7aumu9gQ bKs39pNxxtMx5/n09kPabGLI+JcA8aDLfqgU/fiYLbQgv2hEa+IwJmUuvFZuDO0urg4A 3dlfZkaaIaR4XeWmXxmdk3l8PvwGLvalYiAfNsAvvp9Y6irR9WeTtd5VSqpUYDc/qpuZ iYcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gw17-20020a170906f15100b008bedefb0986si14272191ejb.599.2023.03.07.22.24.49; Tue, 07 Mar 2023 22:25:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229793AbjCHGEH (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Wed, 8 Mar 2023 01:04:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjCHGEF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 8 Mar 2023 01:04:05 -0500 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EC6B2B288; Tue, 7 Mar 2023 22:04:01 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0VdO7V.f_1678255438; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VdO7V.f_1678255438) by smtp.aliyun-inc.com; Wed, 08 Mar 2023 14:03:59 +0800 From: Yang Li <yang.lee@linux.alibaba.com> To: niklas.soderlund@ragnatech.se Cc: rafael@kernel.org, daniel.lezcano@linaro.org, amitk@kernel.org, rui.zhang@intel.com, linux-renesas-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li <yang.lee@linux.alibaba.com> Subject: [PATCH -next] thermal/hwmon: Use devm_platform_ioremap_resource() Date: Wed, 8 Mar 2023 14:03:57 +0800 Message-Id: <20230308060357.45647-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759779710588192463?= X-GMAIL-MSGID: =?utf-8?q?1759779710588192463?= |
Series |
[-next] thermal/hwmon: Use devm_platform_ioremap_resource()
|
|
Commit Message
Yang Li
March 8, 2023, 6:03 a.m. UTC
According to commit 7945f929f1a7 ("drivers: provide
devm_platform_ioremap_resource()"), convert platform_get_resource(),
devm_ioremap_resource() to a single call to Use
devm_platform_ioremap_resource(), as this is exactly what this function
does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/thermal/rcar_thermal.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
Hi Yang, On Wed, Mar 8, 2023 at 7:17 AM Yang Li <yang.lee@linux.alibaba.com> wrote: > According to commit 7945f929f1a7 ("drivers: provide > devm_platform_ioremap_resource()"), convert platform_get_resource(), > devm_ioremap_resource() to a single call to Use > devm_platform_ioremap_resource(), as this is exactly what this function > does. Thanks for your patch! > Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- a/drivers/thermal/rcar_thermal.c > +++ b/drivers/thermal/rcar_thermal.c > @@ -435,9 +435,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) > * Then, driver uses common registers > * rcar_has_irq_support() will be enabled > */ > - res = platform_get_resource(pdev, IORESOURCE_MEM, > - mres++); > - common->base = devm_ioremap_resource(dev, res); > + common->base = devm_platform_ioremap_resource(pdev, mres++); > if (IS_ERR(common->base)) { > ret = PTR_ERR(common->base); > goto error_unregister; Note that there is a second opportunity for conversion in the same function, a few lines below. Gr{oetje,eeting}s, Geert
> Note that there is a second opportunity for conversion in the same > function, a few lines below. This should be fixed in a V2, then, not in an incremental patch, please.
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index b8571f7090aa..ee2dde1fbe2a 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -435,9 +435,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) * Then, driver uses common registers * rcar_has_irq_support() will be enabled */ - res = platform_get_resource(pdev, IORESOURCE_MEM, - mres++); - common->base = devm_ioremap_resource(dev, res); + common->base = devm_platform_ioremap_resource(pdev, mres++); if (IS_ERR(common->base)) { ret = PTR_ERR(common->base); goto error_unregister;