diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2019-03-12 10:51:41 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-04-25 18:40:52 +0200 |
commit | bb3b18c925333695261ccaad84c0edc100a4d9e2 (patch) | |
tree | 2aaac9e203ed8741d4066185283f80e85e67a55b /drivers/net/wireless/ralink/rt2x00/rt2x00.h | |
parent | net: cw1200: fix a NULL pointer dereference (diff) | |
download | linux-bb3b18c925333695261ccaad84c0edc100a4d9e2.tar.xz linux-bb3b18c925333695261ccaad84c0edc100a4d9e2.zip |
rt2x00: use ratelimited variants dev_warn/dev_err
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ralink/rt2x00/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/ralink/rt2x00/rt2x00.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h index 50b92ca92bd7..ebe4c7f90542 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, \ |