From: Arvid Brodin <arvid.brodin@alten.se>
To: kernel-janitors@vger.kernel.org
Subject: Re: net/hsr: Better frame dispatch
Date: Fri, 11 Jul 2014 16:12:31 +0000 [thread overview]
Message-ID: <53C00CEF.1070100@alten.se> (raw)
In-Reply-To: <20140710210037.GA14669@mwanda>
On 2014-07-10 23:00, Dan Carpenter wrote:
> Hello Arvid Brodin,
>
> The patch f266a683a480: "net/hsr: Better frame dispatch" from Jul 4,
> 2014, leads to the following static checker warning:
>
> net/hsr/hsr_framereg.c:293 hsr_addr_subst_dest()
> warn: this array is probably non-NULL. 'node_dst->MacAddressB'
>
> net/hsr/hsr_framereg.c
> 286 node_dst = find_node_by_AddrA(&port->hsr->node_db, eth_hdr(skb)->h_dest);
> 287 if (!node_dst) {
> 288 WARN_ONCE(1, "%s: Unknown node\n", __func__);
> 289 return;
> 290 }
> 291 if (port->type != node_dst->AddrB_port)
> 292 return;
> 293 if (!node_dst->MacAddressB) {
> ^^^^^^^^^^^^^^^^^^^^^^
> This test is never true. It could be deleted or replaced.
>
> 294 WARN_ONCE(1, "%s: No MacAddressB\n", __func__);
> 295 return;
> 296 }
> 297
>
Yes, this code (the whole if block; lines 293-296) is useless and should be deleted.
Thanks for finding it!
--
Arvid Brodin | Consultant (Linux)
ALTEN | Knarrarnäsgatan 7 | SE-164 40 Kista | Sweden
arvid.brodin@alten.se | www.alten.se/en/
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-07-11 16:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-10 21:00 net/hsr: Better frame dispatch Dan Carpenter
2014-07-11 16:12 ` Arvid Brodin [this message]
2014-07-11 16:21 ` [PATCH net-next] net/hsr: Remove left-over never-true conditional code Arvid Brodin
2014-07-11 16:21 ` Arvid Brodin
2014-07-11 22:05 ` David Miller
2014-07-11 22:05 ` 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=53C00CEF.1070100@alten.se \
--to=arvid.brodin@alten.se \
--cc=kernel-janitors@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 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.