public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2] i2c: busses: i2c-nomadik: Remove a useless call in the remove function
@ 2023-06-30 21:23 Christophe JAILLET
  2023-07-01 13:49 ` Linus Walleij
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Christophe JAILLET @ 2023-06-30 21:23 UTC (permalink / raw)
  To: wsa, Linus Walleij, Andi Shyti
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET,
	linux-arm-kernel, linux-i2c

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>
---
v2: synch with latest -next

v1: https://lore.kernel.org/all/4f4c2c5c20b61c4bb28cb3e9ab4640534dd2adec.1629530169.git.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 1e5fd23ef45c..212f412f1c74 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -1038,7 +1038,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);
@@ -1047,7 +1046,6 @@ static void nmk_i2c_remove(struct amba_device *adev)
 	clear_all_interrupts(dev);
 	/* disable the controller */
 	i2c_clr_bit(dev->virtbase + I2C_CR, I2C_CR_PE);
-	release_mem_region(res->start, resource_size(res));
 }
 
 static struct i2c_vendor_data vendor_stn8815 = {
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] i2c: busses: i2c-nomadik: Remove a useless call in the remove function
  2023-06-30 21:23 [PATCH v2] i2c: busses: i2c-nomadik: Remove a useless call in the remove function Christophe JAILLET
@ 2023-07-01 13:49 ` Linus Walleij
  2023-07-03  8:38 ` Andi Shyti
  2023-07-03 12:54 ` Dan Carpenter
  2 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2023-07-01 13:49 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: wsa, Andi Shyti, linux-kernel, kernel-janitors, linux-arm-kernel,
	linux-i2c

On Fri, Jun 30, 2023 at 11:23 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:

> 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>
> ---
> v2: synch with latest -next

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] i2c: busses: i2c-nomadik: Remove a useless call in the remove function
  2023-06-30 21:23 [PATCH v2] i2c: busses: i2c-nomadik: Remove a useless call in the remove function Christophe JAILLET
  2023-07-01 13:49 ` Linus Walleij
@ 2023-07-03  8:38 ` Andi Shyti
  2023-07-03 12:54 ` Dan Carpenter
  2 siblings, 0 replies; 5+ messages in thread
From: Andi Shyti @ 2023-07-03  8:38 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: wsa, Linus Walleij, linux-kernel, kernel-janitors,
	linux-arm-kernel, linux-i2c

Hi Christophe,

On Fri, Jun 30, 2023 at 11:23:28PM +0200, Christophe JAILLET wrote:
> 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>

Reviewed-by: Andi Shyti <andi.shyti@kernel.org> 

Andi

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] i2c: busses: i2c-nomadik: Remove a useless call in the remove function
  2023-06-30 21:23 [PATCH v2] i2c: busses: i2c-nomadik: Remove a useless call in the remove function Christophe JAILLET
  2023-07-01 13:49 ` Linus Walleij
  2023-07-03  8:38 ` Andi Shyti
@ 2023-07-03 12:54 ` Dan Carpenter
  2023-07-04  7:37   ` Andi Shyti
  2 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2023-07-03 12:54 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: wsa, Linus Walleij, Andi Shyti, linux-kernel, kernel-janitors,
	linux-arm-kernel, linux-i2c

On Fri, Jun 30, 2023 at 11:23:28PM +0200, Christophe JAILLET wrote:
> 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

The reason why you're so confused about this Merge commit is because
it's completely unrelated to the bug.  :P  It should be:

Fixes: 235602146ec9 (i2c-nomadik: turn the platform driver to an amba driver)

When you look at that commit, you'll see that your patch is correct.

regards,
dan carpenter


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] i2c: busses: i2c-nomadik: Remove a useless call in the remove function
  2023-07-03 12:54 ` Dan Carpenter
@ 2023-07-04  7:37   ` Andi Shyti
  0 siblings, 0 replies; 5+ messages in thread
From: Andi Shyti @ 2023-07-04  7:37 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Christophe JAILLET, wsa, Linus Walleij, linux-kernel,
	kernel-janitors, linux-arm-kernel, linux-i2c

Hi,

On Mon, Jul 03, 2023 at 03:54:42PM +0300, Dan Carpenter wrote:
> On Fri, Jun 30, 2023 at 11:23:28PM +0200, Christophe JAILLET wrote:
> > 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
> 
> The reason why you're so confused about this Merge commit is because
> it's completely unrelated to the bug.  :P  It should be:
> 
> Fixes: 235602146ec9 (i2c-nomadik: turn the platform driver to an amba driver)
> 
> When you look at that commit, you'll see that your patch is correct.

Yes, indeed I noticed the same but did not investigate further.
Please, also add:

Cc: <stable@vger.kernel.org> # v3.6+

Andi

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-07-04  7:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-30 21:23 [PATCH v2] i2c: busses: i2c-nomadik: Remove a useless call in the remove function Christophe JAILLET
2023-07-01 13:49 ` Linus Walleij
2023-07-03  8:38 ` Andi Shyti
2023-07-03 12:54 ` Dan Carpenter
2023-07-04  7:37   ` Andi Shyti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox