Commit 9708cd2f authored by Manuel Zerpies's avatar Manuel Zerpies Committed by Greg Kroah-Hartman

wusb: use printk_ratelimited() instead of printk_ratelimit()

Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited()
Signed-off-by: default avatarManuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 305e7be5
...@@ -83,6 +83,7 @@ ...@@ -83,6 +83,7 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/hash.h> #include <linux/hash.h>
#include <linux/ratelimit.h>
#include "wa-hc.h" #include "wa-hc.h"
#include "wusbhc.h" #include "wusbhc.h"
...@@ -1217,16 +1218,14 @@ static int wa_xfer_status_to_errno(u8 status) ...@@ -1217,16 +1218,14 @@ static int wa_xfer_status_to_errno(u8 status)
if (status == 0) if (status == 0)
return 0; return 0;
if (status >= ARRAY_SIZE(xlat)) { if (status >= ARRAY_SIZE(xlat)) {
if (printk_ratelimit()) printk_ratelimited(KERN_ERR "%s(): BUG? "
printk(KERN_ERR "%s(): BUG? "
"Unknown WA transfer status 0x%02x\n", "Unknown WA transfer status 0x%02x\n",
__func__, real_status); __func__, real_status);
return -EINVAL; return -EINVAL;
} }
errno = xlat[status]; errno = xlat[status];
if (unlikely(errno > 0)) { if (unlikely(errno > 0)) {
if (printk_ratelimit()) printk_ratelimited(KERN_ERR "%s(): BUG? "
printk(KERN_ERR "%s(): BUG? "
"Inconsistent WA status: 0x%02x\n", "Inconsistent WA status: 0x%02x\n",
__func__, real_status); __func__, real_status);
errno = -errno; errno = -errno;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment