diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-05 13:23:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-05 13:23:25 -0400 |
commit | e4c393fd551654179c46b65e4a70ea20d831c783 (patch) | |
tree | 087c5c1f514a2ffeb75c925545e584fb269bea3a /kernel/printk.c | |
parent | 0a053e8c71d666daf30da2d407147b1293923d8b (diff) | |
parent | 38a6ed3ed8e108b662f4016a1ebf068dcf4c1ef4 (diff) |
Merge branch 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
printk: correct the behavior of printk_timed_ratelimit()
vsprintf: unify the format decoding layer for its 3 users, cleanup
fix regression from "vsprintf: unify the format decoding layer for its 3 users"
vsprintf: fix bug in negative value printing
vsprintf: unify the format decoding layer for its 3 users
vsprintf: add binary printf
printk: introduce printk_once()
Fix trivial conflicts (printk_once vs log_buf_kexec_setup() added near
each other) in include/linux/kernel.h.
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index a5f61a9acedb..5052b5497c67 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -1311,8 +1311,11 @@ EXPORT_SYMBOL(printk_ratelimit); | |||
1311 | bool printk_timed_ratelimit(unsigned long *caller_jiffies, | 1311 | bool printk_timed_ratelimit(unsigned long *caller_jiffies, |
1312 | unsigned int interval_msecs) | 1312 | unsigned int interval_msecs) |
1313 | { | 1313 | { |
1314 | if (*caller_jiffies == 0 || time_after(jiffies, *caller_jiffies)) { | 1314 | if (*caller_jiffies == 0 |
1315 | *caller_jiffies = jiffies + msecs_to_jiffies(interval_msecs); | 1315 | || !time_in_range(jiffies, *caller_jiffies, |
1316 | *caller_jiffies | ||
1317 | + msecs_to_jiffies(interval_msecs))) { | ||
1318 | *caller_jiffies = jiffies; | ||
1316 | return true; | 1319 | return true; |
1317 | } | 1320 | } |
1318 | return false; | 1321 | return false; |