* [PATCH] thermal: sun8i_thermal: remove unneeded call to platform_set_drvdata()
@ 2023-08-11 19:40 Andrei Coardos
2023-08-13 15:32 ` Jernej Škrabec
2023-08-16 10:32 ` Daniel Lezcano
0 siblings, 2 replies; 4+ messages in thread
From: Andrei Coardos @ 2023-08-11 19:40 UTC (permalink / raw)
To: linux-kernel, linux-sunxi, linux-arm-kernel, linux-pm
Cc: samuel, jernej.skrabec, wens, rui.zhang, amitk, daniel.lezcano,
rafael, tiny.windzz, anarsoul, alex, Andrei Coardos
This function call was found to be unnecessary as there is no equivalent
platform_get_drvdata() call to access the private data of the driver. Also,
the private data is defined in this driver, so there is no risk of it being
accessed outside of this driver file.
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
---
drivers/thermal/sun8i_thermal.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 195f3c5d0b38..61a2f287ac90 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -489,8 +489,6 @@ static int sun8i_ths_probe(struct platform_device *pdev)
if (!tmdev->chip)
return -EINVAL;
- platform_set_drvdata(pdev, tmdev);
-
ret = sun8i_ths_resource_init(tmdev);
if (ret)
return ret;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] thermal: sun8i_thermal: remove unneeded call to platform_set_drvdata()
2023-08-11 19:40 [PATCH] thermal: sun8i_thermal: remove unneeded call to platform_set_drvdata() Andrei Coardos
@ 2023-08-13 15:32 ` Jernej Škrabec
2023-08-13 18:58 ` Alexandru Ardelean
2023-08-16 10:32 ` Daniel Lezcano
1 sibling, 1 reply; 4+ messages in thread
From: Jernej Škrabec @ 2023-08-13 15:32 UTC (permalink / raw)
To: linux-kernel, linux-sunxi, linux-arm-kernel, linux-pm,
Andrei Coardos
Cc: samuel, wens, rui.zhang, amitk, daniel.lezcano, rafael,
tiny.windzz, anarsoul, alex, Andrei Coardos
Dne petek, 11. avgust 2023 ob 21:40:32 CEST je Andrei Coardos napisal(a):
> This function call was found to be unnecessary as there is no equivalent
> platform_get_drvdata() call to access the private data of the driver. Also,
> the private data is defined in this driver, so there is no risk of it being
> accessed outside of this driver file.
>
> Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Best regards,
Jernej
> ---
> drivers/thermal/sun8i_thermal.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/thermal/sun8i_thermal.c
> b/drivers/thermal/sun8i_thermal.c index 195f3c5d0b38..61a2f287ac90 100644
> --- a/drivers/thermal/sun8i_thermal.c
> +++ b/drivers/thermal/sun8i_thermal.c
> @@ -489,8 +489,6 @@ static int sun8i_ths_probe(struct platform_device *pdev)
> if (!tmdev->chip)
> return -EINVAL;
>
> - platform_set_drvdata(pdev, tmdev);
> -
> ret = sun8i_ths_resource_init(tmdev);
> if (ret)
> return ret;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] thermal: sun8i_thermal: remove unneeded call to platform_set_drvdata()
2023-08-13 15:32 ` Jernej Škrabec
@ 2023-08-13 18:58 ` Alexandru Ardelean
0 siblings, 0 replies; 4+ messages in thread
From: Alexandru Ardelean @ 2023-08-13 18:58 UTC (permalink / raw)
To: Jernej Škrabec
Cc: linux-kernel, linux-sunxi, linux-arm-kernel, linux-pm,
Andrei Coardos, samuel, wens, rui.zhang, amitk, daniel.lezcano,
rafael, tiny.windzz, anarsoul
On Sun, Aug 13, 2023 at 6:32 PM Jernej Škrabec <jernej.skrabec@gmail.com> wrote:
>
> Dne petek, 11. avgust 2023 ob 21:40:32 CEST je Andrei Coardos napisal(a):
> > This function call was found to be unnecessary as there is no equivalent
> > platform_get_drvdata() call to access the private data of the driver. Also,
> > the private data is defined in this driver, so there is no risk of it being
> > accessed outside of this driver file.
> >
> > Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
>
Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
>
> Best regards,
> Jernej
>
> > ---
> > drivers/thermal/sun8i_thermal.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/thermal/sun8i_thermal.c
> > b/drivers/thermal/sun8i_thermal.c index 195f3c5d0b38..61a2f287ac90 100644
> > --- a/drivers/thermal/sun8i_thermal.c
> > +++ b/drivers/thermal/sun8i_thermal.c
> > @@ -489,8 +489,6 @@ static int sun8i_ths_probe(struct platform_device *pdev)
> > if (!tmdev->chip)
> > return -EINVAL;
> >
> > - platform_set_drvdata(pdev, tmdev);
> > -
> > ret = sun8i_ths_resource_init(tmdev);
> > if (ret)
> > return ret;
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] thermal: sun8i_thermal: remove unneeded call to platform_set_drvdata()
2023-08-11 19:40 [PATCH] thermal: sun8i_thermal: remove unneeded call to platform_set_drvdata() Andrei Coardos
2023-08-13 15:32 ` Jernej Škrabec
@ 2023-08-16 10:32 ` Daniel Lezcano
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2023-08-16 10:32 UTC (permalink / raw)
To: Andrei Coardos, linux-kernel, linux-sunxi, linux-arm-kernel,
linux-pm
Cc: samuel, jernej.skrabec, wens, rui.zhang, amitk, rafael,
tiny.windzz, anarsoul, alex
On 11/08/2023 21:40, Andrei Coardos wrote:
> This function call was found to be unnecessary as there is no equivalent
> platform_get_drvdata() call to access the private data of the driver. Also,
> the private data is defined in this driver, so there is no risk of it being
> accessed outside of this driver file.
>
> Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
> ---
Applied, thanks
Are you checking neither dev_get_drvdata is used ?
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-16 10:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 19:40 [PATCH] thermal: sun8i_thermal: remove unneeded call to platform_set_drvdata() Andrei Coardos
2023-08-13 15:32 ` Jernej Škrabec
2023-08-13 18:58 ` Alexandru Ardelean
2023-08-16 10:32 ` Daniel Lezcano
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).