All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
@ 2020-04-14 13:48 Dejin Zheng
  2020-04-15 10:21 ` Wolfram Sang
  0 siblings, 1 reply; 18+ messages in thread
From: Dejin Zheng @ 2020-04-14 13:48 UTC (permalink / raw)
  To: michal.simek, wsa+renesas, pierre-yves.mordret, mcoquelin.stm32,
	alexandre.torgue, alain.volmat, linux-i2c
  Cc: linux-kernel, Dejin Zheng

use devm_platform_get_and_ioremap_resource() to simplify code, which
contains platform_get_resource() and devm_ioremap_resource(), it also
get the resource for use by the following code.

Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
 drivers/i2c/busses/i2c-cadence.c      | 3 +--
 drivers/i2c/busses/i2c-pca-platform.c | 3 +--
 drivers/i2c/busses/i2c-rcar.c         | 4 +---
 drivers/i2c/busses/i2c-stm32f7.c      | 3 +--
 4 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c
index 89d58f7d2a25..803c802611eb 100644
--- a/drivers/i2c/busses/i2c-cadence.c
+++ b/drivers/i2c/busses/i2c-cadence.c
@@ -906,8 +906,7 @@ static int cdns_i2c_probe(struct platform_device *pdev)
 		id->quirks = data->quirks;
 	}
 
-	r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	id->membase = devm_ioremap_resource(&pdev->dev, r_mem);
+	id->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);
 	if (IS_ERR(id->membase))
 		return PTR_ERR(id->membase);
 
diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c
index 635dd697ac0b..546426a470cc 100644
--- a/drivers/i2c/busses/i2c-pca-platform.c
+++ b/drivers/i2c/busses/i2c-pca-platform.c
@@ -149,8 +149,7 @@ static int i2c_pca_pf_probe(struct platform_device *pdev)
 	if (!i2c)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	i2c->reg_base = devm_ioremap_resource(&pdev->dev, res);
+	i2c->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(i2c->reg_base))
 		return PTR_ERR(i2c->reg_base);
 
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 3b5397aa4ca6..a45c4bf1ec01 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -938,9 +938,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->clk);
 	}
 
-	priv->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
-	priv->io = devm_ioremap_resource(dev, priv->res);
+	priv->io = devm_platform_get_and_ioremap_resource(pdev, 0, &priv->res);
 	if (IS_ERR(priv->io))
 		return PTR_ERR(priv->io);
 
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index 330ffed011e0..cf48f8df4423 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -1940,8 +1940,7 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
 	if (!i2c_dev)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	i2c_dev->base = devm_ioremap_resource(&pdev->dev, res);
+	i2c_dev->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(i2c_dev->base))
 		return PTR_ERR(i2c_dev->base);
 	phy_addr = (dma_addr_t)res->start;
-- 
2.25.0


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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
  2020-04-14 13:48 [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource Dejin Zheng
@ 2020-04-15 10:21 ` Wolfram Sang
  2020-04-15 16:07   ` Dejin Zheng
  0 siblings, 1 reply; 18+ messages in thread
From: Wolfram Sang @ 2020-04-15 10:21 UTC (permalink / raw)
  To: Dejin Zheng
  Cc: michal.simek, wsa+renesas, pierre-yves.mordret, mcoquelin.stm32,
	alexandre.torgue, alain.volmat, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 671 bytes --]

On Tue, Apr 14, 2020 at 09:48:27PM +0800, Dejin Zheng wrote:
> use devm_platform_get_and_ioremap_resource() to simplify code, which
> contains platform_get_resource() and devm_ioremap_resource(), it also
> get the resource for use by the following code.
> 
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>

Applied to for-next, because it seems 'the new way' but...

> -	r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	id->membase = devm_ioremap_resource(&pdev->dev, r_mem);
> +	id->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);

... guys, do you really think this one line reduction improves
readability? Oh well...


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
  2020-04-15 10:21 ` Wolfram Sang
@ 2020-04-15 16:07   ` Dejin Zheng
  2020-04-17 20:46     ` Andy Shevchenko
  0 siblings, 1 reply; 18+ messages in thread
From: Dejin Zheng @ 2020-04-15 16:07 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: michal.simek, wsa+renesas, pierre-yves.mordret, mcoquelin.stm32,
	alexandre.torgue, alain.volmat, linux-i2c, linux-kernel

On Wed, Apr 15, 2020 at 12:21:58PM +0200, Wolfram Sang wrote:
> On Tue, Apr 14, 2020 at 09:48:27PM +0800, Dejin Zheng wrote:
> > use devm_platform_get_and_ioremap_resource() to simplify code, which
> > contains platform_get_resource() and devm_ioremap_resource(), it also
> > get the resource for use by the following code.
> > 
> > Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
> 
> Applied to for-next, because it seems 'the new way' but...
> 
> > -	r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > -	id->membase = devm_ioremap_resource(&pdev->dev, r_mem);
> > +	id->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);
> 
> ... guys, do you really think this one line reduction improves
> readability? Oh well...
>
Wolfram, Thank you for accepting it. From my personal point of view,
as long as the direction is correct, even small improvements are
worth doing. Thanks again for your tolerance.

BR,
Dejin



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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
  2020-04-15 16:07   ` Dejin Zheng
@ 2020-04-17 20:46     ` Andy Shevchenko
  2020-04-18  4:06       ` Dejin Zheng
  0 siblings, 1 reply; 18+ messages in thread
From: Andy Shevchenko @ 2020-04-17 20:46 UTC (permalink / raw)
  To: Dejin Zheng
  Cc: Wolfram Sang, Michal Simek, Wolfram Sang, Pierre Yves MORDRET,
	Maxime Coquelin, Alexandre TORGUE, Alain Volmat, linux-i2c,
	Linux Kernel Mailing List

On Thu, Apr 16, 2020 at 3:19 AM Dejin Zheng <zhengdejin5@gmail.com> wrote:
>
> On Wed, Apr 15, 2020 at 12:21:58PM +0200, Wolfram Sang wrote:
> > On Tue, Apr 14, 2020 at 09:48:27PM +0800, Dejin Zheng wrote:
> > > use devm_platform_get_and_ioremap_resource() to simplify code, which
> > > contains platform_get_resource() and devm_ioremap_resource(), it also
> > > get the resource for use by the following code.
> > >
> > > Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
> >
> > Applied to for-next, because it seems 'the new way' but...
> >
> > > -   r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > > -   id->membase = devm_ioremap_resource(&pdev->dev, r_mem);
> > > +   id->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);
> >
> > ... guys, do you really think this one line reduction improves
> > readability? Oh well...
> >
> Wolfram, Thank you for accepting it. From my personal point of view,
> as long as the direction is correct, even small improvements are
> worth doing. Thanks again for your tolerance.

Do you have plans to move on from janitor work to something serious?

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
  2020-04-17 20:46     ` Andy Shevchenko
@ 2020-04-18  4:06       ` Dejin Zheng
  2020-04-18 13:00         ` Andy Shevchenko
  0 siblings, 1 reply; 18+ messages in thread
From: Dejin Zheng @ 2020-04-18  4:06 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Wolfram Sang, Michal Simek, Wolfram Sang, Pierre Yves MORDRET,
	Maxime Coquelin, Alexandre TORGUE, Alain Volmat, linux-i2c,
	Linux Kernel Mailing List

On Fri, Apr 17, 2020 at 11:46:33PM +0300, Andy Shevchenko wrote:
> On Thu, Apr 16, 2020 at 3:19 AM Dejin Zheng <zhengdejin5@gmail.com> wrote:
> >
> > On Wed, Apr 15, 2020 at 12:21:58PM +0200, Wolfram Sang wrote:
> > > On Tue, Apr 14, 2020 at 09:48:27PM +0800, Dejin Zheng wrote:
> > > > use devm_platform_get_and_ioremap_resource() to simplify code, which
> > > > contains platform_get_resource() and devm_ioremap_resource(), it also
> > > > get the resource for use by the following code.
> > > >
> > > > Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
> > >
> > > Applied to for-next, because it seems 'the new way' but...
> > >
> > > > -   r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > > > -   id->membase = devm_ioremap_resource(&pdev->dev, r_mem);
> > > > +   id->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);
> > >
> > > ... guys, do you really think this one line reduction improves
> > > readability? Oh well...
> > >
> > Wolfram, Thank you for accepting it. From my personal point of view,
> > as long as the direction is correct, even small improvements are
> > worth doing. Thanks again for your tolerance.
> 
> Do you have plans to move on from janitor work to something serious?
>
Andy, I want to do��but I don��t know where to start, Could you give me
some suggestions? Thanks very much!

BR,
Dejin
> -- 
> With Best Regards,
> Andy Shevchenko

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
  2020-04-18  4:06       ` Dejin Zheng
@ 2020-04-18 13:00         ` Andy Shevchenko
  2020-04-18 17:05           ` Dejin Zheng
  2020-04-19 16:36           ` Dejin Zheng
  0 siblings, 2 replies; 18+ messages in thread
From: Andy Shevchenko @ 2020-04-18 13:00 UTC (permalink / raw)
  To: Dejin Zheng; +Cc: linux-i2c

On Sat, Apr 18, 2020 at 7:07 AM Dejin Zheng <zhengdejin5@gmail.com> wrote:

Leave only you and i2c ML to avoid spamming people.

> > > Wolfram, Thank you for accepting it. From my personal point of view,
> > > as long as the direction is correct, even small improvements are
> > > worth doing. Thanks again for your tolerance.
> >
> > Do you have plans to move on from janitor work to something serious?
> >
> Andy, I want to do��but I don��t know where to start, Could you give me
> some suggestions? Thanks very much!

I have been collecting some items on my Gist page [1], where anybody
(depending on the skills) can find affordable tasks. Tell me if you
need elaboration.

[1]: https://gist.github.com/andy-shev/a2cb1ee4767d6d2f5d20db53ecb9aabc

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
  2020-04-18 13:00         ` Andy Shevchenko
@ 2020-04-18 17:05           ` Dejin Zheng
  2020-04-19 16:36           ` Dejin Zheng
  1 sibling, 0 replies; 18+ messages in thread
From: Dejin Zheng @ 2020-04-18 17:05 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-i2c

On Sat, Apr 18, 2020 at 04:00:03PM +0300, Andy Shevchenko wrote:
> On Sat, Apr 18, 2020 at 7:07 AM Dejin Zheng <zhengdejin5@gmail.com> wrote:
> 
> Leave only you and i2c ML to avoid spamming people.
> 
> > > > Wolfram, Thank you for accepting it. From my personal point of view,
> > > > as long as the direction is correct, even small improvements are
> > > > worth doing. Thanks again for your tolerance.
> > >
> > > Do you have plans to move on from janitor work to something serious?
> > >
> > Andy, I want to do��but I don��t know where to start, Could you give me
> > some suggestions? Thanks very much!
> 
> I have been collecting some items on my Gist page [1], where anybody
> (depending on the skills) can find affordable tasks. Tell me if you
> need elaboration.
> 
> [1]: https://gist.github.com/andy-shev/a2cb1ee4767d6d2f5d20db53ecb9aabc
>
Andy, thank you very much for your suggestion. I will study your Gist page
first. If there is something I don't understand, I will consult you again.
Thanks again for your help!

BR,
Dejin

> -- 
> With Best Regards,
> Andy Shevchenko

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
  2020-04-18 13:00         ` Andy Shevchenko
  2020-04-18 17:05           ` Dejin Zheng
@ 2020-04-19 16:36           ` Dejin Zheng
  2020-04-20  9:43             ` Wolfram Sang
  1 sibling, 1 reply; 18+ messages in thread
From: Dejin Zheng @ 2020-04-19 16:36 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-i2c

On Sat, Apr 18, 2020 at 04:00:03PM +0300, Andy Shevchenko wrote:
> On Sat, Apr 18, 2020 at 7:07 AM Dejin Zheng <zhengdejin5@gmail.com> wrote:
> 
> Leave only you and i2c ML to avoid spamming people.
> 
> > > > Wolfram, Thank you for accepting it. From my personal point of view,
> > > > as long as the direction is correct, even small improvements are
> > > > worth doing. Thanks again for your tolerance.
> > >
> > > Do you have plans to move on from janitor work to something serious?
> > >
> > Andy, I want to do��but I don��t know where to start, Could you give me
> > some suggestions? Thanks very much!
> 
> I have been collecting some items on my Gist page [1], where anybody
> (depending on the skills) can find affordable tasks. Tell me if you
> need elaboration.
> 
> [1]: https://gist.github.com/andy-shev/a2cb1ee4767d6d2f5d20db53ecb9aabc
>
Andy, your Gist page is really very suitable for me, I think I should be
able to start with the following two cases:

5. Run `codespell` across drivers and subsystems
6. Fix ioremap(..., 0) [size = 0] across architectures, now some return NULL,
   some return address, some may even have leaks

If I have any related commits, I will CC with you. Thanks!

BR,
Dejin

> -- 
> With Best Regards,
> Andy Shevchenko

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
  2020-04-19 16:36           ` Dejin Zheng
