Skip to content
Commit ef85dffd authored by Mathieu Malaterre's avatar Mathieu Malaterre Committed by Michael Ellerman
Browse files

powerpc: Avoid comparison of unsigned long >= 0 in __access_ok()



Rewrite function-like macro into regular static inline function to
avoid a warning during macro expansion.

Fix warning (treated as error in W=1):
./arch/powerpc/include/asm/uaccess.h:52:35: error: comparison of unsigned expression >= 0 is always true
   (((size) == 0) || (((size) - 1) <= ((segment).seg - (addr)))))
                                   ^

Suggested-by: default avatarSegher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: default avatarMathieu Malaterre <malat@debian.org>
Reviewed-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 603b8922
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment