All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reset: zynq: remove unneeded call to platfrom_set_drvdata()
@ 2023-08-07 11:35 ` Andrei Coardos
  0 siblings, 0 replies; 6+ messages in thread
From: Andrei Coardos @ 2023-08-07 11:35 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: michal.simek, p.zabel, 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/reset/reset-zynq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/reset/reset-zynq.c b/drivers/reset/reset-zynq.c
index 706bbbbb4ec7..688b512882ec 100644
--- a/drivers/reset/reset-zynq.c
+++ b/drivers/reset/reset-zynq.c
@@ -94,7 +94,6 @@ static int zynq_reset_probe(struct platform_device *pdev)
 	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
-	platform_set_drvdata(pdev, priv);
 
 	priv->slcr = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
 						     "syscon");
-- 
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] 6+ messages in thread

* [PATCH] reset: zynq: remove unneeded call to platfrom_set_drvdata()
@ 2023-08-07 11:35 ` Andrei Coardos
  0 siblings, 0 replies; 6+ messages in thread
From: Andrei Coardos @ 2023-08-07 11:35 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: michal.simek, p.zabel, 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/reset/reset-zynq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/reset/reset-zynq.c b/drivers/reset/reset-zynq.c
index 706bbbbb4ec7..688b512882ec 100644
--- a/drivers/reset/reset-zynq.c
+++ b/drivers/reset/reset-zynq.c
@@ -94,7 +94,6 @@ static int zynq_reset_probe(struct platform_device *pdev)
 	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;
-	platform_set_drvdata(pdev, priv);
 
 	priv->slcr = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
 						     "syscon");
-- 
2.34.1


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

* Re: [PATCH] reset: zynq: remove unneeded call to platfrom_set_drvdata()
  2023-08-07 11:35 ` Andrei Coardos
@ 2023-08-07 12:00   ` Alexandru Ardelean
  -1 siblings, 0 replies; 6+ messages in thread
From: Alexandru Ardelean @ 2023-08-07 12:00 UTC (permalink / raw)
  To: Andrei Coardos; +Cc: linux-kernel, linux-arm-kernel, michal.simek, p.zabel

On Mon, Aug 7, 2023 at 2:35 PM Andrei Coardos <aboutphysycs@gmail.com> 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.
>

Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>

> Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
> ---
>  drivers/reset/reset-zynq.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/reset/reset-zynq.c b/drivers/reset/reset-zynq.c
> index 706bbbbb4ec7..688b512882ec 100644
> --- a/drivers/reset/reset-zynq.c
> +++ b/drivers/reset/reset-zynq.c
> @@ -94,7 +94,6 @@ static int zynq_reset_probe(struct platform_device *pdev)
>         priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
>         if (!priv)
>                 return -ENOMEM;
> -       platform_set_drvdata(pdev, priv);
>
>         priv->slcr = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
>                                                      "syscon");
> --
> 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	[flat|nested] 6+ messages in thread

* Re: [PATCH] reset: zynq: remove unneeded call to platfrom_set_drvdata()
@ 2023-08-07 12:00   ` Alexandru Ardelean
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandru Ardelean @ 2023-08-07 12:00 UTC (permalink / raw)
  To: Andrei Coardos; +Cc: linux-kernel, linux-arm-kernel, michal.simek, p.zabel

On Mon, Aug 7, 2023 at 2:35 PM Andrei Coardos <aboutphysycs@gmail.com> 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.
>

Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>

> Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
> ---
>  drivers/reset/reset-zynq.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/reset/reset-zynq.c b/drivers/reset/reset-zynq.c
> index 706bbbbb4ec7..688b512882ec 100644
> --- a/drivers/reset/reset-zynq.c
> +++ b/drivers/reset/reset-zynq.c
> @@ -94,7 +94,6 @@ static int zynq_reset_probe(struct platform_device *pdev)
>         priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
>         if (!priv)
>                 return -ENOMEM;
> -       platform_set_drvdata(pdev, priv);
>
>         priv->slcr = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
>                                                      "syscon");
> --
> 2.34.1
>

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

* Re: [PATCH] reset: zynq: remove unneeded call to platfrom_set_drvdata()
  2023-08-07 11:35 ` Andrei Coardos
@ 2023-08-08 13:47   ` Philipp Zabel
  -1 siblings, 0 replies; 6+ messages in thread
From: Philipp Zabel @ 2023-08-08 13:47 UTC (permalink / raw)
  To: Andrei Coardos, linux-kernel, linux-arm-kernel; +Cc: michal.simek, alex

On Mo, 2023-08-07 at 14:35 +0300, 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>

Thank you, applied to reset/next.

regards
Philipp

_______________________________________________
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] 6+ messages in thread

* Re: [PATCH] reset: zynq: remove unneeded call to platfrom_set_drvdata()
@ 2023-08-08 13:47   ` Philipp Zabel
  0 siblings, 0 replies; 6+ messages in thread
From: Philipp Zabel @ 2023-08-08 13:47 UTC (permalink / raw)
  To: Andrei Coardos, linux-kernel, linux-arm-kernel; +Cc: michal.simek, alex

On Mo, 2023-08-07 at 14:35 +0300, 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>

Thank you, applied to reset/next.

regards
Philipp

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

end of thread, other threads:[~2023-08-08 19:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-07 11:35 [PATCH] reset: zynq: remove unneeded call to platfrom_set_drvdata() Andrei Coardos
2023-08-07 11:35 ` Andrei Coardos
2023-08-07 12:00 ` Alexandru Ardelean
2023-08-07 12:00   ` Alexandru Ardelean
2023-08-08 13:47 ` Philipp Zabel
2023-08-08 13:47   ` Philipp Zabel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.