From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DECFAC6FA8B for ; Fri, 16 Sep 2022 10:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231810AbiIPKV4 (ORCPT ); Fri, 16 Sep 2022 06:21:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231701AbiIPKUU (ORCPT ); Fri, 16 Sep 2022 06:20:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91A90B08A3; Fri, 16 Sep 2022 03:13:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 43732B82548; Fri, 16 Sep 2022 10:13:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A639C43149; Fri, 16 Sep 2022 10:13:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663323188; bh=yxmTmAmQYOY0Y1XhFJJ91Ijes9f9h/iULVvKrO+XC0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UNm5/LMR5umcl4SGonvGipHojehhFjphK68EPwFhwj51gsQKE06S7ideHeKRxK/pW K+RVT6MOn+IvWxfXCT18G++Aylq2m1X0L/MX+E8CA44z2STMHIF1oo7+Pz/Cr0gTnW OcJJlIREkOiRvwZWIz2U4CMLdhe8tk6rEyf8LToc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kurt Kanzenbach , Andrew Lunn , Vladimir Oltean , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 26/35] net: dsa: hellcreek: Print warning only once Date: Fri, 16 Sep 2022 12:08:49 +0200 Message-Id: <20220916100448.045361017@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220916100446.916515275@linuxfoundation.org> References: <20220916100446.916515275@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kurt Kanzenbach [ Upstream commit 52267ce25f60f37ae40ccbca0b21328ebae5ae75 ] 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 Signed-off-by: Sasha Levin --- net/dsa/tag_hellcreek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/tag_hellcreek.c b/net/dsa/tag_hellcreek.c index eb204ad36eeec..846588c0070a5 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; } -- 2.35.1