To get the name of a file from a pathname we may use kbasename() helper.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
int i;
int remain;
int mask = msgdata->msg_mask;
- char *file = (char *)msgdata->msg_file;
+ const char *file = kbasename(msgdata->msg_file);
cfs_debug_limit_state_t *cdls = msgdata->msg_cdls;
- if (strchr(file, '/'))
- file = strrchr(file, '/') + 1;
-
tcd = cfs_trace_get_tcd();
/* cfs_trace_get_tcd() grabs a lock, which disables preemption and