From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932122Ab1FPOgR (ORCPT ); Thu, 16 Jun 2011 10:36:17 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:54907 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932068Ab1FPOgO (ORCPT ); Thu, 16 Jun 2011 10:36:14 -0400 Message-ID: <4DFA1474.7030206@ru.mvista.com> Date: Thu, 16 Jun 2011 18:34:28 +0400 From: Sergei Shtylyov User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Manuel Zerpies CC: Greg Kroah-Hartman , Lucas De Marchi , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, christian.dietrich@informatik.uni-erlangen.de Subject: Re: [PATCH 10/11] wusb: use printk_ratelimited() instead of printk_ratelimit() References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. Manuel Zerpies wrote: > 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 > --- > drivers/usb/wusbcore/wa-xfer.c | 7 +++---- > 1 files changed, 3 insertions(+), 4 deletions(-) > diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c > index 6ccd93a..4193345 100644 > --- a/drivers/usb/wusbcore/wa-xfer.c > +++ b/drivers/usb/wusbcore/wa-xfer.c > @@ -83,6 +83,7 @@ > #include > #include > #include > +#include > > #include "wa-hc.h" > #include "wusbhc.h" > @@ -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; Why not pr_err_ratelimited()? WBR, Sergei