[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yw+JysFvbmW0yJL8@gmail.com>
Date: Wed, 31 Aug 2022 09:18:18 -0700
From: Breno Leitao <leitao@...ian.org>
To: cgel.zte@...il.com
Cc: nayna@...ux.ibm.com, pfsmorigo@...il.com, mpe@...erman.id.au,
npiggin@...il.com, christophe.leroy@...roup.eu,
herbert@...dor.apana.org.au, davem@...emloft.net,
linux-crypto@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org,
Jinpeng Cui <cui.jinpeng2@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] crypto: nx: remove redundant variable rc
On Wed, Aug 31, 2022 at 02:02:48PM +0000, cgel.zte@...il.com wrote:
> From: Jinpeng Cui <cui.jinpeng2@....com.cn>
>
> Return value directly from set_msg_len() instead of
> getting value from redundant variable rc.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Jinpeng Cui <cui.jinpeng2@....com.cn>
Reviewed-by: Breno Leitao <leitao@...ian.org>
> ---
> drivers/crypto/nx/nx-aes-ccm.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/crypto/nx/nx-aes-ccm.c b/drivers/crypto/nx/nx-aes-ccm.c
> index 3793885f928d..c843f4c6f684 100644
> --- a/drivers/crypto/nx/nx-aes-ccm.c
> +++ b/drivers/crypto/nx/nx-aes-ccm.c
> @@ -134,7 +134,6 @@ static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize,
> unsigned int cryptlen, u8 *b0)
> {
> unsigned int l, lp, m = authsize;
> - int rc;
>
> memcpy(b0, iv, 16);
>
> @@ -148,9 +147,7 @@ static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize,
> if (assoclen)
> *b0 |= 64;
>
> - rc = set_msg_len(b0 + 16 - l, cryptlen, l);
> -
> - return rc;
> + return set_msg_len(b0 + 16 - l, cryptlen, l);
> }
>
> static int generate_pat(u8 *iv,
> --
> 2.25.1
>
Powered by blists - more mailing lists