* [PATCH] counter: fix devm_platform_ioremap_resource.cocci warnings
@ 2019-08-09 9:41 Julia Lawall
2019-09-01 23:00 ` David Lechner
0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2019-08-09 9:41 UTC (permalink / raw)
To: David Lechner; +Cc: William Breathitt Gray, linux-iio, linux-kernel, kbuild-all
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: 78958c294246 ("counter: new TI eQEP driver")
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---
tree: https://github.com/dlech/linux bone-counter
head: 669cef0feba0b11f271f462c4d26e4d1449a9db8
commit: 78958c294246fe1177ff62518eef45d20ad0165e [5/8] counter: new TI eQEP driver
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
Despite the fixes tag, this is not actually fixing a bug, it just makes
the code a little shorter.
ti-eqep.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/counter/ti-eqep.c
+++ b/drivers/counter/ti-eqep.c
@@ -392,15 +392,13 @@ static int ti_eqep_probe(struct platform
{
struct device *dev = &pdev->dev;
struct ti_eqep_cnt *priv;
- struct resource *res;
void __iomem *base;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] counter: fix devm_platform_ioremap_resource.cocci warnings
2019-08-09 9:41 [PATCH] counter: fix devm_platform_ioremap_resource.cocci warnings Julia Lawall
@ 2019-09-01 23:00 ` David Lechner
0 siblings, 0 replies; 2+ messages in thread
From: David Lechner @ 2019-09-01 23:00 UTC (permalink / raw)
To: Julia Lawall; +Cc: William Breathitt Gray, linux-iio, linux-kernel, kbuild-all
On 8/9/19 4:41 AM, 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: 78958c294246 ("counter: new TI eQEP driver")
> Signed-off-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
>
Included this change in v2 of the "counter: new TI eQEP driver" series.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-01 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-09 9:41 [PATCH] counter: fix devm_platform_ioremap_resource.cocci warnings Julia Lawall
2019-09-01 23:00 ` David Lechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).