Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1592868

[PATCH] x86/fpu: fix boolreturn.cocci warnings

From kbuild test robot <fengguang.wu@intel.com>
Newsgroups linux.kernel
Subject [PATCH] x86/fpu: fix boolreturn.cocci warnings
Date 2017-03-06 01:50 +0100
Message-ID <thP0B-8pE-1@gated-at.bofh.it> (permalink)
References <thP0B-8pE-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

CC: Rik van Riel <riel@redhat.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 xstate.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/arch/x86/kernel/fpu/xstate.c
+++ b/arch/x86/kernel/fpu/xstate.c
@@ -928,12 +928,12 @@ int arch_set_user_pkey_access(struct tas
 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;
 }
 
 /*

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] x86/fpu: fix boolreturn.cocci warnings kbuild test robot <fengguang.wu@intel.com> - 2017-03-06 01:50 +0100
  Re: [PATCH] x86/fpu: fix boolreturn.cocci warnings Ingo Molnar <mingo@kernel.org> - 2017-03-07 08:40 +0100
    Re: [PATCH] x86/fpu: fix boolreturn.cocci warnings Thomas Gleixner <tglx@linutronix.de> - 2017-03-07 09:40 +0100
      Re: [PATCH] x86/fpu: fix boolreturn.cocci warnings Ingo Molnar <mingo@kernel.org> - 2017-03-07 12:00 +0100
        Re: [PATCH] x86/fpu: fix boolreturn.cocci warnings Joe Perches <joe@perches.com> - 2017-03-07 13:10 +0100

csiph-web