]> git.baikalelectronics.ru Git - kernel.git/commit
printk: pr_debug_ratelimited: check state first to reduce "callbacks suppressed"...
authorJoe Perches <joe@perches.com>
Sun, 27 Oct 2013 03:41:53 +0000 (20:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2013 23:50:52 +0000 (16:50 -0700)
commit93691771e72eea69ac4b3a5eaf04592c1741e7f3
treec01b58e6f7bc61d12e1d1d1eeb036da31ea0ab6d
parent32f3adf67e36c7c138953720fba00ea1daa7a3b4
printk: pr_debug_ratelimited: check state first to reduce "callbacks suppressed" messages

pr_debug_ratelimited should be coded similarly to dev_dbg_ratelimited
to reduce the "callbacks suppressed" messages.

Add #include <linux/dynamic_debug.h> to printk.h. Unfortunately, this
new #include must be after the prototype/declaration of function printk.

It may be better to split out these _ratelimited declarations into
a separate file one day.

Any use of these pr_<foo>_ratelimited functions must also have another
specific #include <ratelimited.h>.  Most users have this done indirectly
via #include <linux/kernel.h>

printk.h may not #include <linux/ratelimit.h> as it causes circular
dependencies and compilation failures.

Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/printk.h