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)
commit64fbcd162819bddaf0d99e78b16371b655aa5dee
treeabc34dd23386f13675502455d99d868b9b63173e
parentda706d8bc833e7153622435560422e653bdb2e94
tracing/function: Simplify __ftrace_replace_code()

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