Search Linux Wireless

Re: [PATCH v2 1/3] rt2x00: use ratelimited variants dev_warn/dev_err

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stanislaw Gruszka <sgruszka@xxxxxxxxxx> writes:

> 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 <linux-kernel@xxxxxxxxxxx>
>> > Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
>> > ---
>> >  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.

I agree with Joe, these should be in cfg80211.h.

-- 
Kalle Valo



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux