public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: ccp -A value assigned to a variable is never used.
@ 2021-03-30 10:10 Jiapeng Chong
  2021-03-31 20:00 ` John Allen
  2021-04-09  7:52 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Jiapeng Chong @ 2021-03-30 10:10 UTC (permalink / raw)
  To: thomas.lendacky
  Cc: john.allen, herbert, davem, linux-crypto, linux-kernel,
	Jiapeng Chong

Fix the following whitescan warning:

Assigning value "64" to "dst.address" here, but that stored value is
overwritten before it can be used.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/crypto/ccp/ccp-ops.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
index d6a8f4e..bb88198 100644
--- a/drivers/crypto/ccp/ccp-ops.c
+++ b/drivers/crypto/ccp/ccp-ops.c
@@ -2418,7 +2418,6 @@ static int ccp_run_ecc_pm_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
 	dst.address += CCP_ECC_OUTPUT_SIZE;
 	ccp_reverse_get_dm_area(&dst, 0, ecc->u.pm.result.y, 0,
 				CCP_ECC_MODULUS_BYTES);
-	dst.address += CCP_ECC_OUTPUT_SIZE;
 
 	/* Restore the workarea address */
 	dst.address = save;
-- 
1.8.3.1


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

* Re: [PATCH] crypto: ccp -A value assigned to a variable is never used.
  2021-03-30 10:10 [PATCH] crypto: ccp -A value assigned to a variable is never used Jiapeng Chong
@ 2021-03-31 20:00 ` John Allen
  2021-04-09  7:52 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: John Allen @ 2021-03-31 20:00 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: thomas.lendacky, herbert, davem, linux-crypto, linux-kernel

On Tue, Mar 30, 2021 at 06:10:29PM +0800, Jiapeng Chong wrote:
> Fix the following whitescan warning:
> 
> Assigning value "64" to "dst.address" here, but that stored value is
> overwritten before it can be used.
> 

Thanks for reporting.

Acked-by: John Allen <john.allen@amd.com>

> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/crypto/ccp/ccp-ops.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c
> index d6a8f4e..bb88198 100644
> --- a/drivers/crypto/ccp/ccp-ops.c
> +++ b/drivers/crypto/ccp/ccp-ops.c
> @@ -2418,7 +2418,6 @@ static int ccp_run_ecc_pm_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd)
>  	dst.address += CCP_ECC_OUTPUT_SIZE;
>  	ccp_reverse_get_dm_area(&dst, 0, ecc->u.pm.result.y, 0,
>  				CCP_ECC_MODULUS_BYTES);
> -	dst.address += CCP_ECC_OUTPUT_SIZE;
>  
>  	/* Restore the workarea address */
>  	dst.address = save;
> -- 
> 1.8.3.1
> 

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

* Re: [PATCH] crypto: ccp -A value assigned to a variable is never used.
  2021-03-30 10:10 [PATCH] crypto: ccp -A value assigned to a variable is never used Jiapeng Chong
  2021-03-31 20:00 ` John Allen
@ 2021-04-09  7:52 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2021-04-09  7:52 UTC (permalink / raw)
  To: Jiapeng Chong
  Cc: thomas.lendacky, john.allen, davem, linux-crypto, linux-kernel

On Tue, Mar 30, 2021 at 06:10:29PM +0800, Jiapeng Chong wrote:
> Fix the following whitescan warning:
> 
> Assigning value "64" to "dst.address" here, but that stored value is
> overwritten before it can be used.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/crypto/ccp/ccp-ops.c | 1 -
>  1 file changed, 1 deletion(-)

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:[~2021-04-09  7:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-30 10:10 [PATCH] crypto: ccp -A value assigned to a variable is never used Jiapeng Chong
2021-03-31 20:00 ` John Allen
2021-04-09  7:52 ` Herbert Xu

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