2016-10-24 14:51:53

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH -next] crypto: drop pointless static qualifier in atmel_aes_probe()

From: Wei Yongjun <[email protected]>

There is no need to have the 'struct atmel_aes_dev *aes_dd' variable
static since new value always be assigned before use it.

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/crypto/atmel-aes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
index 6b656f4..0e3d0d6 100644
--- a/drivers/crypto/atmel-aes.c
+++ b/drivers/crypto/atmel-aes.c
@@ -2311,7 +2311,7 @@ static int atmel_aes_probe(struct platform_device *pdev)

static int atmel_aes_remove(struct platform_device *pdev)
{
- static struct atmel_aes_dev *aes_dd;
+ struct atmel_aes_dev *aes_dd;

aes_dd = platform_get_drvdata(pdev);
if (!aes_dd)


2016-11-01 00:43:25

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH -next] crypto: drop pointless static qualifier in atmel_aes_probe()

On Mon, Oct 24, 2016 at 02:51:22PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> There is no need to have the 'struct atmel_aes_dev *aes_dd' variable
> static since new value always be assigned before use it.
>
> Signed-off-by: Wei Yongjun <[email protected]>

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