LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@gmail.com>
To: Dave Young <hidave.darkstar@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] C99 initializers for DEFINE_RATELIMIT_STATE()
Date: Tue, 28 Oct 2008 20:04:42 +0100 [thread overview]
Message-ID: <200810282004.43047.bart.vanassche@gmail.com> (raw)
A few months ago (July 25, 2008) the printk ratelimiting code has been
rewritten. This patch added a.o. the new macro DEFINE_RATELIMIT_STATE(). The
patch below converts the initializers in that macro to C99 style.
For more information about the printk ratelimiting rewrite, see also commit
717115e1a5856b57af0f71e1df7149108294fc10
(http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.27.y.git;a=commit;h=717115e1a5856b57af0f71e1df7149108294fc10).
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>
diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h
index 18a5b9b..61cc908 100644
--- a/include/linux/ratelimit.h
+++ b/include/linux/ratelimit.h
@@ -13,8 +13,9 @@ struct ratelimit_state {
unsigned long begin;
};
-#define DEFINE_RATELIMIT_STATE(name, interval, burst) \
- struct ratelimit_state name = {interval, burst,}
+#define DEFINE_RATELIMIT_STATE(name, interval_value, burst_value) \
+ struct ratelimit_state name = \
+ { .interval = (interval_value), .burst = (burst_value) }
extern int __ratelimit(struct ratelimit_state *rs);
reply other threads:[~2008-10-28 19:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200810282004.43047.bart.vanassche@gmail.com \
--to=bart.vanassche@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hidave.darkstar@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--subject='Re: [PATCH] C99 initializers for DEFINE_RATELIMIT_STATE()' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).