lkml.org 
[lkml]   [2008]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] ftrace: do not update max buffer with no users


On Wed, 12 Nov 2008, Andrew Morton wrote:
>
>
> This sort of thing:
>
> +#ifdef CONFIG_TRACER_MAX_TRACE
> if (current_trace && current_trace->print_max)
> iter->tr = &max_tr;
> else
> +#endif
> iter->tr = inode->i_private;
>
> is particularly regrettable.

Another answer is to not allocate it and check for NULL before using it.
But this would mean that I would have to find all the places that touch it
(the same as the ifdefs) and make sure they are safe.

The reason I picked the ifdefs was to guarantee that there were no users
if it was not being used.

-- Steve



\
 
 \ /
  Last update: 2008-11-13 03:49    [W:0.034 / U:2.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site