* [PATCH -next] crypto: marvell - remove set but not used variable 'index'
@ 2019-03-30 5:28 Yue Haibing
2019-03-30 10:15 ` Mukesh Ojha
2019-04-08 6:40 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Yue Haibing @ 2019-03-30 5:28 UTC (permalink / raw)
To: bbrezillon, arno, herbert, davem; +Cc: linux-kernel, linux-crypto, YueHaibing
From: YueHaibing <yuehaibing@huawei.com>
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/crypto/marvell/hash.c: In function 'mv_cesa_ahash_pad_req':
drivers/crypto/marvell/hash.c:138:15: warning: variable 'index' set but not used [-Wunused-but-set-variable]
It's never used and can be removed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/crypto/marvell/hash.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c
index 99ff54c..fd456dd 100644
--- a/drivers/crypto/marvell/hash.c
+++ b/drivers/crypto/marvell/hash.c
@@ -135,11 +135,10 @@ static int mv_cesa_ahash_pad_len(struct mv_cesa_ahash_req *creq)
static int mv_cesa_ahash_pad_req(struct mv_cesa_ahash_req *creq, u8 *buf)
{
- unsigned int index, padlen;
+ unsigned int padlen;
buf[0] = 0x80;
/* Pad out to 56 mod 64 */
- index = creq->len & CESA_HASH_BLOCK_SIZE_MSK;
padlen = mv_cesa_ahash_pad_len(creq);
memset(buf + 1, 0, padlen - 1);
--
2.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] crypto: marvell - remove set but not used variable 'index'
2019-03-30 5:28 [PATCH -next] crypto: marvell - remove set but not used variable 'index' Yue Haibing
@ 2019-03-30 10:15 ` Mukesh Ojha
2019-04-08 6:40 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Mukesh Ojha @ 2019-03-30 10:15 UTC (permalink / raw)
To: Yue Haibing, bbrezillon, arno, herbert, davem; +Cc: linux-kernel, linux-crypto
On 3/30/2019 10:58 AM, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/crypto/marvell/hash.c: In function 'mv_cesa_ahash_pad_req':
> drivers/crypto/marvell/hash.c:138:15: warning: variable 'index' set but not used [-Wunused-but-set-variable]
>
> It's never used and can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Cheers,
-Mukesh
> ---
> drivers/crypto/marvell/hash.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c
> index 99ff54c..fd456dd 100644
> --- a/drivers/crypto/marvell/hash.c
> +++ b/drivers/crypto/marvell/hash.c
> @@ -135,11 +135,10 @@ static int mv_cesa_ahash_pad_len(struct mv_cesa_ahash_req *creq)
>
> static int mv_cesa_ahash_pad_req(struct mv_cesa_ahash_req *creq, u8 *buf)
> {
> - unsigned int index, padlen;
> + unsigned int padlen;
>
> buf[0] = 0x80;
> /* Pad out to 56 mod 64 */
> - index = creq->len & CESA_HASH_BLOCK_SIZE_MSK;
> padlen = mv_cesa_ahash_pad_len(creq);
> memset(buf + 1, 0, padlen - 1);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] crypto: marvell - remove set but not used variable 'index'
2019-03-30 5:28 [PATCH -next] crypto: marvell - remove set but not used variable 'index' Yue Haibing
2019-03-30 10:15 ` Mukesh Ojha
@ 2019-04-08 6:40 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2019-04-08 6:40 UTC (permalink / raw)
To: Yue Haibing; +Cc: bbrezillon, arno, davem, linux-kernel, linux-crypto
On Sat, Mar 30, 2019 at 01:28:58PM +0800, Yue Haibing wrote:
> From: YueHaibing <yuehaibing@huawei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/crypto/marvell/hash.c: In function 'mv_cesa_ahash_pad_req':
> drivers/crypto/marvell/hash.c:138:15: warning: variable 'index' set but not used [-Wunused-but-set-variable]
>
> It's never used and can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/crypto/marvell/hash.c | 3 +--
> 1 file changed, 1 insertion(+), 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-08 6:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-30 5:28 [PATCH -next] crypto: marvell - remove set but not used variable 'index' Yue Haibing
2019-03-30 10:15 ` Mukesh Ojha
2019-04-08 6:40 ` 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).