ratelimit: annotate ___ratelimit()
authorYong Zhang <[email protected]>
Tue, 6 Apr 2010 21:35:01 +0000 (14:35 -0700)
committerLinus Torvalds <[email protected]>
Wed, 7 Apr 2010 15:38:04 +0000 (08:38 -0700)
To prevent from wrongly using the return value.

[[email protected]: fix spello]
Signed-off-by: Yong Zhang <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Dave Young <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
lib/ratelimit.c

index 09f5ce1810dcc02ddb99696d255ed3ad6436f30b..b4cd24ff9b29713d27171189b913422c243355e3 100644 (file)
 /*
  * __ratelimit - rate limiting
  * @rs: ratelimit_state data
+ * @func: name of calling function
  *
- * This enforces a rate limit: not more than @rs->ratelimit_burst callbacks
- * in every @rs->ratelimit_jiffies
+ * This enforces a rate limit: not more than @rs->burst callbacks
+ * in every @rs->interval
+ *
+ * RETURNS:
+ * 0 means callbacks will be suppressed.
+ * 1 means go ahead and do it.
  */
 int ___ratelimit(struct ratelimit_state *rs, const char *func)
 {