Messages in this thread Patch in this message | | | From | Yong Zhang <> | Subject | [PATCH 1/3] ratelimit: annotate ___ratelimit() | Date | Wed, 17 Mar 2010 10:58:42 +0800 |
| |
Especially to prevent from wrong using of the return value.
Signed-off-by: Yong Zhang <yong.zhang@windriver.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Dave Young <hidave.darkstar@gmail.com> --- lib/ratelimit.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/ratelimit.c b/lib/ratelimit.c index 09f5ce1..29a10b3 100644 --- a/lib/ratelimit.c +++ b/lib/ratelimit.c @@ -16,9 +16,14 @@ /* * __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 suppuressed. + * 1 means go ahead and do it. */ int ___ratelimit(struct ratelimit_state *rs, const char *func) { -- 1.6.3.3
| |