lkml.org 
[lkml]   [2012]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCHv2 2/6] lib: dynamic_debug: reuse kbasename()
    Date
    Remove the custom implementation of the functionality similar to kbasename().

    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Jason Baron <jbaron@redhat.com>
    ---
    lib/dynamic_debug.c | 9 +--------
    1 file changed, 1 insertion(+), 8 deletions(-)

    diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
    index e7f7d99..1db1fc6 100644
    --- a/lib/dynamic_debug.c
    +++ b/lib/dynamic_debug.c
    @@ -62,13 +62,6 @@ static LIST_HEAD(ddebug_tables);
    static int verbose = 0;
    module_param(verbose, int, 0644);

    -/* Return the last part of a pathname */
    -static inline const char *basename(const char *path)
    -{
    - const char *tail = strrchr(path, '/');
    - return tail ? tail+1 : path;
    -}
    -
    /* Return the path relative to source root */
    static inline const char *trim_prefix(const char *path)
    {
    @@ -154,7 +147,7 @@ static int ddebug_change(const struct ddebug_query *query,
    /* match against the source filename */
    if (query->filename &&
    strcmp(query->filename, dp->filename) &&
    - strcmp(query->filename, basename(dp->filename)) &&
    + strcmp(query->filename, kbasename(dp->filename)) &&
    strcmp(query->filename, trim_prefix(dp->filename)))
    continue;

    --
    1.7.10.4


    \
     
     \ /
      Last update: 2012-10-03 11:41    [W:2.130 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site