提交 5d9881ea 编写于 作者: Z Zhaolei 提交者: Ingo Molnar

markers: break the redundant loop in kernel/marker.c

Impact: cleanup, no functionality changed

Because e->name is unique in list, we don't need to continue the iteration
after matched.
Signed-off-by: NZhao Lei <zhaolei@cn.fujitsu.com>
Acked-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 4de62748
......@@ -825,8 +825,6 @@ void *marker_get_private_data(const char *name, marker_probe_func *probe,
if (!e->ptype) {
if (num == 0 && e->single.func == probe)
return e->single.probe_private;
else
break;
} else {
struct marker_probe_closure *closure;
int match = 0;
......@@ -838,6 +836,7 @@ void *marker_get_private_data(const char *name, marker_probe_func *probe,
return closure[i].probe_private;
}
}
break;
}
}
return ERR_PTR(-ENOENT);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册