Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/20220830163448.8921-1-kurt@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Kurt Kanzenbach and committed by
Jakub Kicinski
52267ce2 eb55dc09

+1 -1
+1 -1
net/dsa/tag_hellcreek.c
··· 45 45 46 46 skb->dev = dsa_master_find_slave(dev, 0, port); 47 47 if (!skb->dev) { 48 - netdev_warn(dev, "Failed to get source port: %d\n", port); 48 + netdev_warn_once(dev, "Failed to get source port: %d\n", port); 49 49 return NULL; 50 50 } 51 51