From: Guenter Roeck <linux@roeck-us.net>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Jisheng Zhang <Jisheng.Zhang@synaptics.com>,
Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
kbuild-all@01.org
Subject: Re: [PATCH] hwmon: fix devm_platform_ioremap_resource.cocci warnings
Date: Tue, 3 Sep 2019 07:05:15 -0700 [thread overview]
Message-ID: <20190903140515.GA16775@roeck-us.net> (raw)
In-Reply-To: <alpine.DEB.2.21.1909030646180.3228@hadrien>
On Tue, Sep 03, 2019 at 06:47:52AM +0200, Julia Lawall wrote:
> From: kbuild test robot <lkp@intel.com>
>
> Use devm_platform_ioremap_resource helper which wraps
> platform_get_resource() and devm_ioremap_resource() together.
>
> Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci
>
> Fixes: 658e687b4218 ("hwmon: Add Synaptics AS370 PVT sensor driver")
> CC: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> Signed-off-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> Reviewed-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Applied to hwmon-next.
Thanks,
Guenter
> ---
>
> tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
> head: 9c551fac9ea9629cdc6deb205292c2bbe7b38917
> commit: 658e687b4218b42d03a5b0b79a292c9c48f1ddaf [32/34] hwmon: Add Synaptics AS370 PVT sensor driver
> :::::: branch date: 7 hours ago
> :::::: commit date: 7 hours ago
>
> Please take the patch only if it's a positive warning. Thanks!
>
> as370-hwmon.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> --- a/drivers/hwmon/as370-hwmon.c
> +++ b/drivers/hwmon/as370-hwmon.c
> @@ -103,7 +103,6 @@ static const struct hwmon_chip_info as37
>
> static int as370_hwmon_probe(struct platform_device *pdev)
> {
> - struct resource *res;
> struct device *hwmon_dev;
> struct as370_hwmon *hwmon;
> struct device *dev = &pdev->dev;
> @@ -112,8 +111,7 @@ static int as370_hwmon_probe(struct plat
> if (!hwmon)
> return -ENOMEM;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - hwmon->base = devm_ioremap_resource(&pdev->dev, res);
> + hwmon->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(hwmon->base))
> return PTR_ERR(hwmon->base);
prev parent reply other threads:[~2019-09-03 14:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 4:47 [PATCH] hwmon: fix devm_platform_ioremap_resource.cocci warnings Julia Lawall
2019-09-03 5:32 ` Jisheng Zhang
2019-09-03 14:05 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190903140515.GA16775@roeck-us.net \
--to=linux@roeck-us.net \
--cc=Jisheng.Zhang@synaptics.com \
--cc=jdelvare@suse.com \
--cc=julia.lawall@lip6.fr \
--cc=kbuild-all@01.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox