mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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.
This commit is contained in:
commit
e4c393fd55
5 changed files with 810 additions and 229 deletions
|
|
@ -1311,8 +1311,11 @@ EXPORT_SYMBOL(printk_ratelimit);
|
|||
bool printk_timed_ratelimit(unsigned long *caller_jiffies,
|
||||
unsigned int interval_msecs)
|
||||
{
|
||||
if (*caller_jiffies == 0 || time_after(jiffies, *caller_jiffies)) {
|
||||
*caller_jiffies = jiffies + msecs_to_jiffies(interval_msecs);
|
||||
if (*caller_jiffies == 0
|
||||
|| !time_in_range(jiffies, *caller_jiffies,
|
||||
*caller_jiffies
|
||||
+ msecs_to_jiffies(interval_msecs))) {
|
||||
*caller_jiffies = jiffies;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue