Re: [PATCH -next] static-keys: Better error checking for static_key_enable/disable

2015-08-27 Thread Peter Zijlstra
On Thu, Aug 27, 2015 at 04:57:13PM -0400, Chuck Ebbert wrote: > The warnings for static_key_enable/disable don't catch common > errors. For example, starting with a default enabled key and > calling enable doesn't cause a warning until the next enable > or disable. Check explicitly for zero or one

[PATCH -next] static-keys: Better error checking for static_key_enable/disable

2015-08-27 Thread Chuck Ebbert
The warnings for static_key_enable/disable don't catch common errors. For example, starting with a default enabled key and calling enable doesn't cause a warning until the next enable or disable. Check explicitly for zero or one instead of allowing both values in every case. Generated code should