Linux cryptographic layer development
 help / color / mirror / Atom feed
* [PATCH] crypto: s5p-sss: pass s5p_aes_dev to irq handler
@ 2026-08-11  4:33 Rosen Penev
  2026-08-11  5:43 ` Thomas Huth
  2026-08-11  5:50 ` Vladimir Zapolskiy
  0 siblings, 2 replies; 3+ messages in thread
From: Rosen Penev @ 2026-08-11  4:33 UTC (permalink / raw)
  To: linux-crypto
  Cc: Krzysztof Kozlowski, Vladimir Zapolskiy, Herbert Xu,
	David S. Miller,
	open list:SAMSUNG S5P Security SubSystem (SSS) DRIVER, open list

The threaded irq handler takes the platform device and calls
platform_get_drvdata() to recover the driver data.  Pass the driver
data directly as the devm_request_threaded_irq() argument instead,
dropping the platform_get_drvdata() call.

Assisted-by: opencode:deepseek-v4-flash-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/crypto/s5p-sss.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index bdda7b39af85..f20c02e9d646 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -638,8 +638,7 @@ static int s5p_hash_rx(struct s5p_aes_dev *dev)
 
 static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id)
 {
-	struct platform_device *pdev = dev_id;
-	struct s5p_aes_dev *dev = platform_get_drvdata(pdev);
+	struct s5p_aes_dev *dev = dev_id;
 	struct skcipher_request *req;
 	int err_dma_tx = 0;
 	int err_dma_rx = 0;
@@ -2221,7 +2220,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
 	}
 	err = devm_request_threaded_irq(dev, pdata->irq_fc, NULL,
 					s5p_aes_interrupt, IRQF_ONESHOT,
-					pdev->name, pdev);
+					pdev->name, pdata);
 	if (err < 0) {
 		dev_warn(dev, "feed control interrupt is not available.\n");
 		goto err_irq;
-- 
2.55.0


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

* Re: [PATCH] crypto: s5p-sss: pass s5p_aes_dev to irq handler
  2026-08-11  4:33 [PATCH] crypto: s5p-sss: pass s5p_aes_dev to irq handler Rosen Penev
@ 2026-08-11  5:43 ` Thomas Huth
  2026-08-11  5:50 ` Vladimir Zapolskiy
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2026-08-11  5:43 UTC (permalink / raw)
  To: Rosen Penev, linux-crypto, Herbert Xu
  Cc: Krzysztof Kozlowski, Vladimir Zapolskiy, David S. Miller,
	open list:SAMSUNG S5P Security SubSystem (SSS) DRIVER, open list

On 11/08/2026 06.33, Rosen Penev wrote:
> The threaded irq handler takes the platform device and calls
> platform_get_drvdata() to recover the driver data.  Pass the driver
> data directly as the devm_request_threaded_irq() argument instead,
> dropping the platform_get_drvdata() call.
> 
> Assisted-by: opencode:deepseek-v4-flash-free
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>   drivers/crypto/s5p-sss.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
> index bdda7b39af85..f20c02e9d646 100644
> --- a/drivers/crypto/s5p-sss.c
> +++ b/drivers/crypto/s5p-sss.c
> @@ -638,8 +638,7 @@ static int s5p_hash_rx(struct s5p_aes_dev *dev)
>   
>   static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id)
>   {
> -	struct platform_device *pdev = dev_id;
> -	struct s5p_aes_dev *dev = platform_get_drvdata(pdev);
> +	struct s5p_aes_dev *dev = dev_id;
>   	struct skcipher_request *req;
>   	int err_dma_tx = 0;
>   	int err_dma_rx = 0;
> @@ -2221,7 +2220,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
>   	}
>   	err = devm_request_threaded_irq(dev, pdata->irq_fc, NULL,
>   					s5p_aes_interrupt, IRQF_ONESHOT,
> -					pdev->name, pdev);
> +					pdev->name, pdata);
>   	if (err < 0) {
>   		dev_warn(dev, "feed control interrupt is not available.\n");
>   		goto err_irq;

Reviewed-by: Thomas Huth <thuth@redhat.com>


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

* Re: [PATCH] crypto: s5p-sss: pass s5p_aes_dev to irq handler
  2026-08-11  4:33 [PATCH] crypto: s5p-sss: pass s5p_aes_dev to irq handler Rosen Penev
  2026-08-11  5:43 ` Thomas Huth
@ 2026-08-11  5:50 ` Vladimir Zapolskiy
  1 sibling, 0 replies; 3+ messages in thread
From: Vladimir Zapolskiy @ 2026-08-11  5:50 UTC (permalink / raw)
  To: Rosen Penev, linux-crypto
  Cc: Krzysztof Kozlowski, Herbert Xu, David S. Miller,
	open list:SAMSUNG S5P Security SubSystem (SSS) DRIVER, open list

On 8/11/26 07:33, Rosen Penev wrote:
> The threaded irq handler takes the platform device and calls
> platform_get_drvdata() to recover the driver data.  Pass the driver
> data directly as the devm_request_threaded_irq() argument instead,
> dropping the platform_get_drvdata() call.
> 
> Assisted-by: opencode:deepseek-v4-flash-free
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>   drivers/crypto/s5p-sss.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
> index bdda7b39af85..f20c02e9d646 100644
> --- a/drivers/crypto/s5p-sss.c
> +++ b/drivers/crypto/s5p-sss.c
> @@ -638,8 +638,7 @@ static int s5p_hash_rx(struct s5p_aes_dev *dev)
>   
>   static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id)
>   {
> -	struct platform_device *pdev = dev_id;
> -	struct s5p_aes_dev *dev = platform_get_drvdata(pdev);
> +	struct s5p_aes_dev *dev = dev_id;
>   	struct skcipher_request *req;
>   	int err_dma_tx = 0;
>   	int err_dma_rx = 0;
> @@ -2221,7 +2220,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
>   	}
>   	err = devm_request_threaded_irq(dev, pdata->irq_fc, NULL,
>   					s5p_aes_interrupt, IRQF_ONESHOT,
> -					pdev->name, pdev);
> +					pdev->name, pdata);
>   	if (err < 0) {
>   		dev_warn(dev, "feed control interrupt is not available.\n");
>   		goto err_irq;

Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>

-- 
Best wishes,
Vladimir

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

end of thread, other threads:[~2026-08-11  5:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11  4:33 [PATCH] crypto: s5p-sss: pass s5p_aes_dev to irq handler Rosen Penev
2026-08-11  5:43 ` Thomas Huth
2026-08-11  5:50 ` Vladimir Zapolskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox