Remove the custom implementation of the functionality similar to kbasename().
Unified · Split
| @@ -62,13 +62,6 @@ static LIST_HEAD(ddebug_tables); · 61 unmodified lines | |||
| 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, · 79 unmodified lines | |||
| 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 | ||