lkml.org 
[lkml]   [2008]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: Re: [PATCH] Breaks the redundant loop in kernel/marker.c
    Ingo Molnar wrote:
    > hm, could you describe the necessity of this patch some more? This has
    > the change to change behavior, which might even be a bugfix: is there
    > any chance that the closure-loop in the e->ptype != NULL branch does not
    > exit? Before your patch we'd continue the iteration - which _probably_
    > does not lead to any more matches (e->name is supposed to be unique).

    Because e->name is unique in list, we don't need to continue the iteration
    after matched.
    This is a cleanup.

    Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
    ---
    kernel/marker.c | 3 +--
    1 files changed, 1 insertions(+), 2 deletions(-)

    diff --git a/kernel/marker.c b/kernel/marker.c
    index 7d1faec..2c3172d 100644
    --- a/kernel/marker.c
    +++ b/kernel/marker.c
    @@ -836,8 +836,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;
    @@ -849,6 +847,7 @@ void *marker_get_private_data(const char *name, marker_probe_func *probe,
    return closure[i].probe_private;
    }
    }
    + break;
    }
    }
    return ERR_PTR(-ENOENT);
    --
    1.5.5.3



    \
     
     \ /
      Last update: 2008-10-20 09:21    [W:3.903 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site