x86/fpu: Fix boolreturn.cocci warnings
authorkbuild test robot <fengguang.wu@intel.com>
Sat, 23 Sep 2017 13:00:05 +0000 (15:00 +0200)
committerIngo Molnar <mingo@kernel.org>
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 <fengguang.wu@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Borislav Petkov <bp@suse.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Eric Biggers <ebiggers3@gmail.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Yu-cheng Yu <yu-cheng.yu@intel.com>
Cc: kbuild-all@01.org
Cc: tipbuild@zytor.com
Link: http://lkml.kernel.org/r/20170306004553.GA25764@lkp-wsm-ep1
Link: http://lkml.kernel.org/r/20170923130016.21448-23-mingo@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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;
 }
 
 /*