linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] char: hw_random: bcm2835-rng: removed call to platform_set_drvdata()
@ 2023-08-23 11:15 Andrei Coardos
  2023-08-23 11:58 ` Martin Kaiser
  2023-09-15 10:37 ` Herbert Xu
  0 siblings, 2 replies; 4+ messages in thread
From: Andrei Coardos @ 2023-08-23 11:15 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, linux-rpi-kernel, linux-crypto
  Cc: alex, Jason, bcm-kernel-feedback-list, sbranden, rjui,
	florian.fainelli, herbert, olivia, 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/char/hw_random/bcm2835-rng.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c
index e98fcac578d6..0238f487f9ab 100644
--- a/drivers/char/hw_random/bcm2835-rng.c
+++ b/drivers/char/hw_random/bcm2835-rng.c
@@ -150,8 +150,6 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
 	if (!priv)
 		return -ENOMEM;
 
-	platform_set_drvdata(pdev, priv);
-
 	/* map peripheral */
 	priv->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->base))
-- 
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] 4+ messages in thread

* Re: [PATCH] char: hw_random: bcm2835-rng: removed call to platform_set_drvdata()
  2023-08-23 11:15 [PATCH] char: hw_random: bcm2835-rng: removed call to platform_set_drvdata() Andrei Coardos
@ 2023-08-23 11:58 ` Martin Kaiser
  2023-08-24  8:25   ` Alexandru Ardelean
  2023-09-15 10:37 ` Herbert Xu
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Kaiser @ 2023-08-23 11:58 UTC (permalink / raw)
  To: Andrei Coardos
  Cc: linux-kernel, linux-arm-kernel, linux-rpi-kernel, linux-crypto,
	alex, Jason, bcm-kernel-feedback-list, sbranden, rjui,
	florian.fainelli, herbert, olivia

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.

You're right. The platform_get_drvdata call was removed in 
4c04b3729 ("hwrng: bcm2835 - Use device managed helpers").

Reviewed-by: Martin Kaiser <martin@kaiser.cx>

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

* Re: [PATCH] char: hw_random: bcm2835-rng: removed call to platform_set_drvdata()
  2023-08-23 11:58 ` Martin Kaiser
@ 2023-08-24  8:25   ` Alexandru Ardelean
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandru Ardelean @ 2023-08-24  8:25 UTC (permalink / raw)
  To: Martin Kaiser
  Cc: Andrei Coardos, linux-kernel, linux-arm-kernel, linux-rpi-kernel,
	linux-crypto, Jason, bcm-kernel-feedback-list, sbranden, rjui,
	florian.fainelli, herbert, olivia

On Wed, Aug 23, 2023 at 2:59 PM Martin Kaiser <lists@kaiser.cx> wrote:
>
> 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.
>
> You're right. The platform_get_drvdata call was removed in
> 4c04b3729 ("hwrng: bcm2835 - Use device managed helpers").
>

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

> Reviewed-by: Martin Kaiser <martin@kaiser.cx>

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

* Re: [PATCH] char: hw_random: bcm2835-rng: removed call to platform_set_drvdata()
  2023-08-23 11:15 [PATCH] char: hw_random: bcm2835-rng: removed call to platform_set_drvdata() Andrei Coardos
  2023-08-23 11:58 ` Martin Kaiser
@ 2023-09-15 10:37 ` Herbert Xu
  1 sibling, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2023-09-15 10:37 UTC (permalink / raw)
  To: Andrei Coardos
  Cc: linux-kernel, linux-arm-kernel, linux-rpi-kernel, linux-crypto,
	alex, Jason, bcm-kernel-feedback-list, sbranden, rjui,
	florian.fainelli, olivia

On Wed, Aug 23, 2023 at 02:15:55PM +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>
> ---
>  drivers/char/hw_random/bcm2835-rng.c | 2 --
>  1 file changed, 2 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

end of thread, other threads:[~2023-09-15 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-23 11:15 [PATCH] char: hw_random: bcm2835-rng: removed call to platform_set_drvdata() Andrei Coardos
2023-08-23 11:58 ` Martin Kaiser
2023-08-24  8:25   ` Alexandru Ardelean
2023-09-15 10:37 ` Herbert Xu

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).