]> git.baikalelectronics.ru Git - kernel.git/commit
net: Don't forget pr_fmt on net_dbg_ratelimited for CONFIG_DYNAMIC_DEBUG
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 15 Jun 2016 09:14:53 +0000 (11:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jun 2016 05:07:57 +0000 (22:07 -0700)
commit6d4cf71f32caef2ed1e3999129ef288f6eafb918
tree2f5b003b444dd847538a06afbfaa86e2a58cc40e
parent9667c403d5e1a08d854647f2688144fb1484ab14
net: Don't forget pr_fmt on net_dbg_ratelimited for CONFIG_DYNAMIC_DEBUG

The implementation of net_dbg_ratelimited in the CONFIG_DYNAMIC_DEBUG
case was added with d53c4783f ("net: Implement net_dbg_ratelimited() for
CONFIG_DYNAMIC_DEBUG case"). The implementation strategy was to take the
usual definition of the dynamic_pr_debug macro, but alter it by adding a
call to "net_ratelimit()" in the if statement. This is, in fact, the
correct approach.

However, while doing this, the author of the commit forgot to surround
fmt by pr_fmt, resulting in unprefixed log messages appearing in the
console. So, this commit adds back the pr_fmt(fmt) invocation, making
net_dbg_ratelimited properly consistent across DEBUG, no DEBUG, and
DYNAMIC_DEBUG cases, and bringing parity with the behavior of
dynamic_pr_debug as well.

Fixes: d53c4783f ("net: Implement net_dbg_ratelimited() for CONFIG_DYNAMIC_DEBUG case")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Tim Bingham <tbingham@akamai.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/net.h