diff options
author | Joe Perches <joe@perches.com> | 2012-05-13 21:56:25 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-06-19 02:16:44 +0100 |
commit | 3eddd6c470e225ba02d670a2c76d13cd05aabc0c (patch) | |
tree | 12a3ea458800262c063b1e5b4bc7b93ca23a163d /net/bluetooth/hidp/hidp.h | |
parent | a1db4d774b1deab5a4f1a4a950c3523298ab4cd6 (diff) | |
download | kernel_samsung_smdk4412-3eddd6c470e225ba02d670a2c76d13cd05aabc0c.zip kernel_samsung_smdk4412-3eddd6c470e225ba02d670a2c76d13cd05aabc0c.tar.gz kernel_samsung_smdk4412-3eddd6c470e225ba02d670a2c76d13cd05aabc0c.tar.bz2 |
net: Add net_ratelimited_function and net_<level>_ratelimited macros
commit 3a3bfb61e64476ff1e4ac3122cb6dec9c79b795c upstream.
__ratelimit() can be considered an inverted bool test because
it returns true when not ratelimited. Several tests in the
kernel tree use this __ratelimit() function incorrectly.
No net_ratelimit uses are incorrect currently though.
Most uses of net_ratelimit are to log something via printk or
pr_<level>.
In order to minimize the uses of net_ratelimit, and to start
standardizing the code style used for __ratelimit() and net_ratelimit(),
add a net_ratelimited_function() macro and net_<level>_ratelimited()
logging macros similar to pr_<level>_ratelimited that use the global
net_ratelimit instead of a static per call site "struct ratelimit_state".
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/bluetooth/hidp/hidp.h')
0 files changed, 0 insertions, 0 deletions