projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
501c237
)
tracing: Using for_each_set_bit() to simplify trace_pid_write()
author
Wei Yongjun
<yongjun_wei@trendmicro.com.cn>
Mon, 4 Jul 2016 15:10:04 +0000
(15:10 +0000)
committer
Steven Rostedt
<rostedt@goodmis.org>
Tue, 5 Jul 2016 15:22:40 +0000
(11:22 -0400)
Using for_each_set_bit() to simplify the code.
Link:
http://lkml.kernel.org/r/1467645004-11169-1-git-send-email-weiyj_lk@163.com
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/trace/trace.c
b/kernel/trace/trace.c
index 5fd53a7847bc9df2db62aadda648aa6831569ec9..dade4c9559cc036c1b6aa8567abf0b0887847923 100644
(file)
--- a/
kernel/trace/trace.c
+++ b/
kernel/trace/trace.c
@@
-517,13
+517,9
@@
int trace_pid_write(struct trace_pid_list *filtered_pids,
if (filtered_pids) {
/* copy the current bits to the new max */
- pid = find_first_bit(filtered_pids->pids,
- filtered_pids->pid_max);
- while (pid < filtered_pids->pid_max) {
+ for_each_set_bit(pid, filtered_pids->pids,
+ filtered_pids->pid_max) {
set_bit(pid, pid_list->pids);
- pid = find_next_bit(filtered_pids->pids,
- filtered_pids->pid_max,
- pid + 1);
nr_pids++;
}
}