From: Joe Perches Date: Sun, 13 May 2012 21:56:25 +0000 (+0000) Subject: net: Add net_ratelimited_function and net__ratelimited macros X-Git-Tag: v3.5-rc1~109^2~67 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a3bfb61e64476ff1e4ac3122cb6dec9c79b795c;p=pandora-kernel.git net: Add net_ratelimited_function and net__ratelimited macros __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_. 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__ratelimited() logging macros similar to pr__ratelimited that use the global net_ratelimit instead of a static per call site "struct ratelimit_state". Signed-off-by: Joe Perches Signed-off-by: David S. Miller --- Reading git-diff-tree failed