提交 52267ce2 编写于 作者: K Kurt Kanzenbach 提交者: Jakub Kicinski

net: dsa: hellcreek: Print warning only once

In case the source port cannot be decoded, print the warning only once. This
still brings attention to the user and does not spam the logs at the same time.
Signed-off-by: NKurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Reviewed-by: NVladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/20220830163448.8921-1-kurt@linutronix.deSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 eb55dc09
......@@ -45,7 +45,7 @@ static struct sk_buff *hellcreek_rcv(struct sk_buff *skb,
skb->dev = dsa_master_find_slave(dev, 0, port);
if (!skb->dev) {
netdev_warn(dev, "Failed to get source port: %d\n", port);
netdev_warn_once(dev, "Failed to get source port: %d\n", port);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册