All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Colin King <colin.king@canonical.com>
Cc: Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tcp: remove redundant check on tskb
Date: Thu, 4 Apr 2019 18:05:09 +0300	[thread overview]
Message-ID: <20190404150508.GL32590@kadam> (raw)
In-Reply-To: <20190404144603.27682-1-colin.king@canonical.com>

On Thu, Apr 04, 2019 at 03:46:03PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The non-null check on tskb is always false because it is in an else
> path of a check on tskb and hence tskb is null in this code block.
> This is check is therefore redundant and can be removed as well
> as the label coalesc.
> 
> if (tsbk) {
>         ...
> } else {
>         ...
>         if (unlikely(!skb)) {
>                 if (tskb)       /* can never be true, redundant code */
>                         goto coalesc;
>                 return;
>         }
> }
> 
> Addresses-Coverity: ("Logically dead code")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

This was fallout from commit 75c119afe14f ("tcp: implement rb-tree based
retransmit queue").

regards,
dan carpenter


WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Colin King <colin.king@canonical.com>
Cc: Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tcp: remove redundant check on tskb
Date: Thu, 04 Apr 2019 15:05:09 +0000	[thread overview]
Message-ID: <20190404150508.GL32590@kadam> (raw)
In-Reply-To: <20190404144603.27682-1-colin.king@canonical.com>

On Thu, Apr 04, 2019 at 03:46:03PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The non-null check on tskb is always false because it is in an else
> path of a check on tskb and hence tskb is null in this code block.
> This is check is therefore redundant and can be removed as well
> as the label coalesc.
> 
> if (tsbk) {
>         ...
> } else {
>         ...
>         if (unlikely(!skb)) {
>                 if (tskb)       /* can never be true, redundant code */
>                         goto coalesc;
>                 return;
>         }
> }
> 
> Addresses-Coverity: ("Logically dead code")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

This was fallout from commit 75c119afe14f ("tcp: implement rb-tree based
retransmit queue").

regards,
dan carpenter

  reply	other threads:[~2019-04-04 15:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 14:46 [PATCH] tcp: remove redundant check on tskb Colin King
2019-04-04 14:46 ` Colin King
2019-04-04 15:05 ` Dan Carpenter [this message]
2019-04-04 15:05   ` Dan Carpenter
2019-04-05  6:47 ` Mukesh Ojha
2019-04-05  6:59   ` Mukesh Ojha
2019-04-05  7:46 ` Eric Dumazet
2019-04-05  7:46   ` Eric Dumazet
2019-04-07  1:18 ` David Miller
2019-04-07  1:18   ` David Miller

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=20190404150508.GL32590@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.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 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.