Re: [PATCH 06/31] perf, kvm: Support the intx/intx_cp modifiers inKVM arch perfmon emulation

From: Andi Kleen
Date: Wed Oct 03 2012 - 08:11:55 EST


> > - 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@xxxxxxxxxxxxxxx -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/