driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: fieldbus: make use of devm_platform_ioremap_resource
@ 2019-10-08  6:10 hariprasad, Kelam, hariprasad.kelam
  2019-10-08 13:31 ` Sven Van Asbroeck
  0 siblings, 1 reply; 5+ messages in thread
From: hariprasad, Kelam, hariprasad.kelam @ 2019-10-08  6:10 UTC (permalink / raw)
  Cc: devel, Sven Van Asbroeck, Hariprasad Kelam, linux-kernel,
	Greg Kroah-Hartman

From: Hariprasad Kelam <hariprasad.kelam@gmail.com>

fix below issues reported by coccicheck
drivers/staging//fieldbus/anybuss/arcx-anybus.c:135:1-5: WARNING: Use
devm_platform_ioremap_resource for base
drivers/staging//fieldbus/anybuss/arcx-anybus.c:248:1-14: WARNING: Use
devm_platform_ioremap_resource for cd -> cpld_base

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
 drivers/staging/fieldbus/anybuss/arcx-anybus.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/fieldbus/anybuss/arcx-anybus.c b/drivers/staging/fieldbus/anybuss/arcx-anybus.c
index 2ecffa4..5b8d0ba 100644
--- a/drivers/staging/fieldbus/anybuss/arcx-anybus.c
+++ b/drivers/staging/fieldbus/anybuss/arcx-anybus.c
@@ -127,12 +127,10 @@ static const struct regmap_config arcx_regmap_cfg = {
 static struct regmap *create_parallel_regmap(struct platform_device *pdev,
 					     int idx)
 {
-	struct resource *res;
 	void __iomem *base;
 	struct device *dev = &pdev->dev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, idx + 1);
-	base = devm_ioremap_resource(dev, res);
+	base = devm_platform_ioremap_resource(pdev, idx + 1);
 	if (IS_ERR(base))
 		return ERR_CAST(base);
 	return devm_regmap_init_mmio(dev, base, &arcx_regmap_cfg);
@@ -230,7 +228,6 @@ static int controller_probe(struct platform_device *pdev)
 	struct regulator_config config = { };
 	struct regulator_dev *regulator;
 	int err, id;
-	struct resource *res;
 	struct anybuss_host *host;
 	u8 status1, cap;
 
@@ -244,8 +241,7 @@ static int controller_probe(struct platform_device *pdev)
 		return PTR_ERR(cd->reset_gpiod);
 
 	/* CPLD control memory, sits at index 0 */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	cd->cpld_base = devm_ioremap_resource(dev, res);
+	cd->cpld_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(cd->cpld_base)) {
 		dev_err(dev,
 			"failed to map cpld base address\n");
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: fieldbus: make use of devm_platform_ioremap_resource
  2019-10-08  6:10 [PATCH] staging: fieldbus: make use of devm_platform_ioremap_resource hariprasad, Kelam, hariprasad.kelam
@ 2019-10-08 13:31 ` Sven Van Asbroeck
  2019-10-28 21:11   ` Sven Van Asbroeck
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Van Asbroeck @ 2019-10-08 13:31 UTC (permalink / raw)
  To: hariprasad Kelam; +Cc: devel, Greg Kroah-Hartman, Linux Kernel Mailing List

On Tue, Oct 8, 2019 at 2:11 AM hariprasad Kelam
<hariprasad.kelam@gmail.com> wrote:
>
> From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
>
> fix below issues reported by coccicheck
> drivers/staging//fieldbus/anybuss/arcx-anybus.c:135:1-5: WARNING: Use
> devm_platform_ioremap_resource for base
> drivers/staging//fieldbus/anybuss/arcx-anybus.c:248:1-14: WARNING: Use
> devm_platform_ioremap_resource for cd -> cpld_base
>
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> ---
>  drivers/staging/fieldbus/anybuss/arcx-anybus.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)

Reviewed-by: Sven Van Asbroeck <TheSven73@gmail.com>
Tested-by: Sven Van Asbroeck <TheSven73@gmail.com>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: fieldbus: make use of devm_platform_ioremap_resource
  2019-10-08 13:31 ` Sven Van Asbroeck
@ 2019-10-28 21:11   ` Sven Van Asbroeck
  2019-10-29  8:03     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Van Asbroeck @ 2019-10-28 21:11 UTC (permalink / raw)
  To: hariprasad Kelam; +Cc: devel, Greg Kroah-Hartman, Linux Kernel Mailing List

Hi Greg, friendly reminder... Did you miss the patch review below, or
is there a reason
why this isn't getting queued?

There seems to be a crowd chasing down this type of warnings, resulting
in multiple duplicates.

On Tue, Oct 8, 2019 at 9:31 AM Sven Van Asbroeck <thesven73@gmail.com> wrote:
>
> On Tue, Oct 8, 2019 at 2:11 AM hariprasad Kelam
> <hariprasad.kelam@gmail.com> wrote:
> >
> > From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> >
> > fix below issues reported by coccicheck
> > drivers/staging//fieldbus/anybuss/arcx-anybus.c:135:1-5: WARNING: Use
> > devm_platform_ioremap_resource for base
> > drivers/staging//fieldbus/anybuss/arcx-anybus.c:248:1-14: WARNING: Use
> > devm_platform_ioremap_resource for cd -> cpld_base
> >
> > Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> > ---
> >  drivers/staging/fieldbus/anybuss/arcx-anybus.c | 8 ++------
> >  1 file changed, 2 insertions(+), 6 deletions(-)
>
> Reviewed-by: Sven Van Asbroeck <TheSven73@gmail.com>
> Tested-by: Sven Van Asbroeck <TheSven73@gmail.com>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: fieldbus: make use of devm_platform_ioremap_resource
  2019-10-28 21:11   ` Sven Van Asbroeck
@ 2019-10-29  8:03     ` Greg Kroah-Hartman
  2019-10-29 13:05       ` Sven Van Asbroeck
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2019-10-29  8:03 UTC (permalink / raw)
  To: Sven Van Asbroeck; +Cc: devel, hariprasad Kelam, Linux Kernel Mailing List

On Mon, Oct 28, 2019 at 05:11:26PM -0400, Sven Van Asbroeck wrote:
> Hi Greg, friendly reminder... Did you miss the patch review below, or
> is there a reason
> why this isn't getting queued?
> 
> There seems to be a crowd chasing down this type of warnings, resulting
> in multiple duplicates.

This has been in my tree already for a while, can you verify it is all
ok?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: fieldbus: make use of devm_platform_ioremap_resource
  2019-10-29  8:03     ` Greg Kroah-Hartman
@ 2019-10-29 13:05       ` Sven Van Asbroeck
  0 siblings, 0 replies; 5+ messages in thread
From: Sven Van Asbroeck @ 2019-10-29 13:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: devel, hariprasad Kelam, Linux Kernel Mailing List

On Tue, Oct 29, 2019 at 4:03 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This has been in my tree already for a while, can you verify it is all
> ok?
>

All good. I see you took Cristiane's version, not hariprasad's or YueHaibing's.
As long as one version lands, all is well :)
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-29 13:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08  6:10 [PATCH] staging: fieldbus: make use of devm_platform_ioremap_resource hariprasad, Kelam, hariprasad.kelam
2019-10-08 13:31 ` Sven Van Asbroeck
2019-10-28 21:11   ` Sven Van Asbroeck
2019-10-29  8:03     ` Greg Kroah-Hartman
2019-10-29 13:05       ` Sven Van Asbroeck

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).