tracing/function: Simplify __ftrace_replace_code()
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Wed, 15 Jul 2009 04:32:15 +0000 (12:32 +0800)
committerFrederic Weisbecker <fweisbec@gmail.com>
Fri, 17 Jul 2009 04:37:53 +0000 (00:37 -0400)
Rewrite the __ftrace_replace_code() function, simplify it, but don't
change the code's logic.

First, we get the state we want to set, if the record has the same
state, then do nothing, otherwise enable/disable it.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
kernel/trace/ftrace.c

Simple merge