diff mbox series

net/tls: Remove redundant initialization of record

Message ID 1619519302-59518-1-git-send-email-jiapeng.chong@linux.alibaba.com (mailing list archive)
State Accepted
Commit 3afef8c7aa2de3574021c848b5f7c62687e6b166
Delegated to: Netdev Maintainers
Headers show
Series net/tls: Remove redundant initialization of record | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers warning 3 maintainers not CCed: nathan@kernel.org ndesaulniers@google.com clang-built-linux@googlegroups.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Jiapeng Chong April 27, 2021, 10:28 a.m. UTC
record is being initialized to ctx->open_record but this is never
read as record is overwritten later on.  Remove the redundant
initialization.

Cleans up the following clang-analyzer warning:

net/tls/tls_device.c:421:26: warning: Value stored to 'record' during
its initialization is never read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 net/tls/tls_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org April 27, 2021, 9:22 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Tue, 27 Apr 2021 18:28:22 +0800 you wrote:
> record is being initialized to ctx->open_record but this is never
> read as record is overwritten later on.  Remove the redundant
> initialization.
> 
> Cleans up the following clang-analyzer warning:
> 
> net/tls/tls_device.c:421:26: warning: Value stored to 'record' during
> its initialization is never read [clang-analyzer-deadcode.DeadStores].
> 
> [...]

Here is the summary with links:
  - net/tls: Remove redundant initialization of record
    https://git.kernel.org/netdev/net-next/c/3afef8c7aa2d

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

Patch

diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c
index d9cd229..72227fe 100644
--- a/net/tls/tls_device.c
+++ b/net/tls/tls_device.c
@@ -418,7 +418,7 @@  static int tls_push_data(struct sock *sk,
 	struct tls_context *tls_ctx = tls_get_ctx(sk);
 	struct tls_prot_info *prot = &tls_ctx->prot_info;
 	struct tls_offload_context_tx *ctx = tls_offload_ctx_tx(tls_ctx);
-	struct tls_record_info *record = ctx->open_record;
+	struct tls_record_info *record;
 	int tls_push_record_flags;
 	struct page_frag *pfrag;
 	size_t orig_size = size;