lkml.org 
[lkml]   [2013]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/2] tracing: Shrink the size of struct ftrace_event_field
From
Date
On Sat, 2013-07-27 at 10:45 +0200, Borislav Petkov wrote:
>
> > > + field->filter_type = filter_type;
> > > field->offset = offset;
> > > field->size = size;
> > > - field->is_signed = is_signed;
> > > + field->is_signed = !!is_signed;
> > > +
> > > + VERIFY_SIZE(filter_type);
> > > + VERIFY_SIZE(offset);
> > > + VERIFY_SIZE(size);
>
> Isn't this wrap-a-macro-with-another-more-obscure-macro not a bit too
> much?
>
> I mean,
> WARN_ON(filter_type > field->filter_type)
>
> is much more readable than VERIFY_SIZE IMO.

Fair enough. My first version of the test was a bit more complex, and
then I simplified it, but kept the macro. Either is fine to me. But
yeah, I can see the point that the test isn't that complex, and there's
only three tests. If there were more or the test a bit more complex,
then I would definitely want the macro.

But you know me. I LOVE macros!

-- Steve




\
 
 \ /
  Last update: 2013-07-27 14:01    [W:0.053 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site