From: Stanislaw Gruszka <sgruszka@redhat.com>
To: linux-wireless@vger.kernel.org
Cc: "Tomislav Požega" <pozega.tomislav@gmail.com>,
"Daniel Golle" <daniel@makrotopia.org>,
"Felix Fietkau" <nbd@nbd.name>, "Mathias Kresin" <dev@kresin.me>
Subject: [PATCH v3 2/4] rt2x00: use ratelimited variants dev_warn/dev_err
Date: Tue, 12 Mar 2019 10:51:41 +0100 [thread overview]
Message-ID: <1552384303-29529-3-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1552384303-29529-1-git-send-email-sgruszka@redhat.com>
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@oostdyk.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
drivers/net/wireless/ralink/rt2x00/rt2x00.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
index 4b1744e9fb78..5657495cf626 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
@@ -69,10 +69,10 @@
printk(KERN_ERR KBUILD_MODNAME ": %s: Error - " fmt, \
__func__, ##__VA_ARGS__)
#define rt2x00_err(dev, fmt, ...) \
- wiphy_err((dev)->hw->wiphy, "%s: Error - " fmt, \
+ wiphy_err_ratelimited((dev)->hw->wiphy, "%s: Error - " fmt, \
__func__, ##__VA_ARGS__)
#define rt2x00_warn(dev, fmt, ...) \
- wiphy_warn((dev)->hw->wiphy, "%s: Warning - " fmt, \
+ wiphy_warn_ratelimited((dev)->hw->wiphy, "%s: Warning - " fmt, \
__func__, ##__VA_ARGS__)
#define rt2x00_info(dev, fmt, ...) \
wiphy_info((dev)->hw->wiphy, "%s: Info - " fmt, \
--
2.7.5
next prev parent reply other threads:[~2019-03-12 9:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 9:51 [PATCH v3 0/4] rt2x00 random fixes Stanislaw Gruszka
2019-03-12 9:51 ` [PATCH v3 1/4] cfg80211: add ratelimited variants of err and warn Stanislaw Gruszka
2019-03-12 9:51 ` Stanislaw Gruszka [this message]
2019-04-25 16:41 ` [PATCH v3 2/4] rt2x00: use ratelimited variants dev_warn/dev_err Kalle Valo
2019-03-12 9:51 ` [PATCH v3 3/4] rt2x00: check number of EPROTO errors Stanislaw Gruszka
2019-03-12 9:51 ` [PATCH v3 4/4] rt2x00: do not print error when queue is full Stanislaw Gruszka
2019-03-19 2:12 ` Tom Psyborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1552384303-29529-3-git-send-email-sgruszka@redhat.com \
--to=sgruszka@redhat.com \
--cc=daniel@makrotopia.org \
--cc=dev@kresin.me \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=pozega.tomislav@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).