Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp610898pxj; Thu, 20 May 2021 17:49:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBX5B12VO2Q1USpIaVLX+9sDYeqkDluG4csEszUSTYttf98nEgHWaxZ/2PWFR0hJ3B+CUO X-Received: by 2002:a17:906:1305:: with SMTP id w5mr7230326ejb.404.1621558153624; Thu, 20 May 2021 17:49:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621558153; cv=none; d=google.com; s=arc-20160816; b=jln+BZ2rTCXuYtMVcjlOQ6I9N+yDbdoWQcOvUC2EUmmOj4gXVL7LlgvvR9xy3sIJj2 L/lDTw2j5wHRvIvAr9Bc10Sru0Rdanv7DrM7WJizMIsN5SNDQ+LgvP/+btaBNdN+a2Z9 n69arjYDVu6WVjL553Ib41zx+PgaUYwJXOE7Q1KRM/NSZ7h72bGmqE/SCWcY2xj8kqmJ w1kdZ+JUHLwJj7JoyvinuX8lz0Ramq3YXOA/lZCII8SK6OqTBEiS2IDAAftsO8A0YeUj 7/8dUGJcXRK6bBcsxMB3ErUSB4rjVcCTK36LpzfO7U0gUTvavCweNsyV/KzHwZS3ZU5M zGMw== 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=AySWFK3EeJ+v8bhipfKX04P/crbDAkQmlh43x3gbft4=; b=VSyg7eKBKftn+ZJxB5U4Zmb5SNo00vJ0MkHBvkKvl5QGIDmz5mTRnT5+Ttyzrhr14x 0KBsqEgEZXnxHul6CZddNyCg0UxsyFRalDMCQbpBzkCN7oUY0KOQtrBlmA/uWyuEce8/ OozckmwXt/L8eX9dg1T9broEJqBU4di1LYK/pkwaClNKBhmBI9QPyzJO3dSA/EtbCxUs RWFQuOFSN6hg6NK72HnF60LTbSnG0KPsqVTKdoR+GC5l2ctx5nfumMqHnLBWMmOCs6AB WbNotcqnVPiRJFdaWkhBfGLGuySY1eOkXs89Tt9RR/Eq0BOMdRZ34ZdPsA2w62xNtU7h pt3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="cCBTGH/G"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id aj15si4011152ejc.721.2021.05.20.17.48.49; Thu, 20 May 2021 17:49:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="cCBTGH/G"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S241255AbhETLc1 (ORCPT + 99 others); Thu, 20 May 2021 07:32:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:56532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239802AbhETLLo (ORCPT ); Thu, 20 May 2021 07:11:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B32F613D1; Thu, 20 May 2021 10:07:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505262; bh=mJBtQqML/HrRQger9AXB2yOBSX1gwuSX4xQCL36DS6k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cCBTGH/G2kQJvlO4vsewVf8XThlQbIRoMA481l2Mo/a/aiCY91HJ3QFkePRUS4LpU yGdYAh3arQnxPEranXd/yIps/eKhXaXR3vfKfkZTLgrEinIrgQU7bBfOaga2Zmrkjc UlSCA3TMMQR1KL2iyJsRl3yPJksLG7byIDmCJ0zs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Taehee Yoo , "David S. Miller" , George Kennedy Subject: [PATCH 4.4 055/190] hsr: use netdev_err() instead of WARN_ONCE() Date: Thu, 20 May 2021 11:21:59 +0200 Message-Id: <20210520092103.991890095@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092102.149300807@linuxfoundation.org> References: <20210520092102.149300807@linuxfoundation.org> User-Agent: quilt/0.66 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: Taehee Yoo commit 4b793acdca0050739b99ace6a8b9e7f717f57c6b upstream. When HSR interface is sending a frame, it finds a node with the destination ethernet address from the list. If there is no node, it calls WARN_ONCE(). But, using WARN_ONCE() for this situation is a little bit overdoing. So, in this patch, the netdev_err() is used instead. Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller Cc: George Kennedy Signed-off-by: Greg Kroah-Hartman --- net/hsr/hsr_framereg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/hsr/hsr_framereg.c +++ b/net/hsr/hsr_framereg.c @@ -297,7 +297,8 @@ void hsr_addr_subst_dest(struct hsr_node node_dst = find_node_by_AddrA(&port->hsr->node_db, eth_hdr(skb)->h_dest); if (!node_dst) { - WARN_ONCE(1, "%s: Unknown node\n", __func__); + if (net_ratelimit()) + netdev_err(skb->dev, "%s: Unknown node\n", __func__); return; } if (port->type != node_dst->AddrB_port)