All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 1/2] ring-buffer: fix ret in rb_add_time_stamp
Date: Tue, 09 Jun 2009 12:36:58 -0400	[thread overview]
Message-ID: <20090609163754.392651394@goodmis.org> (raw)
In-Reply-To: 20090609163657.557589106@goodmis.org

[-- Attachment #1: 0001-ring-buffer-fix-ret-in-rb_add_time_stamp.patch --]
[-- Type: text/plain, Size: 783 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

The update of ret got mistakenly added to the if statement of
rb_try_to_discard. The variable ret should be 1 on commit and zero
otherwise.

[ Impact: fix compiler warning and real bug ]

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/ring_buffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 22878b0..2e642b2 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1433,8 +1433,8 @@ rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer,
 			/* Darn, this is just wasted space */
 			event->time_delta = 0;
 			event->array[0] = 0;
-			ret = 0;
 		}
+		ret = 0;
 	}
 
 	*delta = 0;
-- 
1.6.3.1

-- 

  reply	other threads:[~2009-06-09 16:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09 16:36 [PATCH 0/2] [GIT PULL] tracing/events/ring-buffer: block trace points and fix Steven Rostedt
2009-06-09 16:36 ` Steven Rostedt [this message]
2009-06-09 16:36 ` [PATCH 2/2] tracing/events: convert block trace points to TRACE_EVENT() Steven Rostedt
2009-06-09 18:24   ` Steven Rostedt
2009-06-09 17:34 ` [PATCH 0/2] [GIT PULL] tracing/events/ring-buffer: block trace points and fix Steven Rostedt
2009-06-09 23:46 ` Ingo Molnar
2009-06-10  1:28   ` Li Zefan
2009-06-10  1:30     ` Ingo Molnar
2009-06-10  1:31     ` Steven Rostedt
2009-06-10  1:36       ` Li Zefan
2009-06-10  1:41         ` Steven Rostedt
2009-06-10  1:49           ` Li Zefan
2009-06-10  2:06             ` [PATCH] tracing/events: convert block trace points to TRACE_EVENT(), fix Li Zefan
2009-06-10  2:50               ` Steven Rostedt
2009-06-10  2:56                 ` Li Zefan
2009-06-10  9:57               ` [tip:tracing/core] tracing/events: convert block trace points to TRACE_EVENT(), fix !CONFIG_BLOCK tip-bot for Li Zefan

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=20090609163754.392651394@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.