@ 2020-04-20  9:43             ` Wolfram Sang
  2020-04-20  9:47                 ` Andy Shevchenko
  0 siblings, 1 reply; 18+ messages in thread
From: Wolfram Sang @ 2020-04-20  9:43 UTC (permalink / raw)
  To: Dejin Zheng; +Cc: Andy Shevchenko, linux-i2c

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]


> 5. Run `codespell` across drivers and subsystems

I think Colin King is already working on that. I regularly get patches
from him doing that.

> 6. Fix ioremap(..., 0) [size = 0] across architectures, now some return NULL,
>    some return address, some may even have leaks

This sounds more useful to me. Would be great if you have interest.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
  2020-04-20  9:43             ` Wolfram Sang
@ 2020-04-20  9:47                 ` Andy Shevchenko
  0 siblings, 0 replies; 18+ messages in thread
From: Andy Shevchenko @ 2020-04-20  9:47 UTC (permalink / raw)
  To: Wolfram Sang, kbuild test robot; +Cc: Dejin Zheng, linux-i2c, lkp

On Mon, Apr 20, 2020 at 12:43 PM Wolfram Sang <wsa@the-dreams.de> wrote:
>
>
> > 5. Run `codespell` across drivers and subsystems
>
> I think Colin King is already working on that. I regularly get patches
> from him doing that.
>

I think CI should integrate it in their workflow,

LKP guys, what do you think?

> > 6. Fix ioremap(..., 0) [size = 0] across architectures, now some return NULL,
> >    some return address, some may even have leaks
>
> This sounds more useful to me. Would be great if you have interest.

But it much more advanced :-) Complete dive into the kernel guts.


-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
@ 2020-04-20  9:47                 ` Andy Shevchenko
  0 siblings, 0 replies; 18+ messages in thread
From: Andy Shevchenko @ 2020-04-20  9:47 UTC (permalink / raw)
  To: lkp

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

On Mon, Apr 20, 2020 at 12:43 PM Wolfram Sang <wsa@the-dreams.de> wrote:
>
>
> > 5. Run `codespell` across drivers and subsystems
>
> I think Colin King is already working on that. I regularly get patches
> from him doing that.
>

I think CI should integrate it in their workflow,

LKP guys, what do you think?

> > 6. Fix ioremap(..., 0) [size = 0] across architectures, now some return NULL,
> >    some return address, some may even have leaks
>
> This sounds more useful to me. Would be great if you have interest.

But it much more advanced :-) Complete dive into the kernel guts.


-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
  2020-04-20  9:47                 ` Andy Shevchenko
