x86/fpu: Fix boolreturn.cocci warnings
authorkbuild test robot <[email protected]>
Sat, 23 Sep 2017 13:00:05 +0000 (15:00 +0200)
committerIngo Molnar <[email protected]>
Sun, 24 Sep 2017 11:04:35 +0000 (13:04 +0200)
arch/x86/kernel/fpu/xstate.c:931:9-10: WARNING: return of 0/1 in function 'xfeatures_mxcsr_quirk' with return type bool

 Return statements in functions returning bool should use true/false instead of 1/0.

Generated by: scripts/coccinelle/misc/boolreturn.cocci

Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Eric Biggers <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Yu-cheng Yu <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/20170306004553.GA25764@lkp-wsm-ep1
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/kernel/fpu/xstate.c

index 41c52256bdce6a5d46fc01fd177c1fba77286e1d..fda1109cc3553564e11040b1fc99b417e3a513d4 100644 (file)
@@ -929,12 +929,12 @@ int arch_set_user_pkey_access(struct task_struct *tsk, int pkey,
 static inline bool xfeatures_mxcsr_quirk(u64 xfeatures)
 {
        if (!(xfeatures & (XFEATURE_MASK_SSE|XFEATURE_MASK_YMM)))
-               return 0;
+               return false;
 
        if (xfeatures & XFEATURE_MASK_FP)
-               return 0;
+               return false;
 
-       return 1;
+       return true;
 }
 
 /*