Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2023823rwn; Fri, 16 Sep 2022 04:43:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5IkWLgnJVo7FxJx/eNY2OSO2xLrdMeXaza5qpQu/FL4NRSjKxK0sijklQgZYfLakBv/T3B X-Received: by 2002:a17:906:ef8b:b0:77f:2b14:6eef with SMTP id ze11-20020a170906ef8b00b0077f2b146eefmr3302204ejb.612.1663328585240; Fri, 16 Sep 2022 04:43:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663328585; cv=none; d=google.com; s=arc-20160816; b=UNyDcC5K/u2pPZyXdH8XUn20wi7iDfxVNvnLIM+od200SMH0OyCSBQGX5cH22rt5s6 V65Dkq6u4hzpeQOhQrSJfSKxOnUWsD/AmVUkgUK+o0yMyfdaHUXDVFEWQjZ7gUwgBB2a gZb8w3BGEVG0U67Gvk5+5dM1bLD69QKWRMpmudX5HWAbxzWIG4iyyDfAdCHhMbadUOyn aJC6ZlDOqrbVCJFoITUIwfYtOzQehMSWD6PC++Pv96uhru26O2ORIGIeQESy9rp3Jdih ey95L9Huf7jhHhLXPvsc3WqzOCkEQDbr/tgj9GIG3XGOUrkPa0+yIhtSgVo5hMZM7WNR X29A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qolk//PbSiJep8f/ppmJLtSQPlLqoJawkzylXr+LQHw=; b=y0HN0JNOt+4YAN5m91fttYVpKmwe6QF2n7WGTKZE1cx94XlqKuT1DjIbMrxcV+oX8P xxDJjLqsh7QdXAtCC8aAM5FYJozwHosfDLb2hMz+ixIF+pkAticdDaoMeaRtJuGUD2kG j6F3bZM2ZLjagRmYNVBttsS8Ih7kDDE9L0Ndj3t4WRQmE1mqEAvBH7u8jTn4giQ683ux CrKylCP2S0PxRjIRtOvmqHQXH8rucM7tlZw2Aszai7c+UtD3QF0FX8as6R6/XUsG8XSP ELldklZ2wvZHcxczaYPqQRoVz/TtM1ez7L2yuy9EJkMsyt81WLV/NT+ar7oSy2ys4YBC jV5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yinpOKHS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz44-20020a1709077dac00b007803ea2d040si5864612ejc.478.2022.09.16.04.42.39; Fri, 16 Sep 2022 04:43:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yinpOKHS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232209AbiIPK2d (ORCPT + 99 others); Fri, 16 Sep 2022 06:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232200AbiIPK1o (ORCPT ); Fri, 16 Sep 2022 06:27:44 -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 6E348B3B0E; Fri, 16 Sep 2022 03:16:50 -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 F1580B82562; Fri, 16 Sep 2022 10:15:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6B83C433D6; Fri, 16 Sep 2022 10:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663323317; bh=yxmTmAmQYOY0Y1XhFJJ91Ijes9f9h/iULVvKrO+XC0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yinpOKHSEoNCbtF1JdRY7kK2iis/YPULe+WbtbL6psgcmFy/MBYB5nPG2gnHVCY5p A9aKTgBN+gz/vG1m96XjFO+Vcc1/50m92hPcRNq3qd4Cyplj2JSxCHXrs4tRryaepT 2ySe6nSEJQnj0wd3pb9x5I4ETzU2fgWEGwVGmYn8= 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.19 28/38] net: dsa: hellcreek: Print warning only once Date: Fri, 16 Sep 2022 12:09:02 +0200 Message-Id: <20220916100449.646918765@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220916100448.431016349@linuxfoundation.org> References: <20220916100448.431016349@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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