]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: lustre: Use proper constant types for L*_POISON values
authorGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 23 Aug 2013 15:46:48 +0000 (17:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Aug 2013 17:21:21 +0000 (10:21 -0700)
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>
drivers/staging/lustre/include/linux/libcfs/linux/kp30.h
drivers/staging/lustre/lustre/include/linux/lustre_lib.h

index 073f4d1f176e3a5b73256d77cb9c4b7c335534f0..c204b677796fd9375996bba03a0096013013636d 100644 (file)
@@ -187,9 +187,13 @@ extern int  lwt_snapshot (cfs_cycles_t *now, int *ncpu, int *total_size,
 # endif
 #endif
 
-# define LI_POISON ((int)0x5a5a5a5a5a5a5a5a)
-# define LL_POISON ((long)0x5a5a5a5a5a5a5a5a)
-# define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a)
+# define LI_POISON 0x5a5a5a5a
+#if BITS_PER_LONG > 32
+# define LL_POISON 0x5a5a5a5a5a5a5a5aL
+#else
+# define LL_POISON 0x5a5a5a5aL
+#endif
+# define LP_POISON ((void *)LL_POISON)
 
 /* this is a bit chunky */
 
index b2f755acadf6eb5596367a4744cd1c0029db908b..57f3b01d1a32670828bb0c4e28d218edb0c637dd 100644 (file)
 # include <linux/lustre_common.h>
 
 #ifndef LP_POISON
+# define LI_POISON 0x5a5a5a5a
 #if BITS_PER_LONG > 32
-# define LI_POISON ((int)0x5a5a5a5a5a5a5a5a)
-# define LL_POISON ((long)0x5a5a5a5a5a5a5a5a)
-# define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a)
+# define LL_POISON 0x5a5a5a5a5a5a5a5aL
 #else
-# define LI_POISON ((int)0x5a5a5a5a)
-# define LL_POISON ((long)0x5a5a5a5a)
-# define LP_POISON ((void *)(long)0x5a5a5a5a)
+# define LL_POISON 0x5a5a5a5aL
 #endif
+# define LP_POISON ((void *)LL_POISON)
 #endif
 
 /* This macro is only for compatibility reasons with older Linux Lustre user