From: Kurt Kanzenbach Date: Tue, 30 Aug 2022 16:34:48 +0000 (+0200) Subject: net: dsa: hellcreek: Print warning only once X-Git-Tag: v6.6.17~6688^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52267ce25f60f37ae40ccbca0b21328ebae5ae75;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20220830163448.8921-1-kurt@linutronix.de Signed-off-by: Jakub Kicinski --- diff --git a/net/dsa/tag_hellcreek.c b/net/dsa/tag_hellcreek.c index eb204ad..846588c 100644 --- a/net/dsa/tag_hellcreek.c +++ b/net/dsa/tag_hellcreek.c @@ -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; }