From cdc7810e94eb4aa103f3bbb3738f712447ffcf31 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 17 Dec 2012 16:01:21 -0800 Subject: [PATCH] --- yaml --- r: 346402 b: refs/heads/master c: 35367ab28d024ef026dbd797b4076c8f008ec08c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/lib/dynamic_debug.c | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index b788031e1b8c..b64fdfcf2498 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b18888ab256f05626193be955a7a03f01d676f8c +refs/heads/master: 35367ab28d024ef026dbd797b4076c8f008ec08c diff --git a/trunk/lib/dynamic_debug.c b/trunk/lib/dynamic_debug.c index e7f7d993357a..1db1fc660538 100644 --- a/trunk/lib/dynamic_debug.c +++ b/trunk/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;