[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1268794724-8665-2-git-send-email-yong.zhang@windriver.com>
Date: Wed, 17 Mar 2010 10:58:42 +0800
From: Yong Zhang <yong.zhang@...driver.com>
To: linux-kernel@...r.kernel.org
Cc: mingo@...e.hu
Subject: [PATCH 1/3] ratelimit: annotate ___ratelimit()
Especially to prevent from wrong using of the return value.
Signed-off-by: Yong Zhang <yong.zhang@...driver.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Dave Young <hidave.darkstar@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists