* [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
` (6 more replies)
0 siblings, 7 replies; 12+ 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
^ permalink raw reply related [flat|nested] 12+ 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
` (5 subsequent siblings)
6 siblings, 1 reply; 12+ 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
^ permalink raw reply related [flat|nested] 12+ 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-05 20:51 ` [PATCH 4/7] crypto: omap-aes: " Uwe Kleine-König
` (4 subsequent siblings)
6 siblings, 1 reply; 12+ 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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/7] crypto: omap-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-05 20:51 ` Uwe Kleine-König
2022-07-05 20:51 ` [PATCH 5/7] crypto: omap-des: " Uwe Kleine-König
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2022-07-05 20:51 UTC (permalink / raw)
To: Herbert Xu, David S. Miller; +Cc: linux-crypto, 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 dd is never NULL.
This is a preparation for making platform remove callbacks return void.
While touching this driver remove a stray empty line.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/crypto/omap-aes.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index 581211a92628..67a99c760bc4 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -1261,9 +1261,6 @@ static int omap_aes_remove(struct platform_device *pdev)
struct aead_alg *aalg;
int i, j;
- if (!dd)
- return -ENODEV;
-
spin_lock_bh(&list_lock);
list_del(&dd->list);
spin_unlock_bh(&list_lock);
@@ -1279,7 +1276,6 @@ static int omap_aes_remove(struct platform_device *pdev)
aalg = &dd->pdata->aead_algs_info->algs_list[i];
crypto_unregister_aead(aalg);
dd->pdata->aead_algs_info->registered--;
-
}
crypto_engine_exit(dd->engine);
--
2.36.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/7] crypto: omap-des: 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
` (2 preceding siblings ...)
2022-07-05 20:51 ` [PATCH 4/7] crypto: omap-aes: " Uwe Kleine-König
@ 2022-07-05 20:51 ` Uwe Kleine-König
2022-07-05 20:51 ` [PATCH 6/7] crypto: omap-sham: " Uwe Kleine-König
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2022-07-05 20:51 UTC (permalink / raw)
To: Herbert Xu, David S. Miller; +Cc: linux-crypto, 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 dd is never NULL.
This is a preparation for making platform remove callbacks return void.
While touching this driver remove an assignment without effect.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/crypto/omap-des.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c
index 538aff80869f..f783769ea110 100644
--- a/drivers/crypto/omap-des.c
+++ b/drivers/crypto/omap-des.c
@@ -1091,9 +1091,6 @@ static int omap_des_remove(struct platform_device *pdev)
struct omap_des_dev *dd = platform_get_drvdata(pdev);
int i, j;
- if (!dd)
- return -ENODEV;
-
spin_lock_bh(&list_lock);
list_del(&dd->list);
spin_unlock_bh(&list_lock);
@@ -1106,7 +1103,6 @@ static int omap_des_remove(struct platform_device *pdev)
tasklet_kill(&dd->done_task);
omap_des_dma_cleanup(dd);
pm_runtime_disable(dd->dev);
- dd = NULL;
return 0;
}
--
2.36.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/7] crypto: omap-sham: 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
` (3 preceding siblings ...)
2022-07-05 20:51 ` [PATCH 5/7] crypto: omap-des: " Uwe Kleine-König
@ 2022-07-05 20:51 ` Uwe Kleine-König
2022-07-05 20:51 ` [PATCH 7/7] crypto: s5p-sss: " Uwe Kleine-König
2022-07-15 8:47 ` [PATCH 1/7] crypto: atmel-aes: " Herbert Xu
6 siblings, 0 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2022-07-05 20:51 UTC (permalink / raw)
To: Herbert Xu, David S. Miller; +Cc: linux-crypto, 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 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/omap-sham.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 4b37dc69a50c..655a7f5a406a 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -2197,8 +2197,7 @@ static int omap_sham_remove(struct platform_device *pdev)
int i, j;
dd = platform_get_drvdata(pdev);
- if (!dd)
- return -ENODEV;
+
spin_lock_bh(&sham.lock);
list_del(&dd->list);
spin_unlock_bh(&sham.lock);
--
2.36.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 7/7] crypto: s5p-sss: 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
` (4 preceding siblings ...)
2022-07-05 20:51 ` [PATCH 6/7] crypto: omap-sham: " Uwe Kleine-König
@ 2022-07-05 20:51 ` Uwe Kleine-König
2022-07-05 21:47 ` Vladimir Zapolskiy
2022-07-06 6:34 ` Krzysztof Kozlowski
2022-07-15 8:47 ` [PATCH 1/7] crypto: atmel-aes: " Herbert Xu
6 siblings, 2 replies; 12+ messages in thread
From: Uwe Kleine-König @ 2022-07-05 20:51 UTC (permalink / raw)
To: Krzysztof Kozlowski, Vladimir Zapolskiy, Herbert Xu, David S. Miller
Cc: linux-crypto, linux-samsung-soc, 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 pdata 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/s5p-sss.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index 7717e9e5977b..b79e49aa724f 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -2321,9 +2321,6 @@ static int s5p_aes_remove(struct platform_device *pdev)
struct s5p_aes_dev *pdata = platform_get_drvdata(pdev);
int i;
- if (!pdata)
- return -ENODEV;
-
for (i = 0; i < ARRAY_SIZE(algs); i++)
crypto_unregister_skcipher(&algs[i]);
--
2.36.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 7/7] crypto: s5p-sss: Drop if with an always false condition
2022-07-05 20:51 ` [PATCH 7/7] crypto: s5p-sss: " Uwe Kleine-König
@ 2022-07-05 21:47 ` Vladimir Zapolskiy
2022-07-06 6:34 ` Krzysztof Kozlowski
1 sibling, 0 replies; 12+ messages in thread
From: Vladimir Zapolskiy @ 2022-07-05 21:47 UTC (permalink / raw)
To: Uwe Kleine-König, Krzysztof Kozlowski, Herbert Xu, David S. Miller
Cc: linux-crypto, linux-samsung-soc, kernel
On 7/5/22 23:51, 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 pdata 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/s5p-sss.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
> index 7717e9e5977b..b79e49aa724f 100644
> --- a/drivers/crypto/s5p-sss.c
> +++ b/drivers/crypto/s5p-sss.c
> @@ -2321,9 +2321,6 @@ static int s5p_aes_remove(struct platform_device *pdev)
> struct s5p_aes_dev *pdata = platform_get_drvdata(pdev);
> int i;
>
> - if (!pdata)
> - return -ENODEV;
> -
> for (i = 0; i < ARRAY_SIZE(algs); i++)
> crypto_unregister_skcipher(&algs[i]);
>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
--
Best wishes,
Vladimir
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 7/7] crypto: s5p-sss: Drop if with an always false condition
2022-07-05 20:51 ` [PATCH 7/7] crypto: s5p-sss: " Uwe Kleine-König
2022-07-05 21:47 ` Vladimir Zapolskiy
@ 2022-07-06 6:34 ` Krzysztof Kozlowski
1 sibling, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-06 6:34 UTC (permalink / raw)
To: Uwe Kleine-König, Vladimir Zapolskiy, Herbert Xu, David S. Miller
Cc: linux-crypto, linux-samsung-soc, kernel
On 05/07/2022 22:51, 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 pdata 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: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ 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; 12+ 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
>
^ permalink raw reply [flat|nested] 12+ 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; 12+ 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
>
^ permalink raw reply [flat|nested] 12+ 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
` (5 preceding siblings ...)
2022-07-05 20:51 ` [PATCH 7/7] crypto: s5p-sss: " Uwe Kleine-König
@ 2022-07-15 8:47 ` Herbert Xu
6 siblings, 0 replies; 12+ messages in thread
From: Herbert Xu @ 2022-07-15 8:47 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: David S. Miller, Nicolas Ferre, Alexandre Belloni,
Claudiu Beznea, linux-crypto, linux-arm-kernel, 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
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-07-15 8:47 UTC | newest]
Thread overview: 12+ 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-05 20:51 ` [PATCH 4/7] crypto: omap-aes: " Uwe Kleine-König
2022-07-05 20:51 ` [PATCH 5/7] crypto: omap-des: " Uwe Kleine-König
2022-07-05 20:51 ` [PATCH 6/7] crypto: omap-sham: " Uwe Kleine-König
2022-07-05 20:51 ` [PATCH 7/7] crypto: s5p-sss: " Uwe Kleine-König
2022-07-05 21:47 ` Vladimir Zapolskiy
2022-07-06 6:34 ` Krzysztof Kozlowski
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).