* [PATCH linux-next] crypto: nx: remove redundant variable rc
@ 2022-08-31 14:02 ` cgel.zte
0 siblings, 0 replies; 4+ messages in thread
From: cgel.zte @ 2022-08-31 14:02 UTC (permalink / raw)
To: leitao, nayna, pfsmorigo
Cc: mpe, npiggin, christophe.leroy, herbert, davem, linux-crypto,
linuxppc-dev, linux-kernel, Jinpeng Cui, Zeal Robot
From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Return value directly from set_msg_len() instead of
getting value from redundant variable rc.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH linux-next] crypto: nx: remove redundant variable rc
@ 2022-08-31 14:02 ` cgel.zte
0 siblings, 0 replies; 4+ messages in thread
From: cgel.zte @ 2022-08-31 14:02 UTC (permalink / raw)
To: leitao, nayna, pfsmorigo
Cc: herbert, Zeal Robot, npiggin, linux-kernel, linux-crypto,
Jinpeng Cui, linuxppc-dev, davem
From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Return value directly from set_msg_len() instead of
getting value from redundant variable rc.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH linux-next] crypto: nx: remove redundant variable rc
2022-08-31 14:02 ` cgel.zte
@ 2022-08-31 16:18 ` Breno Leitao
-1 siblings, 0 replies; 4+ messages in thread
From: Breno Leitao @ 2022-08-31 16:18 UTC (permalink / raw)
To: cgel.zte
Cc: nayna, pfsmorigo, mpe, npiggin, christophe.leroy, herbert, davem,
linux-crypto, linuxppc-dev, linux-kernel, Jinpeng Cui,
Zeal Robot
On Wed, Aug 31, 2022 at 02:02:48PM +0000, cgel.zte@gmail.com wrote:
> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
>
> Return value directly from set_msg_len() instead of
> getting value from redundant variable rc.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Reviewed-by: Breno Leitao <leitao@debian.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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH linux-next] crypto: nx: remove redundant variable rc
@ 2022-08-31 16:18 ` Breno Leitao
0 siblings, 0 replies; 4+ messages in thread
From: Breno Leitao @ 2022-08-31 16:18 UTC (permalink / raw)
To: cgel.zte
Cc: herbert, Zeal Robot, nayna, linux-kernel, pfsmorigo, npiggin,
Jinpeng Cui, linuxppc-dev, davem, linux-crypto
On Wed, Aug 31, 2022 at 02:02:48PM +0000, cgel.zte@gmail.com wrote:
> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
>
> Return value directly from set_msg_len() instead of
> getting value from redundant variable rc.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Reviewed-by: Breno Leitao <leitao@debian.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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-01 1:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31 14:02 [PATCH linux-next] crypto: nx: remove redundant variable rc cgel.zte
2022-08-31 14:02 ` cgel.zte
2022-08-31 16:18 ` Breno Leitao
2022-08-31 16:18 ` Breno Leitao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.