* [PATCH -next 1/3] net: dsa: microchip: remove unnecessary spi_set_drvdata()
@ 2022-09-13 14:44 Yang Yingliang
2022-09-13 14:44 ` [PATCH -next 2/3] net: dsa: sja1105: " Yang Yingliang
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Yang Yingliang @ 2022-09-13 14:44 UTC (permalink / raw)
To: netdev; +Cc: olteanv, davem
Remove unnecessary spi_set_drvdata() in ksz_spi_remove(), the
driver_data will be set to NULL in device_unbind_cleanup() after
calling ->remove().
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/net/dsa/microchip/ksz_spi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz_spi.c b/drivers/net/dsa/microchip/ksz_spi.c
index 82e2352f55fa..1b6ab891b986 100644
--- a/drivers/net/dsa/microchip/ksz_spi.c
+++ b/drivers/net/dsa/microchip/ksz_spi.c
@@ -107,8 +107,6 @@ static void ksz_spi_remove(struct spi_device *spi)
if (dev)
ksz_switch_remove(dev);
-
- spi_set_drvdata(spi, NULL);
}
static void ksz_spi_shutdown(struct spi_device *spi)
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH -next 2/3] net: dsa: sja1105: remove unnecessary spi_set_drvdata()
2022-09-13 14:44 [PATCH -next 1/3] net: dsa: microchip: remove unnecessary spi_set_drvdata() Yang Yingliang
@ 2022-09-13 14:44 ` Yang Yingliang
2022-09-13 14:44 ` [PATCH -next 3/3] net: dsa: vitesse-vsc73xx: " Yang Yingliang
2022-09-20 23:45 ` [PATCH -next 1/3] net: dsa: microchip: " Vladimir Oltean
2 siblings, 0 replies; 5+ messages in thread
From: Yang Yingliang @ 2022-09-13 14:44 UTC (permalink / raw)
To: netdev; +Cc: olteanv, davem
Remove unnecessary spi_set_drvdata() in sja1105_remove(), the
driver_data will be set to NULL in device_unbind_cleanup() after
calling ->remove().
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/net/dsa/sja1105/sja1105_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index b03d0d0c3dbf..412666111b0c 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -3351,8 +3351,6 @@ static void sja1105_remove(struct spi_device *spi)
return;
dsa_unregister_switch(priv->ds);
-
- spi_set_drvdata(spi, NULL);
}
static void sja1105_shutdown(struct spi_device *spi)
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH -next 3/3] net: dsa: vitesse-vsc73xx: remove unnecessary spi_set_drvdata()
2022-09-13 14:44 [PATCH -next 1/3] net: dsa: microchip: remove unnecessary spi_set_drvdata() Yang Yingliang
2022-09-13 14:44 ` [PATCH -next 2/3] net: dsa: sja1105: " Yang Yingliang
@ 2022-09-13 14:44 ` Yang Yingliang
2022-09-20 23:45 ` [PATCH -next 1/3] net: dsa: microchip: " Vladimir Oltean
2 siblings, 0 replies; 5+ messages in thread
From: Yang Yingliang @ 2022-09-13 14:44 UTC (permalink / raw)
To: netdev; +Cc: olteanv, davem
Remove unnecessary spi_set_drvdata() in vsc73xx_spi_remove(), the
driver_data will be set to NULL in device_unbind_cleanup() after
calling ->remove().
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/net/dsa/vitesse-vsc73xx-spi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/dsa/vitesse-vsc73xx-spi.c b/drivers/net/dsa/vitesse-vsc73xx-spi.c
index 97a92e6da60d..85b9a0f51dd8 100644
--- a/drivers/net/dsa/vitesse-vsc73xx-spi.c
+++ b/drivers/net/dsa/vitesse-vsc73xx-spi.c
@@ -167,8 +167,6 @@ static void vsc73xx_spi_remove(struct spi_device *spi)
return;
vsc73xx_remove(&vsc_spi->vsc);
-
- spi_set_drvdata(spi, NULL);
}
static void vsc73xx_spi_shutdown(struct spi_device *spi)
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH -next 1/3] net: dsa: microchip: remove unnecessary spi_set_drvdata()
2022-09-13 14:44 [PATCH -next 1/3] net: dsa: microchip: remove unnecessary spi_set_drvdata() Yang Yingliang
2022-09-13 14:44 ` [PATCH -next 2/3] net: dsa: sja1105: " Yang Yingliang
2022-09-13 14:44 ` [PATCH -next 3/3] net: dsa: vitesse-vsc73xx: " Yang Yingliang
@ 2022-09-20 23:45 ` Vladimir Oltean
2022-09-21 1:32 ` Yang Yingliang
2 siblings, 1 reply; 5+ messages in thread
From: Vladimir Oltean @ 2022-09-20 23:45 UTC (permalink / raw)
To: Yang Yingliang; +Cc: netdev, davem
On Tue, Sep 13, 2022 at 10:44:04PM +0800, Yang Yingliang wrote:
> Remove unnecessary spi_set_drvdata() in ksz_spi_remove(), the
> driver_data will be set to NULL in device_unbind_cleanup() after
> calling ->remove().
>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
I would like all drivers in drivers/net/dsa/ to follow the same
convention, which they currently do. They all call .*_set_drvdata.*NULL
from ->remove(), why just patch the spi_set_drvdata() calls?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next 1/3] net: dsa: microchip: remove unnecessary spi_set_drvdata()
2022-09-20 23:45 ` [PATCH -next 1/3] net: dsa: microchip: " Vladimir Oltean
@ 2022-09-21 1:32 ` Yang Yingliang
0 siblings, 0 replies; 5+ messages in thread
From: Yang Yingliang @ 2022-09-21 1:32 UTC (permalink / raw)
To: Vladimir Oltean; +Cc: netdev, davem
Hi Vladimir,
On 2022/9/21 7:45, Vladimir Oltean wrote:
> On Tue, Sep 13, 2022 at 10:44:04PM +0800, Yang Yingliang wrote:
>> Remove unnecessary spi_set_drvdata() in ksz_spi_remove(), the
>> driver_data will be set to NULL in device_unbind_cleanup() after
>> calling ->remove().
>>
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>> ---
> I would like all drivers in drivers/net/dsa/ to follow the same
> convention, which they currently do. They all call .*_set_drvdata.*NULL
> from ->remove(), why just patch the spi_set_drvdata() calls?
Yes, it's right, all the set_drvdata functions in ->remove() can be
removed. I will
send a v2 to remove all this calling.
Thanks,
Yang
> .
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-21 1:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-13 14:44 [PATCH -next 1/3] net: dsa: microchip: remove unnecessary spi_set_drvdata() Yang Yingliang
2022-09-13 14:44 ` [PATCH -next 2/3] net: dsa: sja1105: " Yang Yingliang
2022-09-13 14:44 ` [PATCH -next 3/3] net: dsa: vitesse-vsc73xx: " Yang Yingliang
2022-09-20 23:45 ` [PATCH -next 1/3] net: dsa: microchip: " Vladimir Oltean
2022-09-21 1:32 ` Yang Yingliang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox