Messages in this thread | | | Date | Thu, 5 Oct 2017 16:55:08 +0200 | From | Borislav Petkov <> | Subject | Re: [PATCH] x86/alternatives: Fix alt_max_short macro to really be a max() |
| |
On Thu, Oct 05, 2017 at 02:35:33PM +0200, Mathias Krause wrote: > Oh, btw., quoting its counter part from arch/x86/include/asm/alternative-asm.h: > > /* > * max without conditionals. Idea adapted from: > * http://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax > */ > #define alt_max_short(a, b) ((a) ^ (((a) ^ (b)) & -(-((a) < (b))))) > > Note the "<"! ...comment is wrong, though the implementation works!
Ok, please fix that comment in alternative-asm.h and add
Reviewed-and-tested-by: Borislav Petkov <bp@suse.de>
to v2 before sending it.
Thanks!
-- Regards/Gruss, Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
| |