[alsa-devel] [PATCH 1/3] ASoC: mediatek: Add AFE platform driver
Paul Bolle
pebolle at tiscali.nl
Fri Jun 12 00:37:57 PDT 2015
On Fri, 2015-06-12 at 09:55 +0800, Koro Chen wrote:
> On Thu, 2015-06-11 at 09:03 +0200, Paul Bolle wrote:
> > (What does negating a bool twice do?)
> >
> Because bool actually can be unsigned char, although actually in this
> driver, the caller always passes "true" or "false" to this function.
bool is _Bool in the kernel (see include/linux/types.h). So whenever you
see a bool in the kernel you can assume it's either 0 or 1. Are there
any cases where this conveniently simple rule doesn't hold?
But here the discussion is moot, because as you say, the function will
only be passed false or true so we know "enable" is either 0 or 1 and
double negating will do nothing.
> Do you think if this is the case, should I still need to do !!?
So you should not, as it's confusing at best.
Thanks,
Paul Bolle
More information about the linux-arm-kernel
mailing list