linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] crypto: atmel-aes: Drop if with an always false condition
@ 2022-07-05 20:51 Uwe Kleine-König
  2022-07-05 20:51 ` [PATCH 2/7] crypto: atmel-sha: " Uwe Kleine-König
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2022-07-05 20:51 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea
  Cc: linux-crypto, linux-arm-kernel, kernel

The remove callback is only called after probe completed successfully.
In this case platform_set_drvdata() was called with a non-NULL argument
and so aes_dd is never NULL.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/crypto/atmel-aes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
index f72c6b3e4ad8..886bf258544c 100644
--- a/drivers/crypto/atmel-aes.c
+++ b/drivers/crypto/atmel-aes.c
@@ -2669,8 +2669,7 @@ static int atmel_aes_remove(struct platform_device *pdev)
 	struct atmel_aes_dev *aes_dd;
 
 	aes_dd = platform_get_drvdata(pdev);
-	if (!aes_dd)
-		return -ENODEV;
+
 	spin_lock(&atmel_aes.lock);
 	list_del(&aes_dd->list);
 	spin_unlock(&atmel_aes.lock);

base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56
-- 
2.36.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 2/7] crypto: atmel-sha: Drop if with an always false condition
  2022-07-05 20:51 [PATCH 1/7] crypto: atmel-aes: Drop if with an always false condition Uwe Kleine-König
@ 2022-07-05 20:51 ` Uwe Kleine-König
  2022-07-06  8:47   ` Claudiu.Beznea
  2022-07-05 20:51 ` [PATCH 3/7] crypto: atmel-tdes: " Uwe Kleine-König
  2022-07-15  8:47 ` [PATCH 1/7] crypto: atmel-aes: " Herbert Xu
  2 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2022-07-05 20:51 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea
  Cc: linux-crypto, linux-arm-kernel, kernel

The remove callback is only called after probe completed successfully.
In this case platform_set_drvdata() was called with a non-NULL argument
and so sha_dd is never NULL.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/crypto/atmel-sha.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c
index d1628112dacc..e054e0ac6fc2 100644
--- a/drivers/crypto/atmel-sha.c
+++ b/drivers/crypto/atmel-sha.c
@@ -2669,8 +2669,7 @@ static int atmel_sha_remove(struct platform_device *pdev)
 	struct atmel_sha_dev *sha_dd;
 
 	sha_dd = platform_get_drvdata(pdev);
-	if (!sha_dd)
-		return -ENODEV;
+
 	spin_lock(&atmel_sha.lock);
 	list_del(&sha_dd->list);
 	spin_unlock(&atmel_sha.lock);
-- 
2.36.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 3/7] crypto: atmel-tdes: Drop if with an always false condition
  2022-07-05 20:51 [PATCH 1/7] crypto: atmel-aes: Drop if with an always false condition Uwe Kleine-König
  2022-07-05 20:51 ` [PATCH 2/7] crypto: atmel-sha: " Uwe Kleine-König
@ 2022-07-05 20:51 ` Uwe Kleine-König
  2022-07-06  8:58   ` Claudiu.Beznea
  2022-07-15  8:47 ` [PATCH 1/7] crypto: atmel-aes: " Herbert Xu
  2 siblings, 1 reply; 6+ messages in thread
From: Uwe Kleine-König @ 2022-07-05 20:51 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Nicolas Ferre, Alexandre Belloni,
	Claudiu Beznea
  Cc: linux-crypto, linux-arm-kernel, kernel

The remove callback is only called after probe completed successfully.
In this case platform_set_drvdata() was called with a non-NULL argument
and so tdes_dd is never NULL.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/crypto/atmel-tdes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c
index 9fd7b8e439d2..a5e78aa08bf0 100644
--- a/drivers/crypto/atmel-tdes.c
+++ b/drivers/crypto/atmel-tdes.c
@@ -1266,8 +1266,7 @@ static int atmel_tdes_remove(struct platform_device *pdev)
 	struct atmel_tdes_dev *tdes_dd;
 
 	tdes_dd = platform_get_drvdata(pdev);
-	if (!tdes_dd)
-		return -ENODEV;
+
 	spin_lock(&atmel_tdes.lock);
 	list_del(&tdes_dd->list);
 	spin_unlock(&atmel_tdes.lock);
-- 
2.36.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

* Re: [PATCH 2/7] crypto: atmel-sha: Drop if with an always false condition
  2022-07-05 20:51 ` [PATCH 2/7] crypto: atmel-sha: " Uwe Kleine-König
@ 2022-07-06  8:47   ` Claudiu.Beznea
  0 siblings, 0 replies; 6+ messages in thread
From: Claudiu.Beznea @ 2022-07-06  8:47 UTC (permalink / raw)
  To: u.kleine-koenig, herbert, davem, Nicolas.Ferre, alexandre.belloni
  Cc: linux-crypto, linux-arm-kernel, kernel

On 05.07.2022 23:51, Uwe Kleine-König wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The remove callback is only called after probe completed successfully.
> In this case platform_set_drvdata() was called with a non-NULL argument
> and so sha_dd is never NULL.
> 
> This is a preparation for making platform remove callbacks return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>


> ---
>  drivers/crypto/atmel-sha.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c
> index d1628112dacc..e054e0ac6fc2 100644
> --- a/drivers/crypto/atmel-sha.c
> +++ b/drivers/crypto/atmel-sha.c
> @@ -2669,8 +2669,7 @@ static int atmel_sha_remove(struct platform_device *pdev)
>         struct atmel_sha_dev *sha_dd;
> 
>         sha_dd = platform_get_drvdata(pdev);
> -       if (!sha_dd)
> -               return -ENODEV;
> +
>         spin_lock(&atmel_sha.lock);
>         list_del(&sha_dd->list);
>         spin_unlock(&atmel_sha.lock);
> --
> 2.36.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 3/7] crypto: atmel-tdes: Drop if with an always false condition
  2022-07-05 20:51 ` [PATCH 3/7] crypto: atmel-tdes: " Uwe Kleine-König
@ 2022-07-06  8:58   ` Claudiu.Beznea
  0 siblings, 0 replies; 6+ messages in thread
From: Claudiu.Beznea @ 2022-07-06  8:58 UTC (permalink / raw)
  To: u.kleine-koenig, herbert, davem, Nicolas.Ferre, alexandre.belloni
  Cc: linux-crypto, linux-arm-kernel, kernel

On 05.07.2022 23:51, Uwe Kleine-König wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> The remove callback is only called after probe completed successfully.
> In this case platform_set_drvdata() was called with a non-NULL argument
> and so tdes_dd is never NULL.
> 
> This is a preparation for making platform remove callbacks return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>


> ---
>  drivers/crypto/atmel-tdes.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c
> index 9fd7b8e439d2..a5e78aa08bf0 100644
> --- a/drivers/crypto/atmel-tdes.c
> +++ b/drivers/crypto/atmel-tdes.c
> @@ -1266,8 +1266,7 @@ static int atmel_tdes_remove(struct platform_device *pdev)
>         struct atmel_tdes_dev *tdes_dd;
> 
>         tdes_dd = platform_get_drvdata(pdev);
> -       if (!tdes_dd)
> -               return -ENODEV;
> +
>         spin_lock(&atmel_tdes.lock);
>         list_del(&tdes_dd->list);
>         spin_unlock(&atmel_tdes.lock);
> --
> 2.36.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 1/7] crypto: atmel-aes: Drop if with an always false condition
  2022-07-05 20:51 [PATCH 1/7] crypto: atmel-aes: Drop if with an always false condition Uwe Kleine-König
  2022-07-05 20:51 ` [PATCH 2/7] crypto: atmel-sha: " Uwe Kleine-König
  2022-07-05 20:51 ` [PATCH 3/7] crypto: atmel-tdes: " Uwe Kleine-König
@ 2022-07-15  8:47 ` Herbert Xu
  2 siblings, 0 replies; 6+ messages in thread
From: Herbert Xu @ 2022-07-15  8:47 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Alexandre Belloni, David S. Miller, linux-crypto, kernel,
	Claudiu Beznea, linux-arm-kernel

On Tue, Jul 05, 2022 at 10:51:38PM +0200, Uwe Kleine-König wrote:
> The remove callback is only called after probe completed successfully.
> In this case platform_set_drvdata() was called with a non-NULL argument
> and so aes_dd is never NULL.
> 
> This is a preparation for making platform remove callbacks return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/crypto/atmel-aes.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

All applid.  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] 6+ messages in thread

end of thread, other threads:[~2022-07-15  8:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-05 20:51 [PATCH 1/7] crypto: atmel-aes: Drop if with an always false condition Uwe Kleine-König
2022-07-05 20:51 ` [PATCH 2/7] crypto: atmel-sha: " Uwe Kleine-König
2022-07-06  8:47   ` Claudiu.Beznea
2022-07-05 20:51 ` [PATCH 3/7] crypto: atmel-tdes: " Uwe Kleine-König
2022-07-06  8:58   ` Claudiu.Beznea
2022-07-15  8:47 ` [PATCH 1/7] crypto: atmel-aes: " 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).