The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH][next] tls: remove redundant assignment to variable decrypted
@ 2024-04-10 14:41 Colin Ian King
  2024-04-12  3:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2024-04-10 14:41 UTC (permalink / raw)
  To: Boris Pismenny, John Fastabend, Jakub Kicinski, David S . Miller,
	Eric Dumazet, Paolo Abeni, netdev
  Cc: kernel-janitors, linux-kernel

The variable decrypted is being assigned a value that is never read,
the control of flow after the assignment is via an return path and
decrypted is not referenced in this path. The assignment is redundant
and can be removed.

Cleans up clang scan warning:
net/tls/tls_sw.c:2150:4: warning: Value stored to 'decrypted' is never
read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 net/tls/tls_sw.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index b783231668c6..305a412785f5 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -2147,7 +2147,6 @@ int tls_sw_recvmsg(struct sock *sk,
 		if (ret) {
 			if (err >= 0 || err == -EINPROGRESS)
 				err = ret;
-			decrypted = 0;
 			goto end;
 		}
 
-- 
2.39.2


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

* Re: [PATCH][next] tls: remove redundant assignment to variable decrypted
  2024-04-10 14:41 [PATCH][next] tls: remove redundant assignment to variable decrypted Colin Ian King
@ 2024-04-12  3:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-12  3:10 UTC (permalink / raw)
  To: Colin King
  Cc: borisp, john.fastabend, kuba, davem, edumazet, pabeni, netdev,
	kernel-janitors, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 10 Apr 2024 15:41:36 +0100 you wrote:
> The variable decrypted is being assigned a value that is never read,
> the control of flow after the assignment is via an return path and
> decrypted is not referenced in this path. The assignment is redundant
> and can be removed.
> 
> Cleans up clang scan warning:
> net/tls/tls_sw.c:2150:4: warning: Value stored to 'decrypted' is never
> read [deadcode.DeadStores]
> 
> [...]

Here is the summary with links:
  - [next] tls: remove redundant assignment to variable decrypted
    https://git.kernel.org/netdev/net-next/c/f7ac8fbd3215

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-04-12  3:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-10 14:41 [PATCH][next] tls: remove redundant assignment to variable decrypted Colin Ian King
2024-04-12  3:10 ` patchwork-bot+netdevbpf

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