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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EB7CC43387 for ; Fri, 21 Dec 2018 11:57:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5109B218FD for ; Fri, 21 Dec 2018 11:57:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390012AbeLUL5p (ORCPT ); Fri, 21 Dec 2018 06:57:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33228 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732380AbeLUL5o (ORCPT ); Fri, 21 Dec 2018 06:57:44 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7A48B81F10; Fri, 21 Dec 2018 11:57:44 +0000 (UTC) Received: from localhost (ovpn-204-169.brq.redhat.com [10.40.204.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id E60D15DA63; Fri, 21 Dec 2018 11:57:43 +0000 (UTC) Date: Fri, 21 Dec 2018 12:57:43 +0100 From: Stanislaw Gruszka To: Joe Perches Cc: linux-wireless@vger.kernel.org, Randy Oostdyk , Tomislav =?utf-8?Q?Po=C5=BEega?= , Daniel Golle , Felix Fietkau , Mathias Kresin Subject: Re: [PATCH v2 1/3] rt2x00: use ratelimited variants dev_warn/dev_err Message-ID: <20181221115742.GA30351@redhat.com> References: <1545318971-28351-1-git-send-email-sgruszka@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 21 Dec 2018 11:57:44 +0000 (UTC) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, Dec 21, 2018 at 03:19:31AM -0800, Joe Perches wrote: > On Thu, 2018-12-20 at 16:16 +0100, Stanislaw Gruszka wrote: > > As reported by Randy we can overwhelm logs on some USB error conditions. > > To avoid that use dev_warn_ratelimited() and dev_err_ratelimitd(). > > > > Reported-and-tested-by: Randy Oostdyk > > Signed-off-by: Stanislaw Gruszka > > --- > > drivers/net/wireless/ralink/rt2x00/rt2x00.h | 9 +++++++-- > > 1 file changed, 7 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h > [] > > @@ -65,14 +65,19 @@ > > /* Utility printing macros > > * rt2x00_probe_err is for messages when rt2x00_dev is uninitialized > > */ > > +#define wiphy_err_ratelimited(wiphy, format, args...) \ > > + dev_err_ratelimited(&(wiphy)->dev, format, ##args) > > +#define wiphy_warn_ratelimited(wiphy, format, args...) \ > > + dev_warn_ratelimited(&(wiphy)->dev, format, ##args) > > + > > These should probably be generic in include/net/cfg80211.h Since there are no other users I do not see reason for that. Those macros can be easily move, if other users would show up. Regards Stanislaw