kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: busses: i2c-nomadik: Remove a useless call in the remove function
@ 2021-08-21  7:17 Christophe JAILLET
  2023-06-30 20:10 ` Christophe JAILLET
  0 siblings, 1 reply; 3+ messages in thread
From: Christophe JAILLET @ 2021-08-21  7:17 UTC (permalink / raw)
  To: linus.walleij
  Cc: linux-arm-kernel, linux-kernel, kernel-janitors, Christophe JAILLET

Since commit a410963ba4c0 ("Merge branch 'i2c-embedded/for-next' of
git://git.pengutronix.de/git/wsa/linux"), there is no more
'request_mem_region()' call in this driver.

So remove the 'release_mem_region()' call from the remove function which is
likely a left over.

There is no details in the above commit log, but at its end we can read:
   Conflicts:
	   drivers/i2c/busses/i2c-nomadik.c

This may explain why this call has been left here.

Fixes: a410963ba4c0 ("Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
This patch is completely speculative and without details about commit
a410963ba4c0 it's hard to be sure of the intent.

All I can say is that it looks logical to me and that it compiles!
---
 drivers/i2c/busses/i2c-nomadik.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index a2d12a5b1c34..e215a7357873 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -1057,7 +1057,6 @@ static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id)
 
 static void nmk_i2c_remove(struct amba_device *adev)
 {
-	struct resource *res = &adev->res;
 	struct nmk_i2c_dev *dev = amba_get_drvdata(adev);
 
 	i2c_del_adapter(&dev->adap);
@@ -1067,7 +1066,6 @@ static void nmk_i2c_remove(struct amba_device *adev)
 	/* disable the controller */
 	i2c_clr_bit(dev->virtbase + I2C_CR, I2C_CR_PE);
 	clk_disable_unprepare(dev->clk);
-	release_mem_region(res->start, resource_size(res));
 }
 
 static struct i2c_vendor_data vendor_stn8815 = {
-- 
2.30.2


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

* Re: [PATCH] i2c: busses: i2c-nomadik: Remove a useless call in the remove function
  2021-08-21  7:17 [PATCH] i2c: busses: i2c-nomadik: Remove a useless call in the remove function Christophe JAILLET
@ 2023-06-30 20:10 ` Christophe JAILLET
  2023-06-30 21:06   ` Wolfram Sang
  0 siblings, 1 reply; 3+ messages in thread
From: Christophe JAILLET @ 2023-06-30 20:10 UTC (permalink / raw)
  To: linus.walleij, Andi Shyti
  Cc: linux-arm-kernel, linux-kernel, kernel-janitors, linux-i2c

Hi,

"drivers/i2c/busses/i2c-nomadik.c" just got some loved, so I was 
wondering if the below patch could be reviewed.

It does not apply anymore because of the recent change, but the 
explanation in the commit message and the proposed change still make 
sense to me.

If it looks valid, I could send a V2.

So any feedback would be appreciated.

CJ


Le 21/08/2021 à 09:17, Christophe JAILLET a écrit :
> Since commit a410963ba4c0 ("Merge branch 'i2c-embedded/for-next' of
> git://git.pengutronix.de/git/wsa/linux"), there is no more
> 'request_mem_region()' call in this driver.
> 
> So remove the 'release_mem_region()' call from the remove function which is
> likely a left over.
> 
> There is no details in the above commit log, but at its end we can read:
>     Conflicts:
> 	   drivers/i2c/busses/i2c-nomadik.c
> 
> This may explain why this call has been left here.
> 
> Fixes: a410963ba4c0 ("Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is completely speculative and without details about commit
> a410963ba4c0 it's hard to be sure of the intent.
> 
> All I can say is that it looks logical to me and that it compiles!
> ---
>   drivers/i2c/busses/i2c-nomadik.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
> index a2d12a5b1c34..e215a7357873 100644
> --- a/drivers/i2c/busses/i2c-nomadik.c
> +++ b/drivers/i2c/busses/i2c-nomadik.c
> @@ -1057,7 +1057,6 @@ static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id)
>   
>   static void nmk_i2c_remove(struct amba_device *adev)
>   {
> -	struct resource *res = &adev->res;
>   	struct nmk_i2c_dev *dev = amba_get_drvdata(adev);
>   
>   	i2c_del_adapter(&dev->adap);
> @@ -1067,7 +1066,6 @@ static void nmk_i2c_remove(struct amba_device *adev)
>   	/* disable the controller */
>   	i2c_clr_bit(dev->virtbase + I2C_CR, I2C_CR_PE);
>   	clk_disable_unprepare(dev->clk);
> -	release_mem_region(res->start, resource_size(res));
>   }
>   
>   static struct i2c_vendor_data vendor_stn8815 = {


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

* Re: [PATCH] i2c: busses: i2c-nomadik: Remove a useless call in the remove function
  2023-06-30 20:10 ` Christophe JAILLET
@ 2023-06-30 21:06   ` Wolfram Sang
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2023-06-30 21:06 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: linus.walleij, Andi Shyti, linux-arm-kernel, linux-kernel,
	kernel-janitors, linux-i2c

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

On Fri, Jun 30, 2023 at 10:10:40PM +0200, Christophe JAILLET wrote:
> Hi,
> 
> "drivers/i2c/busses/i2c-nomadik.c" just got some loved, so I was wondering
> if the below patch could be reviewed.
> 
> It does not apply anymore because of the recent change, but the explanation
> in the commit message and the proposed change still make sense to me.
> 
> If it looks valid, I could send a V2.
> 
> So any feedback would be appreciated.

Sure, go ahead!


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

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

end of thread, other threads:[~2023-06-30 21:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21  7:17 [PATCH] i2c: busses: i2c-nomadik: Remove a useless call in the remove function Christophe JAILLET
2023-06-30 20:10 ` Christophe JAILLET
2023-06-30 21:06   ` Wolfram Sang

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