Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp2109512lkv; Thu, 20 May 2021 03:38:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVHJ3sMvHq3+Xuf7SIAtddW2uOWie5Q1JO3VH0cz9qeZo2RH9rWgmM+jD+ytqQuR5ADuru X-Received: by 2002:a92:b00d:: with SMTP id x13mr4986537ilh.181.1621507086085; Thu, 20 May 2021 03:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621507086; cv=none; d=google.com; s=arc-20160816; b=BevsQGAbnlS2fLxy5fN5CQFBeRVJuiAl1mcGChHw5Mwe6wsM6YDsAhxhVU1VPWPG4N M9KanDM1MRCqvjQxxxI8DuKZjhvqmbTHfjI86T3LPQ52LRGaqTpZjo8yrym2eNe70XsH 2jAOaum1FuIZpaATcCVhKRXFgOZJ7zNprO6XK8vqVvPrUI/lruPzWz//Tx8OoJEVvIMO DabxQELVstMpecYWX1nNG+T0f0qg3XKv26/vNc2mp4LU33dms8M2Ocbs0VzCRNkKxgMf uDmafXh8S66eqV0DldbYimQPZFZTlOd8IzgRPRkCg9Yl9Or0r4Pt4D0BvA+6ffwnVPDk uksg== 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=oyJEfZuerGTxL/ik6la1VVevRg1WlR7jZNbS55+apSg=; b=qLxnhJsbZD7toVGyRwq3neymXO9ZdGUOQt1pbPDZAjtP13KbrvrKa0Ndc988cZqfS5 6pnZP+XP+j/sxjfFs3npUVAmfZFJu2R9tle+fyEWSrgTuRNgMcU8SouyIR0nWqKLsymt ++JNRnxHoMTlWLLb1sHgGi/+mokLwtMEtHmALwM4X9lU1MCqjBVibXSjsgANxpVTjlIU SFiTq1gCVlBSKw6dL3WuuT7Y1JmIs2ZNEKjI6FHLDi7XmeQcumPDGsNZkxTZvwpsCRHD IjTUbQcMsUmfTj4WtG68OJWKAayun7qPrsj95esyeJaivSdgFFnslaQXaQMpdfd0nkjh wldg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="NIHq/BUU"; 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 h10si1937813ioe.38.2021.05.20.03.37.52; Thu, 20 May 2021 03:38:06 -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="NIHq/BUU"; 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 S237509AbhETKin (ORCPT + 99 others); Thu, 20 May 2021 06:38:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:55678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236614AbhETKYW (ORCPT ); Thu, 20 May 2021 06:24:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6E01861A25; Thu, 20 May 2021 09:49:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504144; bh=FVsaYYVv1Qhaj3OnFiRvL2dMG6YsftuPWFaj/nUClgw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NIHq/BUUpTj91ioGrqF1uun0NXf7BnIvo2zuiQtv3WmxbtqaRpHkGtkFPuWMzOYSw XgISVC+6rC3YK/CVicb8qWrIYm8+C2dgDYUxJThe5J3aqmshbH6PiQbufUb+ShEm/j tHuwhFmdAI9mmsltlYfq9GPXW776zAcr9iKGpxIs= 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.14 112/323] hsr: use netdev_err() instead of WARN_ONCE() Date: Thu, 20 May 2021 11:20:04 +0200 Message-Id: <20210520092123.932863052@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@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 @@ -310,7 +310,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)