diff options
author | Borislav Petkov <bp@alien8.de> | 2010-05-02 08:03:54 +0200 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-05-04 12:23:47 -0400 |
commit | 956097912c40a03bf22603a3be73503fd9ea9e44 (patch) | |
tree | 2d73d9dd1fed43cb1eeaa9137fefc72884e62694 /kernel/trace/ring_buffer.c | |
parent | 4dbf6bc239c169b032777616806ecc648058f6b2 (diff) | |
download | lwn-956097912c40a03bf22603a3be73503fd9ea9e44.tar.gz lwn-956097912c40a03bf22603a3be73503fd9ea9e44.zip |
ring-buffer: Wrap open-coded WARN_ONCE
Wrap open-coded WARN_ONCE functionality into the equivalent macro.
Signed-off-by: Borislav Petkov <bp@alien8.de>
LKML-Reference: <20100502060354.GA5281@liondog.tnic>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r-- | kernel/trace/ring_buffer.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 2a090448ef6b..7f6059c5aa94 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -2000,17 +2000,13 @@ rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer, u64 *ts, u64 *delta) { struct ring_buffer_event *event; - static int once; int ret; - if (unlikely(*delta > (1ULL << 59) && !once++)) { - printk(KERN_WARNING "Delta way too big! %llu" - " ts=%llu write stamp = %llu\n", - (unsigned long long)*delta, - (unsigned long long)*ts, - (unsigned long long)cpu_buffer->write_stamp); - WARN_ON(1); - } + WARN_ONCE(*delta > (1ULL << 59), + KERN_WARNING "Delta way too big! %llu ts=%llu write stamp = %llu\n", + (unsigned long long)*delta, + (unsigned long long)*ts, + (unsigned long long)cpu_buffer->write_stamp); /* * The delta is too big, we to add a |