@ 2020-04-20  9:57                   ` Wolfram Sang
  -1 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2020-04-20  9:57 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: kbuild test robot, Dejin Zheng, linux-i2c, lkp

[-- Attachment #1: Type: text/plain, Size: 352 bytes --]


> > > 6. Fix ioremap(..., 0) [size = 0] across architectures, now some return NULL,
> > >    some return address, some may even have leaks
> >
> > This sounds more useful to me. Would be great if you have interest.
> 
> But it much more advanced :-) Complete dive into the kernel guts.

Well, learning by doing :) Dejin seems interested...


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
@ 2020-04-20  9:57                   ` Wolfram Sang
  0 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2020-04-20  9:57 UTC (permalink / raw)
  To: lkp

[-- Attachment #1: Type: text/plain, Size: 352 bytes --]


> > > 6. Fix ioremap(..., 0) [size = 0] across architectures, now some return NULL,
> > >    some return address, some may even have leaks
> >
> > This sounds more useful to me. Would be great if you have interest.
> 
> But it much more advanced :-) Complete dive into the kernel guts.

Well, learning by doing :) Dejin seems interested...


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
  2020-04-20  9:57                   ` Wolfram Sang
  (?)
@ 2020-04-20 14:36                   ` Dejin Zheng
  -1 siblings, 0 replies; 18+ messages in thread
From: Dejin Zheng @ 2020-04-20 14:36 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Andy Shevchenko, kbuild test robot, linux-i2c, lkp

On Mon, Apr 20, 2020 at 11:57:15AM +0200, Wolfram Sang wrote:
> 
> > > > 6. Fix ioremap(..., 0) [size = 0] across architectures, now some return NULL,
> > > >    some return address, some may even have leaks
> > >
> > > This sounds more useful to me. Would be great if you have interest.
> > 
> > But it much more advanced :-) Complete dive into the kernel guts.
> 
> Well, learning by doing :) Dejin seems interested...
>
I do my best to try, Thank you all for your encouragement and help.

BR,
Dejin



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

* Re: [LKP] Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
  2020-04-20  9:47                 ` Andy Shevchenko
@ 2020-04-21  1:24                   ` Philip Li
  -1 siblings, 0 replies; 18+ messages in thread
From: Philip Li @ 2020-04-21  1:24 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Wolfram Sang, kbuild test robot, Dejin Zheng, linux-i2c, lkp

On Mon, Apr 20, 2020 at 12:47:12PM +0300, Andy Shevchenko wrote:
> On Mon, Apr 20, 2020 at 12:43 PM Wolfram Sang <wsa@the-dreams.de> wrote:
> >
> >
> > > 5. Run `codespell` across drivers and subsystems
> >
> > I think Colin King is already working on that. I regularly get patches
> > from him doing that.
> >
> 
> I think CI should integrate it in their workflow,
> 
> LKP guys, what do you think?
thanks, this looks valuable, we will investigate the tool
to see how we can integrate it to our testing flow.

> 
> > > 6. Fix ioremap(..., 0) [size = 0] across architectures, now some return NULL,
> > >    some return address, some may even have leaks
> >
> > This sounds more useful to me. Would be great if you have interest.
> 
> But it much more advanced :-) Complete dive into the kernel guts.
> 
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> _______________________________________________
> LKP mailing list -- lkp@lists.01.org
> To unsubscribe send an email to lkp-leave@lists.01.org

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
@ 2020-04-21  1:24                   ` Philip Li
  0 siblings, 0 replies; 18+ messages in thread
From: Philip Li @ 2020-04-21  1:24 UTC (permalink / raw)
  To: lkp

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

On Mon, Apr 20, 2020 at 12:47:12PM +0300, Andy Shevchenko wrote:
> On Mon, Apr 20, 2020 at 12:43 PM Wolfram Sang <wsa@the-dreams.de> wrote:
> >
> >
> > > 5. Run `codespell` across drivers and subsystems
> >
> > I think Colin King is already working on that. I regularly get patches
> > from him doing that.
> >
> 
> I think CI should integrate it in their workflow,
> 
> LKP guys, what do you think?
thanks, this looks valuable, we will investigate the tool
to see how we can integrate it to our testing flow.

> 
> > > 6. Fix ioremap(..., 0) [size = 0] across architectures, now some return NULL,
> > >    some return address, some may even have leaks
> >
> > This sounds more useful to me. Would be great if you have interest.
> 
> But it much more advanced :-) Complete dive into the kernel guts.
> 
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> _______________________________________________
> LKP mailing list -- lkp(a)lists.01.org
> To unsubscribe send an email to lkp-leave(a)lists.01.org

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
@ 2020-04-17 20:36 ` Markus Elfring
  0 siblings, 0 replies; 18+ messages in thread
From: Markus Elfring @ 2020-04-17 20:36 UTC (permalink / raw)
  To: Dejin Zheng, linux-i2c
  Cc: kernel-janitors, linux-kernel, Wolfram Sang, Vignesh Raghavendra,
	Thor Thayer, Patrick Williams, Alain Volmat, Alexandre Torgue,
	Maxime Coquelin, Michal Simek, Pierre-Yves Mordret,
	Krzysztof Kozlowski, Krzysztof Adamski, Andy Shevchenko,
	Ard Biesheuvel, Bjorn Andersson, Barry Song, Bartosz Golaszewski,
	Dong Aisheng, George Cherian

> use devm_platform_get_and_ioremap_resource() to simplify code, which
> contains platform_get_resource() and devm_ioremap_resource(), it also
> get the resource for use by the following code.

I suggest to improve also this change description.

I have tried another script variant out for the semantic patch language.
This source code analysis approach would propose to transform
15 source files (for example in the directory “drivers/i2c”
of the software “Linux next-20200417”).
Would you like to take another look at corresponding change possibilities?

Regards,
Markus

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

* Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
@ 2020-04-17 20:36 ` Markus Elfring
  0 siblings, 0 replies; 18+ messages in thread
From: Markus Elfring @ 2020-04-17 20:36 UTC (permalink / raw)
  To: Dejin Zheng, linux-i2c
  Cc: kernel-janitors, linux-kernel, Wolfram Sang, Vignesh Raghavendra,
	Thor Thayer, Patrick Williams, Alain Volmat, Alexandre Torgue,
	Maxime Coquelin, Michal Simek, Pierre-Yves Mordret,
	Krzysztof Kozlowski, Krzysztof Adamski, Andy Shevchenko,
	Ard Biesheuvel, Bjorn Andersson, Barry Song, Bartosz Golaszewski,
	Dong Aisheng, George Cherian

> use devm_platform_get_and_ioremap_resource() to simplify code, which
> contains platform_get_resource() and devm_ioremap_resource(), it also
> get the resource for use by the following code.

I suggest to improve also this change description.

I have tried another script variant out for the semantic patch language.
This source code analysis approach would propose to transform
15 source files (for example in the directory “drivers/i2c”
of the software “Linux next-20200417”).
Would you like to take another look at corresponding change possibilities?

Regards,
Markus

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

end of thread, other threads:[~2020-04-21  1:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-14 13:48 [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource Dejin Zheng
2020-04-15 10:21 ` Wolfram Sang
2020-04-15 16:07   ` Dejin Zheng
2020-04-17 20:46     ` Andy Shevchenko
2020-04-18  4:06       ` Dejin Zheng
2020-04-18 13:00         ` Andy Shevchenko
2020-04-18 17:05           ` Dejin Zheng
2020-04-19 16:36           ` Dejin Zheng
2020-04-20  9:43             ` Wolfram Sang
2020-04-20  9:47               ` Andy Shevchenko
2020-04-20  9:47                 ` Andy Shevchenko
2020-04-20  9:57                 ` Wolfram Sang
2020-04-20  9:57                   ` Wolfram Sang
2020-04-20 14:36                   ` Dejin Zheng
2020-04-21  1:24                 ` [LKP] " Philip Li
2020-04-21  1:24                   ` Philip Li
2020-04-17 20:36 Markus Elfring
2020-04-17 20:36 ` Markus Elfring

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.