* [PATCH] staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper
@ 2019-10-26 23:52 ` Cristiane Naves
0 siblings, 0 replies; 10+ messages in thread
From: Cristiane Naves @ 2019-10-26 23:52 UTC (permalink / raw)
To: outreachy-kernel
Cc: Sven Van Asbroeck, Greg Kroah-Hartman, devel, linux-kernel
Use devm_platform_ioremap_resource helper which wraps
platform_get_resource() and devm_ioremap_resource() together. Issue
found by coccicheck.
Signed-off-by: Cristiane Naves <cristianenavescardoso09@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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper
@ 2019-10-26 23:52 ` Cristiane Naves
0 siblings, 0 replies; 10+ messages in thread
From: Cristiane Naves @ 2019-10-26 23:52 UTC (permalink / raw)
To: outreachy-kernel
Cc: devel, Sven Van Asbroeck, linux-kernel, Greg Kroah-Hartman
Use devm_platform_ioremap_resource helper which wraps
platform_get_resource() and devm_ioremap_resource() together. Issue
found by coccicheck.
Signed-off-by: Cristiane Naves <cristianenavescardoso09@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] 10+ messages in thread
* Re: [PATCH] staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper
2019-10-26 23:52 ` Cristiane Naves
@ 2019-10-28 14:27 ` Sven Van Asbroeck
-1 siblings, 0 replies; 10+ messages in thread
From: Sven Van Asbroeck @ 2019-10-28 14:27 UTC (permalink / raw)
To: Cristiane Naves
Cc: outreachy-kernel, Greg Kroah-Hartman, devel, Linux Kernel Mailing List
On Sat, Oct 26, 2019 at 7:52 PM Cristiane Naves
<cristianenavescardoso09@gmail.com> wrote:
>
> Use devm_platform_ioremap_resource helper which wraps
> platform_get_resource() and devm_ioremap_resource() together. Issue
> found by coccicheck.
>
> Signed-off-by: Cristiane Naves <cristianenavescardoso09@gmail.com>
This is a duplicate of:
https://www.spinics.net/lists/linux-driver-devel/msg129526.html
and
https://lore.kernel.org/patchwork/patch/1140024/
When you find an issue, please search the mailing list(s) first to check
if it is being discussed already.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper
@ 2019-10-28 14:27 ` Sven Van Asbroeck
0 siblings, 0 replies; 10+ messages in thread
From: Sven Van Asbroeck @ 2019-10-28 14:27 UTC (permalink / raw)
To: Cristiane Naves
Cc: devel, outreachy-kernel, Linux Kernel Mailing List, Greg Kroah-Hartman
On Sat, Oct 26, 2019 at 7:52 PM Cristiane Naves
<cristianenavescardoso09@gmail.com> wrote:
>
> Use devm_platform_ioremap_resource helper which wraps
> platform_get_resource() and devm_ioremap_resource() together. Issue
> found by coccicheck.
>
> Signed-off-by: Cristiane Naves <cristianenavescardoso09@gmail.com>
This is a duplicate of:
https://www.spinics.net/lists/linux-driver-devel/msg129526.html
and
https://lore.kernel.org/patchwork/patch/1140024/
When you find an issue, please search the mailing list(s) first to check
if it is being discussed already.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper
2019-10-28 14:27 ` Sven Van Asbroeck
(?)
@ 2019-10-28 18:28 ` Cristiane Naves
2019-10-28 20:06 ` Sven Van Asbroeck
-1 siblings, 1 reply; 10+ messages in thread
From: Cristiane Naves @ 2019-10-28 18:28 UTC (permalink / raw)
To: Sven Van Asbroeck; +Cc: outreachy-kernel
On Mon, Oct 28, 2019 at 10:27:04AM -0400, Sven Van Asbroeck wrote:
> On Sat, Oct 26, 2019 at 7:52 PM Cristiane Naves
> <cristianenavescardoso09@gmail.com> wrote:
> >
> > Use devm_platform_ioremap_resource helper which wraps
> > platform_get_resource() and devm_ioremap_resource() together. Issue
> > found by coccicheck.
> >
> > Signed-off-by: Cristiane Naves <cristianenavescardoso09@gmail.com>
>
> This is a duplicate of:
> https://www.spinics.net/lists/linux-driver-devel/msg129526.html
> and
> https://lore.kernel.org/patchwork/patch/1140024/
>
> When you find an issue, please search the mailing list(s) first to check
> if it is being discussed already.
Sorry, I was searching for the issue only on outreachy mailing list and
had found nothing about it.
I didn't know about these other mailing lists.
Thanks for the feedback!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper
2019-10-28 18:28 ` Cristiane Naves
@ 2019-10-28 20:06 ` Sven Van Asbroeck
0 siblings, 0 replies; 10+ messages in thread
From: Sven Van Asbroeck @ 2019-10-28 20:06 UTC (permalink / raw)
To: Cristiane Naves; +Cc: outreachy-kernel, Linux Kernel Mailing List
On Mon, Oct 28, 2019 at 2:28 PM Cristiane Naves
<cristianenavescardoso09@gmail.com> wrote:
>
> Sorry, I was searching for the issue only on outreachy mailing list and
> had found nothing about it.
> I didn't know about these other mailing lists.
> Thanks for the feedback!
No need to apologize, most of us are always learning !
Next time, you can get the mailing lists to check by running the
get_maintainer.pl script on the file(s) you are going to modify:
$ ./scripts/get_maintainer.pl drivers/staging/fieldbus/anybuss/arcx-anybus.c
<snip>
devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM)
linux-kernel@vger.kernel.org (open list)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper
2019-10-26 23:52 ` Cristiane Naves
@ 2019-10-29 17:40 ` Sven Van Asbroeck
-1 siblings, 0 replies; 10+ messages in thread
From: Sven Van Asbroeck @ 2019-10-29 17:40 UTC (permalink / raw)
To: Cristiane Naves
Cc: outreachy-kernel, Greg Kroah-Hartman, devel, Linux Kernel Mailing List
On Sat, Oct 26, 2019 at 7:52 PM Cristiane Naves
<cristianenavescardoso09@gmail.com> wrote:
>
> Use devm_platform_ioremap_resource helper which wraps
> platform_get_resource() and devm_ioremap_resource() together. Issue
> found by coccicheck.
>
> Signed-off-by: Cristiane Naves <cristianenavescardoso09@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>
Greg has already queued this patch, but the link embedded in
his commit message should point people here.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper
@ 2019-10-29 17:40 ` Sven Van Asbroeck
0 siblings, 0 replies; 10+ messages in thread
From: Sven Van Asbroeck @ 2019-10-29 17:40 UTC (permalink / raw)
To: Cristiane Naves
Cc: devel, outreachy-kernel, Linux Kernel Mailing List, Greg Kroah-Hartman
On Sat, Oct 26, 2019 at 7:52 PM Cristiane Naves
<cristianenavescardoso09@gmail.com> wrote:
>
> Use devm_platform_ioremap_resource helper which wraps
> platform_get_resource() and devm_ioremap_resource() together. Issue
> found by coccicheck.
>
> Signed-off-by: Cristiane Naves <cristianenavescardoso09@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>
Greg has already queued this patch, but the link embedded in
his commit message should point people here.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper
2019-10-29 17:40 ` Sven Van Asbroeck
@ 2019-10-29 20:35 ` Cristiane Naves
-1 siblings, 0 replies; 10+ messages in thread
From: Cristiane Naves @ 2019-10-29 20:35 UTC (permalink / raw)
To: Sven Van Asbroeck
Cc: devel, outreachy-kernel, LinuxKernelMailingList, Greg Kroah-Hartman
On Tue, Oct 29, 2019 at 01:40:08PM -0400, Sven Van Asbroeck wrote:
> On Sat, Oct 26, 2019 at 7:52 PM Cristiane Naves
> <cristianenavescardoso09@gmail.com> wrote:
> >
> > Use devm_platform_ioremap_resource helper which wraps
> > platform_get_resource() and devm_ioremap_resource() together. Issue
> > found by coccicheck.
> >
> > Signed-off-by: Cristiane Naves <cristianenavescardoso09@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>
>
> Greg has already queued this patch, but the link embedded in
> his commit message should point people here.
Thanks, I'll check it out.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper
@ 2019-10-29 20:35 ` Cristiane Naves
0 siblings, 0 replies; 10+ messages in thread
From: Cristiane Naves @ 2019-10-29 20:35 UTC (permalink / raw)
To: Sven Van Asbroeck
Cc: outreachy-kernel, Greg Kroah-Hartman, devel, LinuxKernelMailingList
On Tue, Oct 29, 2019 at 01:40:08PM -0400, Sven Van Asbroeck wrote:
> On Sat, Oct 26, 2019 at 7:52 PM Cristiane Naves
> <cristianenavescardoso09@gmail.com> wrote:
> >
> > Use devm_platform_ioremap_resource helper which wraps
> > platform_get_resource() and devm_ioremap_resource() together. Issue
> > found by coccicheck.
> >
> > Signed-off-by: Cristiane Naves <cristianenavescardoso09@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>
>
> Greg has already queued this patch, but the link embedded in
> his commit message should point people here.
Thanks, I'll check it out.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-11-06 19:25 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-26 23:52 [PATCH] staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper Cristiane Naves
2019-10-26 23:52 ` Cristiane Naves
2019-10-28 14:27 ` Sven Van Asbroeck
2019-10-28 14:27 ` Sven Van Asbroeck
2019-10-28 18:28 ` Cristiane Naves
2019-10-28 20:06 ` Sven Van Asbroeck
2019-10-29 17:40 ` Sven Van Asbroeck
2019-10-29 17:40 ` Sven Van Asbroeck
2019-10-29 20:35 ` Cristiane Naves
2019-10-29 20:35 ` Cristiane Naves
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.