lkml.org 
[lkml]   [2017]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 19/40] tracing: Account for variables in named trigger compatibility
From
Date
On Thu, 2017-09-07 at 12:40 -0400, Steven Rostedt wrote:
> On Tue, 5 Sep 2017 16:57:31 -0500
> Tom Zanussi <tom.zanussi@linux.intel.com> wrote:
>
> > @@ -1786,6 +1786,12 @@ static bool hist_trigger_match(struct event_trigger_data *data,
> > return false;
> > if (key_field->is_signed != key_field_test->is_signed)
> > return false;
> > + if ((key_field->var.name && !key_field_test->var.name) ||
> > + (!key_field->var.name && key_field_test->var.name))
> > + return false;
>
> Short cut:
>
> if (!!key_field->var.name != !!key_field_test->var.name)
> return false;
>

Nice!

> > + if ((key_field->var.name && key_field_test->var.name) &&
>
> Only need to test if key_field->var.name, as the previous if statement
> would exit out if key_field_test->var.name is false.
>

OK, will change, thanks.

Tom


\
 
 \ /
  Last update: 2017-09-07 19:03    [W:0.116 / U:10.776 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site