* [PATCH net-next] net/hsr: Remove left-over never-true conditional code.
[not found] <20140710210037.GA14669@mwanda>
@ 2014-07-11 16:21 ` Arvid Brodin
2014-07-11 22:05 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Arvid Brodin @ 2014-07-11 16:21 UTC (permalink / raw)
To: David Miller; +Cc: Dan Carpenter, kernel-janitors, netdev@vger.kernel.org
MacAddressB is an array (unsigned char MacAddressB[ETH_ALEN]) and is allocated
as a part of *node_dst (which is a struct hsr_node). So the condition is always
false.
Detected by Dan Carpenter.
Signed-off-by: Arvid Brodin <arvid.brodin@alten.se>
---
net/hsr/hsr_framereg.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c
index c709c13..bace124 100644
--- a/net/hsr/hsr_framereg.c
+++ b/net/hsr/hsr_framereg.c
@@ -290,10 +290,6 @@ void hsr_addr_subst_dest(struct hsr_node *node_src, struct sk_buff *skb,
}
if (port->type != node_dst->AddrB_port)
return;
- if (!node_dst->MacAddressB) {
- WARN_ONCE(1, "%s: No MacAddressB\n", __func__);
- return;
- }
ether_addr_copy(eth_hdr(skb)->h_dest, node_dst->MacAddressB);
}
--
1.8.3.2
--
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net/hsr: Remove left-over never-true conditional code.
2014-07-11 16:21 ` [PATCH net-next] net/hsr: Remove left-over never-true conditional code Arvid Brodin
@ 2014-07-11 22:05 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-07-11 22:05 UTC (permalink / raw)
To: arvid.brodin; +Cc: dan.carpenter, kernel-janitors, netdev
From: Arvid Brodin <arvid.brodin@alten.se>
Date: Fri, 11 Jul 2014 18:21:12 +0200
> MacAddressB is an array (unsigned char MacAddressB[ETH_ALEN]) and is allocated
> as a part of *node_dst (which is a struct hsr_node). So the condition is always
> false.
>
> Detected by Dan Carpenter.
>
> Signed-off-by: Arvid Brodin <arvid.brodin@alten.se>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-11 22:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20140710210037.GA14669@mwanda>
2014-07-11 16:21 ` [PATCH net-next] net/hsr: Remove left-over never-true conditional code Arvid Brodin
2014-07-11 22:05 ` David Miller
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).