diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-02-13 12:43:56 -0500 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-02-16 16:25:12 -0500 |
commit | 265c831cb03d533cbe159af45798ac9fef534260 (patch) | |
tree | d00548a034b3092f8f42086f348c70b784c1df5e /sound/core | |
parent | 0c75a3ed633419d75d823d5dcb05d42924c6ae61 (diff) |
ftrace: add do_for_each_ftrace_rec and while_for_each_ftrace_rec
Impact: clean up
To iterate over all the functions that dynamic trace knows about
it requires two for loops. One to iterate over the pages and the
other to iterate over the records within the page.
There are several duplications of these loops in ftrace.c. This
patch creates the macros do_for_each_ftrace_rec and
while_for_each_ftrace_rec to handle this logic, and removes the
duplicate code.
While making this change, I also discovered and fixed a small
bug that one of the iterations should exit the loop after it found the
record it was searching for. This used a break when it should have
used a goto, since there were two loops it needed to break out
from. No real harm was done by this bug since it would only continue
to search the other records, and the code was in a slow path anyway.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'sound/core')
0 files changed, 0 insertions, 0 deletions