Skip to contentSkip to conversation

tls: remove redundant assignment to variable decrypted

PATCH Applied Colin Ian King 2 participants 2 messages Apr 10, 2024 – Apr 12, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tls: remove redundant assignment to variable decrypted

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]

---
 net/tls/tls_sw.c | 1 -
 1 file changed, 1 deletion(-)
net/tls/tls_sw.c +0 -1
index b783231668c6..305a412785f5 100644
@@ -2147,7 +2147,6 @@ int tls_sw_recvmsg(struct sock *sk,
 		if (ret) {
 			if (err >= 0 || err == -EINPROGRESS)
 				err = ret;
-			decrypted = 0;
 			goto end;
 		}
 
Signature · 1 line
2.39.2
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · 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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html