From: Paolo Abeni <pabeni@redhat.com>
To: Xiaomeng Tong <xiam0nd.tong@gmail.com>, christopher.lee@cspi.com
Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, jakobkoschel@gmail.com
Subject: Re: [PATCH v2] myri10ge: remove an unneeded NULL check
Date: Tue, 22 Mar 2022 10:32:52 +0100 [thread overview]
Message-ID: <4eb1bcc28e00aeedfe767d3b6afcb864bcdb03b4.camel@redhat.com> (raw)
In-Reply-To: <20220320044457.13734-1-xiam0nd.tong@gmail.com>
Hello,
On Sun, 2022-03-20 at 12:44 +0800, Xiaomeng Tong wrote:
> The define of skb_list_walk_safe(first, skb, next_skb) is:
> for ((skb) = (first), (next_skb) = (skb) ? (skb)->next : NULL; (skb); \
> (skb) = (next_skb), (next_skb) = (skb) ? (skb)->next : NULL)
>
> Thus, if the 'segs' passed as 'first' into the skb_list_walk_safe is NULL,
> the loop will exit immediately. In other words, it can be sure the 'segs'
> is non-NULL when we run inside the loop. So just remove the unnecessary
> NULL check. Also remove the unneeded assignmnets.
>
> Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
This is pure net-next material, and we are now into the merge window -
only fixes allowed. Please repost in 2w, thanks!
Paolo
prev parent reply other threads:[~2022-03-22 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-20 4:44 Xiaomeng Tong
2022-03-22 9:32 ` Paolo Abeni [this message]
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=4eb1bcc28e00aeedfe767d3b6afcb864bcdb03b4.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=christopher.lee@cspi.com \
--cc=davem@davemloft.net \
--cc=jakobkoschel@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xiam0nd.tong@gmail.com \
/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
Powered by JetHome