aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorYong Zhang <yong.zhang@windriver.com>2010-04-06 17:35:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-07 11:38:04 -0400
commit2a7268abc48c8009b284bd88605d14fcb65772ec (patch)
tree4a85cff6aaa6a1beda8e727b593f780a3fec3fc8 /lib
parentee5d2acd5ca1534f40e06d4f0d41a940b17beb54 (diff)
ratelimit: annotate ___ratelimit()
To prevent from wrongly using the return value. [akpm@linux-foundation.org: fix spello] Signed-off-by: Yong Zhang <yong.zhang@windriver.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Dave Young <hidave.darkstar@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/ratelimit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/ratelimit.c b/lib/ratelimit.c
index 09f5ce1810dc..b4cd24ff9b29 100644
--- a/lib/ratelimit.c
+++ b/lib/ratelimit.c
@@ -16,9 +16,14 @@
16/* 16/*
17 * __ratelimit - rate limiting 17 * __ratelimit - rate limiting
18 * @rs: ratelimit_state data 18 * @rs: ratelimit_state data
19 * @func: name of calling function
19 * 20 *
20 * This enforces a rate limit: not more than @rs->ratelimit_burst callbacks 21 * This enforces a rate limit: not more than @rs->burst callbacks
21 * in every @rs->ratelimit_jiffies 22 * in every @rs->interval
23 *
24 * RETURNS:
25 * 0 means callbacks will be suppressed.
26 * 1 means go ahead and do it.
22 */ 27 */
23int ___ratelimit(struct ratelimit_state *rs, const char *func) 28int ___ratelimit(struct ratelimit_state *rs, const char *func)
24{ 29{