Skip to content

Commit

Permalink
hsr: use netdev_err() instead of WARN_ONCE()
Browse files Browse the repository at this point in the history
When HSR interface is sending a frame, it finds a node with
the destination ethernet address from the list.
If there is no node, it calls WARN_ONCE().
But, using WARN_ONCE() for this situation is a little bit overdoing.
So, in this patch, the netdev_err() is used instead.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Taehee Yoo authored and David S. Miller committed Mar 1, 2020
1 parent 13eeb5f commit 4b793ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/hsr/hsr_framereg.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ void hsr_addr_subst_dest(struct hsr_node *node_src, struct sk_buff *skb,
node_dst = find_node_by_addr_A(&port->hsr->node_db,
eth_hdr(skb)->h_dest);
if (!node_dst) {
WARN_ONCE(1, "%s: Unknown node\n", __func__);
if (net_ratelimit())
netdev_err(skb->dev, "%s: Unknown node\n", __func__);
return;
}
if (port->type != node_dst->addr_B_port)
Expand Down

0 comments on commit 4b793ac

Please sign in to comment.