diff options
| author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2012-12-17 19:01:21 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:17 -0500 |
| commit | 35367ab28d024ef026dbd797b4076c8f008ec08c (patch) | |
| tree | 0f4505be48bcf7de1136dde92365cbe9ab8bf55e /lib | |
| parent | b18888ab256f05626193be955a7a03f01d676f8c (diff) | |
lib: dynamic_debug: use kbasename()
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dynamic_debug.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index e7f7d993357..1db1fc66053 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c | |||
| @@ -62,13 +62,6 @@ static LIST_HEAD(ddebug_tables); | |||
| 62 | static int verbose = 0; | 62 | static int verbose = 0; |
| 63 | module_param(verbose, int, 0644); | 63 | module_param(verbose, int, 0644); |
| 64 | 64 | ||
| 65 | /* Return the last part of a pathname */ | ||
| 66 | static inline const char *basename(const char *path) | ||
| 67 | { | ||
| 68 | const char *tail = strrchr(path, '/'); | ||
| 69 | return tail ? tail+1 : path; | ||
| 70 | } | ||
| 71 | |||
| 72 | /* Return the path relative to source root */ | 65 | /* Return the path relative to source root */ |
| 73 | static inline const char *trim_prefix(const char *path) | 66 | static inline const char *trim_prefix(const char *path) |
| 74 | { | 67 | { |
| @@ -154,7 +147,7 @@ static int ddebug_change(const struct ddebug_query *query, | |||
| 154 | /* match against the source filename */ | 147 | /* match against the source filename */ |
| 155 | if (query->filename && | 148 | if (query->filename && |
| 156 | strcmp(query->filename, dp->filename) && | 149 | strcmp(query->filename, dp->filename) && |
| 157 | strcmp(query->filename, basename(dp->filename)) && | 150 | strcmp(query->filename, kbasename(dp->filename)) && |
| 158 | strcmp(query->filename, trim_prefix(dp->filename))) | 151 | strcmp(query->filename, trim_prefix(dp->filename))) |
| 159 | continue; | 152 | continue; |
| 160 | 153 | ||
