linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Steven Rostedt <srostedt@redhat.com>
Subject: Re: [PATCH 4/5] ftrace: break out modify loop immediately on detection of error
Date: Fri, 20 Feb 2009 18:33:34 +0100	[thread overview]
Message-ID: <20090220173334.GJ24538@elte.hu> (raw)
In-Reply-To: <20090220164046.287797665@goodmis.org>


* Steven Rostedt <rostedt@goodmis.org> wrote:

> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -561,11 +561,15 @@ static void ftrace_replace_code(int enable)
>  				if ((system_state == SYSTEM_BOOTING) ||
>  				    !core_kernel_text(rec->ip)) {
>  					ftrace_free_rec(rec);
> -				} else
> +				} else {
>  					ftrace_bug(failed, rec->ip);
> +					goto out;
> +				}
>  			}
>  		}
>  	}
> + out:
> +	return;

wouldnt a simple 'break' suffice? Hm, nope, 
do_for_each_ftrace_rec() is a double loop.

Then perhaps a 'return' would perhaps be cleaner in this case. 
(even though it does make the flow a bit assymetric - the out 
label and the empty return looks a bit ugly.)

	Ingo

  reply	other threads:[~2009-02-20 17:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 16:38 [git pull] updates for tip Steven Rostedt
2009-02-20 16:38 ` [PATCH 1/5] ftrace: allow archs to preform pre and post process for code modification Steven Rostedt
2009-02-20 17:25   ` Ingo Molnar
2009-02-20 17:32     ` Steven Rostedt
2009-02-20 16:38 ` [PATCH 2/5] ftrace, x86: make kernel text writable only for conversions Steven Rostedt
2009-02-20 17:30   ` Ingo Molnar
2009-02-20 17:52     ` Steven Rostedt
2009-02-20 17:55       ` Ingo Molnar
2009-02-20 18:00         ` Steven Rostedt
2009-02-20 16:38 ` [PATCH 3/5] ftrace: immediately stop code modification if failure is detected Steven Rostedt
2009-02-20 16:38 ` [PATCH 4/5] ftrace: break out modify loop immediately on detection of error Steven Rostedt
2009-02-20 17:33   ` Ingo Molnar [this message]
2009-02-20 17:54     ` Steven Rostedt
2009-02-20 16:38 ` [PATCH 5/5] ftrace, x86: do not depend on system state for kernel text info Steven Rostedt
2009-02-20 17:34   ` Ingo Molnar
2009-02-20 17:54     ` Steven Rostedt

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=20090220173334.GJ24538@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=srostedt@redhat.com \
    --cc=tglx@linutronix.de \
    /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 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).