Skip to content

Commit

Permalink
wusb: use printk_ratelimited() instead of printk_ratelimit()
Browse files Browse the repository at this point in the history
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited()

Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Manuel Zerpies authored and Greg Kroah-Hartman committed Jul 1, 2011
1 parent 305e7be commit 9708cd2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/usb/wusbcore/wa-xfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/hash.h>
#include <linux/ratelimit.h>

#include "wa-hc.h"
#include "wusbhc.h"
Expand Down Expand Up @@ -1217,16 +1218,14 @@ static int wa_xfer_status_to_errno(u8 status)
if (status == 0)
return 0;
if (status >= ARRAY_SIZE(xlat)) {
if (printk_ratelimit())
printk(KERN_ERR "%s(): BUG? "
printk_ratelimited(KERN_ERR "%s(): BUG? "
"Unknown WA transfer status 0x%02x\n",
__func__, real_status);
return -EINVAL;
}
errno = xlat[status];
if (unlikely(errno > 0)) {
if (printk_ratelimit())
printk(KERN_ERR "%s(): BUG? "
printk_ratelimited(KERN_ERR "%s(): BUG? "
"Inconsistent WA status: 0x%02x\n",
__func__, real_status);
errno = -errno;
Expand Down

0 comments on commit 9708cd2

Please sign in to comment.