All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Cc: Duncan Sands <duncan.sands@free.fr>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	christian.dietrich@informatik.uni-erlangen.de
Subject: Re: [PATCH 07/11] drivers/usb/atm: use printk_ratelimited() instead of printk_ratelimit()
Date: Thu, 16 Jun 2011 18:37:23 +0400	[thread overview]
Message-ID: <4DFA1523.2060103@ru.mvista.com> (raw)
In-Reply-To: <98558b2a3dbb8b14a3bc90e0a73ca7d61dd10a53.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de>

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 <manuel.f.zerpies@ww.stud.uni-erlangen.de>
> ---
>  drivers/usb/atm/usbatm.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

> diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c
> index 989e16e..d3448ca 100644
> --- a/drivers/usb/atm/usbatm.c
> +++ b/drivers/usb/atm/usbatm.c
> @@ -81,6 +81,7 @@
>  #include <linux/timer.h>
>  #include <linux/wait.h>
>  #include <linux/kthread.h>
> +#include <linux/ratelimit.h>
>  
>  #ifdef VERBOSE_DEBUG
>  static int usbatm_print_packet(const unsigned char *data, int len);
> @@ -668,8 +669,7 @@ static int usbatm_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
>  	/* racy disconnection check - fine */
>  	if (!instance || instance->disconnected) {
>  #ifdef DEBUG
> -		if (printk_ratelimit())
> -			printk(KERN_DEBUG "%s: %s!\n", __func__, instance ? "disconnected" : "NULL instance");
> +		printk_ratelimited(KERN_DEBUG "%s: %s!\n", __func__, instance ? "disconnected" : "NULL instance");
>  #endif

    You could use pr_debug_ratelimited() and eliminate #ifdef with that.

WBR, Sergei


  reply	other threads:[~2011-06-16 14:39 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 12:06 [PATCH 00/11] Replace printk_rateilimit() with printk_ratelimited() Manuel Zerpies
2011-06-16 12:06 ` [PATCH 01/11] drivers/ide: use printk_ratelimited() instead of printk_ratelimit() Manuel Zerpies
2011-06-16 14:19   ` Borislav Petkov
2011-06-20  8:17     ` Manuel Zerpies
2011-06-20  8:17       ` Manuel Zerpies
2011-06-20  8:22       ` Sergei Shtylyov
2011-06-16 14:32   ` Sergei Shtylyov
2011-06-16 12:07 ` [PATCH 02/11] drivers/tty: " Manuel Zerpies
2011-06-16 12:08 ` [PATCH 03/11] net/can: " Manuel Zerpies
2011-06-16 12:08   ` Manuel Zerpies
2011-06-17  4:03   ` David Miller
2011-06-17  4:03     ` David Miller
2011-06-16 12:09 ` [PATCH 04/11] net/rds: use prink_ratelimited() " Manuel Zerpies
2011-06-17  4:03   ` David Miller
     [not found] ` <cover.1308142053.git.manuel.f.zerpies-BvGhN7WtUVpvnyFi9AzMs1NpE/a5I+DW@public.gmane.org>
2011-06-16 12:10   ` [PATCH 05/11] RDMA/hw/cxgb4: use printk_ratelimited() " Manuel Zerpies
2011-06-16 12:10     ` Manuel Zerpies
     [not found]     ` <3bf562d8c92207221d39b2c96af4731308324d61.1308142053.git.manuel.f.zerpies-BvGhN7WtUVpvnyFi9AzMs1NpE/a5I+DW@public.gmane.org>
2011-07-19  4:19       ` Roland Dreier
2011-07-19  4:19         ` Roland Dreier
2011-06-16 12:12 ` [PATCH 06/11] drivers/net: " Manuel Zerpies
2011-06-16 16:43   ` Joe Perches
2011-06-16 12:12 ` Manuel Zerpies
2011-06-16 12:12 ` [PATCH 07/11] drivers/usb/atm: " Manuel Zerpies
2011-06-16 14:37   ` Sergei Shtylyov [this message]
2011-06-16 12:13 ` [PATCH 08/11] [SCSI] tcm_fc: " Manuel Zerpies
2011-06-16 12:13   ` Manuel Zerpies
2011-06-16 12:14 ` [PATCH 09/11] xen/xenbus: " Manuel Zerpies
2011-06-16 21:00   ` Jeremy Fitzhardinge
2011-06-16 23:44     ` Joe Perches
2011-06-16 23:44     ` Joe Perches
2011-06-16 23:44       ` Joe Perches
2011-06-16 21:00   ` Jeremy Fitzhardinge
2011-06-16 12:14 ` Manuel Zerpies
2011-06-16 12:14 ` Manuel Zerpies
2011-06-16 12:15 ` [PATCH 10/11] wusb: " Manuel Zerpies
2011-06-16 14:34   ` Sergei Shtylyov
2011-06-16 12:15 ` [PATCH 11/11] usb/class: " Manuel Zerpies
2011-06-16 15:36   ` Pete Zaitcev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DFA1523.2060103@ru.mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=christian.dietrich@informatik.uni-erlangen.de \
    --cc=duncan.sands@free.fr \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=manuel.f.zerpies@ww.stud.uni-erlangen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.