diff options
author | Taehee Yoo <ap420073@gmail.com> | 2020-02-28 18:01:46 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-22 10:40:20 +0200 |
commit | dd2b3cab4f74269c0c7036029b5c7a7431cda6b1 (patch) | |
tree | c305d36de14e27f5098bc5693050e0c00b19fbf6 | |
parent | 31f20a6e73663c8ac3c625aa6b24cbdc8541c674 (diff) | |
download | linux-stable-dd2b3cab4f74269c0c7036029b5c7a7431cda6b1.tar.gz linux-stable-dd2b3cab4f74269c0c7036029b5c7a7431cda6b1.tar.bz2 linux-stable-dd2b3cab4f74269c0c7036029b5c7a7431cda6b1.zip |
hsr: use netdev_err() instead of WARN_ONCE()
commit 4b793acdca0050739b99ace6a8b9e7f717f57c6b upstream.
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>
Cc: George Kennedy <george.kennedy@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/hsr/hsr_framereg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c index d7206581145d..336cffd93293 100644 --- a/net/hsr/hsr_framereg.c +++ b/net/hsr/hsr_framereg.c @@ -310,7 +310,8 @@ void hsr_addr_subst_dest(struct hsr_node *node_src, struct sk_buff *skb, node_dst = find_node_by_AddrA(&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->AddrB_port) |