On Thu, Jan 19, 2017 at 01:07:52AM -0700, Jan Beulich wrote: > >>> On 18.01.17 at 22:47, <eric.devol...@oracle.com> wrote: > > The use of test_bit() can also return EPERM, so the > > return value from test_bit() must be checked to > > ensure that kexec_status() always returns 0, 1 or > > -1, per the public header description. > > Well, no, and this is rather disappointing. Did you look at the test_bit() > implementation, as I did suggest you do? As said before, it returns > non-zero if the bit was set, and zero if it was clear. It won't ever > return -EPERM (it was only your original code which converted the > meaning of ~0 to -EPERM). Hence the result here isn't much better > than the original.
Errr... It looks that I have checked incorrect test_bit() implementation and my Reviewed-by was skewed. Sorry about that. Jan is right. You must use "!!" instead of "... == 1". And commit message is also incorrect... Daniel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel