* [PATCH 0/3] treewide: drop check because i2c_unregister_device() is NULL safe
@ 2023-09-22 8:04 Wolfram Sang
2023-09-22 8:04 ` [PATCH 1/3] usb: typec: " Wolfram Sang
0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2023-09-22 8:04 UTC (permalink / raw)
To: linux-renesas-soc; +Cc: Wolfram Sang, linux-kernel, linux-media, linux-usb
Fix the few drivers missing that i2c_unregister_device() is NULL safe.
One is left, but this needs discussion and refactoring and will be
sorted out independently.
Wolfram Sang (3):
usb: typec: drop check because i2c_unregister_device() is NULL safe
media: i2c: drop check because i2c_unregister_device() is NULL safe
media: dvb-frontends: drop check because i2c_unregister_device() is
NULL safe
drivers/media/dvb-frontends/m88ds3103.c | 3 +--
drivers/media/i2c/rdacm20.c | 3 +--
drivers/usb/typec/anx7411.c | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] usb: typec: drop check because i2c_unregister_device() is NULL safe
2023-09-22 8:04 [PATCH 0/3] treewide: drop check because i2c_unregister_device() is NULL safe Wolfram Sang
@ 2023-09-22 8:04 ` Wolfram Sang
2023-09-22 10:54 ` Heikki Krogerus
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Wolfram Sang @ 2023-09-22 8:04 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Heikki Krogerus, Greg Kroah-Hartman, linux-usb,
linux-kernel
No need to check the argument of i2c_unregister_device() because the
function itself does it.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Build tested only. Please apply to your tree.
drivers/usb/typec/anx7411.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/typec/anx7411.c b/drivers/usb/typec/anx7411.c
index 221604f933a4..b12a07edc71b 100644
--- a/drivers/usb/typec/anx7411.c
+++ b/drivers/usb/typec/anx7411.c
@@ -1550,8 +1550,7 @@ static void anx7411_i2c_remove(struct i2c_client *client)
if (plat->workqueue)
destroy_workqueue(plat->workqueue);
- if (plat->spi_client)
- i2c_unregister_device(plat->spi_client);
+ i2c_unregister_device(plat->spi_client);
if (plat->typec.role_sw)
usb_role_switch_put(plat->typec.role_sw);
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] usb: typec: drop check because i2c_unregister_device() is NULL safe
2023-09-22 8:04 ` [PATCH 1/3] usb: typec: " Wolfram Sang
@ 2023-09-22 10:54 ` Heikki Krogerus
2023-09-22 11:50 ` Kieran Bingham
2023-09-25 7:44 ` Geert Uytterhoeven
2 siblings, 0 replies; 5+ messages in thread
From: Heikki Krogerus @ 2023-09-22 10:54 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Greg Kroah-Hartman, linux-usb, linux-kernel
On Fri, Sep 22, 2023 at 10:04:18AM +0200, Wolfram Sang wrote:
> No need to check the argument of i2c_unregister_device() because the
> function itself does it.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> Build tested only. Please apply to your tree.
>
> drivers/usb/typec/anx7411.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/typec/anx7411.c b/drivers/usb/typec/anx7411.c
> index 221604f933a4..b12a07edc71b 100644
> --- a/drivers/usb/typec/anx7411.c
> +++ b/drivers/usb/typec/anx7411.c
> @@ -1550,8 +1550,7 @@ static void anx7411_i2c_remove(struct i2c_client *client)
> if (plat->workqueue)
> destroy_workqueue(plat->workqueue);
>
> - if (plat->spi_client)
> - i2c_unregister_device(plat->spi_client);
> + i2c_unregister_device(plat->spi_client);
>
> if (plat->typec.role_sw)
> usb_role_switch_put(plat->typec.role_sw);
> --
> 2.30.2
--
heikki
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] usb: typec: drop check because i2c_unregister_device() is NULL safe
2023-09-22 8:04 ` [PATCH 1/3] usb: typec: " Wolfram Sang
2023-09-22 10:54 ` Heikki Krogerus
@ 2023-09-22 11:50 ` Kieran Bingham
2023-09-25 7:44 ` Geert Uytterhoeven
2 siblings, 0 replies; 5+ messages in thread
From: Kieran Bingham @ 2023-09-22 11:50 UTC (permalink / raw)
To: Wolfram Sang, linux-renesas-soc
Cc: Wolfram Sang, Heikki Krogerus, Greg Kroah-Hartman, linux-usb,
linux-kernel
Quoting Wolfram Sang (2023-09-22 09:04:18)
> No need to check the argument of i2c_unregister_device() because the
> function itself does it.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
And this is the same pattern here so:
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> ---
> Build tested only. Please apply to your tree.
>
> drivers/usb/typec/anx7411.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/typec/anx7411.c b/drivers/usb/typec/anx7411.c
> index 221604f933a4..b12a07edc71b 100644
> --- a/drivers/usb/typec/anx7411.c
> +++ b/drivers/usb/typec/anx7411.c
> @@ -1550,8 +1550,7 @@ static void anx7411_i2c_remove(struct i2c_client *client)
> if (plat->workqueue)
> destroy_workqueue(plat->workqueue);
>
> - if (plat->spi_client)
> - i2c_unregister_device(plat->spi_client);
> + i2c_unregister_device(plat->spi_client);
>
> if (plat->typec.role_sw)
> usb_role_switch_put(plat->typec.role_sw);
> --
> 2.30.2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] usb: typec: drop check because i2c_unregister_device() is NULL safe
2023-09-22 8:04 ` [PATCH 1/3] usb: typec: " Wolfram Sang
2023-09-22 10:54 ` Heikki Krogerus
2023-09-22 11:50 ` Kieran Bingham
@ 2023-09-25 7:44 ` Geert Uytterhoeven
2 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2023-09-25 7:44 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Heikki Krogerus, Greg Kroah-Hartman, linux-usb,
linux-kernel
On Fri, Sep 22, 2023 at 12:44 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> No need to check the argument of i2c_unregister_device() because the
> function itself does it.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-09-25 7:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-22 8:04 [PATCH 0/3] treewide: drop check because i2c_unregister_device() is NULL safe Wolfram Sang
2023-09-22 8:04 ` [PATCH 1/3] usb: typec: " Wolfram Sang
2023-09-22 10:54 ` Heikki Krogerus
2023-09-22 11:50 ` Kieran Bingham
2023-09-25 7:44 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox