Commit 2a7268abc48c8009b284bd88605d14fcb65772ec

Authored by Yong Zhang
Committed by Linus Torvalds
1 parent ee5d2acd5c

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>

Showing 1 changed file with 7 additions and 2 deletions Side-by-side Diff

... ... @@ -16,9 +16,14 @@
16 16 /*
17 17 * __ratelimit - rate limiting
18 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   - * in every @rs->ratelimit_jiffies
  21 + * This enforces a rate limit: not more than @rs->burst callbacks
  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 */
23 28 int ___ratelimit(struct ratelimit_state *rs, const char *func)
24 29 {