lkml.org 
[lkml]   [2012]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/3] Fix trailing whitespace in trace.h
From
Date
On Tue, 2012-10-02 at 20:53 +0900, YAMANE Toshiaki wrote: 
> fixed below checkpatch error.
>
> -ERROR: trailing whitespace
>
> Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
> ---
> drivers/staging/rts_pstor/trace.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rts_pstor/trace.h b/drivers/staging/rts_pstor/trace.h
> index cf60a1b..740999c 100644
> --- a/drivers/staging/rts_pstor/trace.h
> +++ b/drivers/staging/rts_pstor/trace.h
> @@ -39,7 +39,7 @@ static inline char *filename(char *path)
> while (*ptr != '\0') {
> if ((*ptr == '\\') || (*ptr == '/'))
> path = ptr + 1;
> -
> +
> ptr++;
> }

For me it seems total filename() function could be squeezed to just strrchr(path, '/') + 1;
Moreover there is already basename() in the lib/dynamic_debug.c you
could rename, export and reuse.


--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy


\
 
 \ /
  Last update: 2012-10-02 15:01    [W:1.699 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site