lkml.org 
[lkml]   [2012]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/31] perf, kvm: Support the intx/intx_cp modifiers in KVM arch perfmon emulation
> > -			eventsel & ARCH_PERFMON_EVENTSEL_INT);
> > + eventsel & ARCH_PERFMON_EVENTSEL_INT,
> > + !!(eventsel & HSW_INTX),
> > + !!(eventsel & HSW_INTX_CHECKPOINTED));
> > }
> >
>
> Those !! are !necessary, since the formal argument is a bool.

bool is 1 or 0, x & y with y > 1 is not 1 or 0.
iirc assigning > 1 to bool is undefined

So I think they are necessary.

Or did I misundersand you?

-Andi

--
ak@linux.intel.com -- Speaking for myself only


\
 
 \ /
  Last update: 2012-10-03 14:41    [W:0.177 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site