lineage_android_kernel_sams.../include
Joe Perches b3c463e876 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>
Cc: Qiang Huang <h.huangqiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-07 16:02:15 -07:00
..
acpi
asm-generic
crypto
drm drm: Pad drm_mode_get_connector to 64-bit boundary 2014-06-07 16:02:13 -07:00
keys
linux net: Add net_ratelimited_function and net_<level>_ratelimited macros 2014-06-07 16:02:15 -07:00
math-emu
media
misc
mtd
net mac80211: introduce IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL 2014-06-07 16:02:07 -07:00
pcmcia
rdma
rxrpc
scsi
sound
target
trace
video
xen
Kbuild