Skip to content

Commit

Permalink
markers: break the redundant loop in kernel/marker.c
Browse files Browse the repository at this point in the history
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: Zhao Lei <zhaolei@cn.fujitsu.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Zhaolei authored and Ingo Molnar committed Oct 27, 2008
1 parent 4de6274 commit 5d9881e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/marker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 5d9881e

Please sign in to comment.