[S390] sparse: fix sparse warnings in math-emu
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Sun, 30 Oct 2011 14:17:14 +0000 (15:17 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Sun, 30 Oct 2011 14:16:46 +0000 (15:16 +0100)
Fix three sparse warnings in math-emu / sysinfo:

arch/s390/kernel/sysinfo.c:448:17: error: return expression in void function
arch/s390/kernel/sysinfo.c:445:25: warning: shift too big (32) for type unsigned int
arch/s390/kernel/sysinfo.c:445:25: warning: shift too big (32) for type unsigned int

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/sfp-util.h
arch/s390/kernel/sysinfo.c

index 0addc6466d958aede3954efeb6b7071077344e6c..ca3f8814e3614050d5714843fea3a97c90db8bca 100644 (file)
@@ -72,6 +72,6 @@ extern unsigned long __udiv_qrnnd (unsigned int *, unsigned int,
 
 #define UDIV_NEEDS_NORMALIZATION 0
 
-#define abort() return 0
+#define abort() BUG()
 
 #define __BYTE_ORDER __BIG_ENDIAN
index 5c9e439bf3f6d21983ebbdaa706bb7cfb8e3a6a6..2a94b774695c069241ed413f50a0f9b8b183c656 100644 (file)
@@ -442,7 +442,7 @@ void s390_adjust_jiffies(void)
                 */
                FP_UNPACK_SP(SA, &fmil);
                if ((info->capability >> 23) == 0)
-                       FP_FROM_INT_S(SB, info->capability, 32, int);
+                       FP_FROM_INT_S(SB, (long) info->capability, 64, long);
                else
                        FP_UNPACK_SP(SB, &info->capability);
                FP_DIV_S(SR, SA, SB);