From: Dave Young On Mon, Mar 10, 2008 at 08:51:32AM -0700, Randy Dunlap wrote: [snip] > > +/* > > + * __ratelimit - rate limiting > > + * @ratelimit_jiffies: minimum time in jiffies between too callbacks > > s/too/two/ will fix [snip] > > + if (lost) > > + printk(KERN_WARNING "__ratelimit: %d messages" > > + " suppressed.\n", lost); > > Would be better not to split the string, e.g.: > > printk(KERN_WARNING "%s: %d messages suppressed\n", > __func__, lost); > Yes, it's better to use __func__ Thanks randy. Andrew, Could you use the following update? I don't want to bother you, but... Thanks. --- Signed-off-by: Dave Young Cc: Randy Dunlap Signed-off-by: Andrew Morton --- lib/ratelimit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -puN lib/ratelimit.c~isolate-ratelimit-from-printkc-for-other-use-update lib/ratelimit.c --- a/lib/ratelimit.c~isolate-ratelimit-from-printkc-for-other-use-update +++ a/lib/ratelimit.c @@ -13,7 +13,7 @@ /* * __ratelimit - rate limiting - * @ratelimit_jiffies: minimum time in jiffies between too callbacks + * @ratelimit_jiffies: minimum time in jiffies between two callbacks * @ratelimit_burst: number of callbacks we do before ratelimiting * * This enforces a rate limit: not more than @ratelimit_burst callbacks @@ -40,8 +40,8 @@ int __ratelimit(int ratelimit_jiffies, i toks -= ratelimit_jiffies; spin_unlock_irqrestore(&ratelimit_lock, flags); if (lost) - printk(KERN_WARNING "__ratelimit: %d messages" - " suppressed.\n", lost); + printk(KERN_WARNING "%s: %d messages suppressed\n", + __func__, lost); return 1; } missed++; _