Re: [PATCH] WARN_ONCE(): use bool for condition

From: Daniel Walker
Date: Sun Sep 27 2009 - 15:03:49 EST


On Sun, 2009-09-27 at 15:55 -0300, Cesar Eduardo Barros wrote:
> Daniel Walker escreveu:
> > On Sun, 2009-09-27 at 15:25 -0300, Cesar Eduardo Barros wrote:
> >> - int __ret_warn_on = !!(condition); \
> >> + bool __ret_warn_on = (condition); \
> >
> > Did you try it without removing the "!!" ? In my original email I tested
> > the path of least resistance, and I left the "!!" in there..
>
> Just tried, same result (it seems gcc can easily see past the double
> negation).

Ok, I'm not sure it's worth it then.. I'd prefer to move forward and
assume newer compilers, but most kernel hackers use older compilers ..
It's a pretty big size increase too..

Daniel

--
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/