kernel-tls-handshake.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	kernel-tls-handshake@lists.linux.dev, netdev@vger.kernel.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] net/handshake: remove redundant assignment to variable ret
Date: Mon, 15 Apr 2024 09:30:24 -0400	[thread overview]
Message-ID: <Zh0r8FXN45ThNLwk@tissot.1015granger.net> (raw)
In-Reply-To: <20240415100713.483399-1-colin.i.king@gmail.com>

On Mon, Apr 15, 2024 at 11:07:13AM +0100, Colin Ian King wrote:
> The variable is being assigned an value and then is being re-assigned
> a new value in the next statement. The assignment is redundant and can
> be removed.
> 
> Cleans up clang scan build warning:
> net/handshake/tlshd.c:216:2: warning: Value stored to 'ret' is never
> read [deadcode.DeadStores]
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  net/handshake/tlshd.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/handshake/tlshd.c b/net/handshake/tlshd.c
> index d697f68c598c..d6f52839827e 100644
> --- a/net/handshake/tlshd.c
> +++ b/net/handshake/tlshd.c
> @@ -213,7 +213,6 @@ static int tls_handshake_accept(struct handshake_req *req,
>  	if (!hdr)
>  		goto out_cancel;
>  
> -	ret = -EMSGSIZE;
>  	ret = nla_put_s32(msg, HANDSHAKE_A_ACCEPT_SOCKFD, fd);
>  	if (ret < 0)
>  		goto out_cancel;
> -- 
> 2.39.2
> 
> 

Acked-by: Chuck Lever <chuck.lever@oracle.com>

-- 
Chuck Lever

  parent reply	other threads:[~2024-04-15 13:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 10:07 [PATCH][next] net/handshake: remove redundant assignment to variable ret Colin Ian King
2024-04-15 12:01 ` Jason Xing
2024-04-15 13:30 ` Chuck Lever [this message]
2024-04-17  0:20 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zh0r8FXN45ThNLwk@tissot.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=colin.i.king@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kernel-tls-handshake@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).