Commit 67f20b08 authored by Wei Yongjun's avatar Wei Yongjun Committed by Steven Rostedt

tracing: Using for_each_set_bit() to simplify trace_pid_write()

Using for_each_set_bit() to simplify the code.

Link: http://lkml.kernel.org/r/1467645004-11169-1-git-send-email-weiyj_lk@163.comSigned-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 501c2375
...@@ -517,13 +517,9 @@ int trace_pid_write(struct trace_pid_list *filtered_pids, ...@@ -517,13 +517,9 @@ int trace_pid_write(struct trace_pid_list *filtered_pids,
if (filtered_pids) { if (filtered_pids) {
/* copy the current bits to the new max */ /* copy the current bits to the new max */
pid = find_first_bit(filtered_pids->pids, for_each_set_bit(pid, filtered_pids->pids,
filtered_pids->pid_max); filtered_pids->pid_max) {
while (pid < filtered_pids->pid_max) {
set_bit(pid, pid_list->pids); set_bit(pid, pid_list->pids);
pid = find_next_bit(filtered_pids->pids,
filtered_pids->pid_max,
pid + 1);
nr_pids++; nr_pids++;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment