aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBorislav Petkov <bp@alien8.de>2010-05-02 02:03:54 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-05-04 12:23:47 -0400
commit956097912c40a03bf22603a3be73503fd9ea9e44 (patch)
tree2d73d9dd1fed43cb1eeaa9137fefc72884e62694 /kernel
parent4dbf6bc239c169b032777616806ecc648058f6b2 (diff)
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')
-rw-r--r--kernel/trace/ring_buffer.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 2a090448ef6..7f6059c5aa9 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,
2000 u64 *ts, u64 *delta) 2000 u64 *ts, u64 *delta)
2001{ 2001{
2002 struct ring_buffer_event *event; 2002 struct ring_buffer_event *event;
2003 static int once;
2004 int ret; 2003 int ret;
2005 2004
2006 if (unlikely(*delta > (1ULL << 59) && !once++)) { 2005 WARN_ONCE(*delta > (1ULL << 59),
2007 printk(KERN_WARNING "Delta way too big! %llu" 2006 KERN_WARNING "Delta way too big! %llu ts=%llu write stamp = %llu\n",
2008 " ts=%llu write stamp = %llu\n", 2007 (unsigned long long)*delta,
2009 (unsigned long long)*delta, 2008 (unsigned long long)*ts,
2010 (unsigned long long)*ts, 2009 (unsigned long long)cpu_buffer->write_stamp);
2011 (unsigned long long)cpu_buffer->write_stamp);
2012 WARN_ON(1);
2013 }
2014 2010
2015 /* 2011 /*
2016 * The delta is too big, we to add a 2012 * The delta is too big, we to add a