Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: lustre: Use proper constant types for L*_POISON values

On 32-bit m68k, I get lots of warnings like:

warning: integer constant is too large for ‘long’ type

Switch the L*_POISON definitions from too-large constants and casts
to the proper constant types to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Geert Uytterhoeven and committed by
Greg Kroah-Hartman
917ea9a3 4e7fb829

+11 -9
+7 -3
drivers/staging/lustre/include/linux/libcfs/linux/kp30.h
··· 187 187 # endif 188 188 #endif 189 189 190 - # define LI_POISON ((int)0x5a5a5a5a5a5a5a5a) 191 - # define LL_POISON ((long)0x5a5a5a5a5a5a5a5a) 192 - # define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a) 190 + # define LI_POISON 0x5a5a5a5a 191 + #if BITS_PER_LONG > 32 192 + # define LL_POISON 0x5a5a5a5a5a5a5a5aL 193 + #else 194 + # define LL_POISON 0x5a5a5a5aL 195 + #endif 196 + # define LP_POISON ((void *)LL_POISON) 193 197 194 198 /* this is a bit chunky */ 195 199
+4 -6
drivers/staging/lustre/lustre/include/linux/lustre_lib.h
··· 53 53 # include <linux/lustre_common.h> 54 54 55 55 #ifndef LP_POISON 56 + # define LI_POISON 0x5a5a5a5a 56 57 #if BITS_PER_LONG > 32 57 - # define LI_POISON ((int)0x5a5a5a5a5a5a5a5a) 58 - # define LL_POISON ((long)0x5a5a5a5a5a5a5a5a) 59 - # define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a) 58 + # define LL_POISON 0x5a5a5a5a5a5a5a5aL 60 59 #else 61 - # define LI_POISON ((int)0x5a5a5a5a) 62 - # define LL_POISON ((long)0x5a5a5a5a) 63 - # define LP_POISON ((void *)(long)0x5a5a5a5a) 60 + # define LL_POISON 0x5a5a5a5aL 64 61 #endif 62 + # define LP_POISON ((void *)LL_POISON) 65 63 #endif 66 64 67 65 /* This macro is only for compatibility reasons with older Linux Lustre user