Re: [PATCH 11/11] usb/class: use printk_ratelimited() instead ofprintk_ratelimit()

From: Pete Zaitcev
Date: Thu Jun 16 2011 - 11:36:14 EST


On Thu, 16 Jun 2011 14:15:54 +0200
Manuel Zerpies <manuel.f.zerpies@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

> +++ b/drivers/usb/class/usblp.c
> @@ -348,8 +349,7 @@ static int usblp_check_status(struct usblp *usblp, int err)
> mutex_lock(&usblp->mut);
> if ((error = usblp_read_status(usblp, usblp->statusbuf)) < 0) {
> mutex_unlock(&usblp->mut);
> - if (printk_ratelimit())
> - printk(KERN_ERR
> + printk_ratelimited(KERN_ERR
> "usblp%d: error %d reading printer status\n",

I wish you went a step further and placed the state into usblp,
but it works for now, ACK. I should've done it myself, really.

-- Pete
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/