All of lore.kernel.org
 help / color / mirror / Atom feed
* x86-64: Make uaccess_err unsigned
@ 2012-01-10 17:03 Bart Van Assche
  0 siblings, 0 replies; only message in thread
From: Bart Van Assche @ 2012-01-10 17:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andy Lutomirski, Ingo Molnar, richard -rw- weinberger,
	H. Peter Anvin

In commit 4fc3490114bb159bd4fff1b3c96f4320fe6fb08f uaccess_err
was changed from an int into a one bit bitfield. The values that
can be represented by a one bit bitfield are 0 and -1. Since
only values 0 and 1 are ever assigned to uaccess_err, make that
bitfield unsigned. Also change the one bit bitfield sig_on_uaccess
from signed into unsigned. This patch makes two annoying sparse
warnings about signed one bit bitfields disappear.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: richard -rw- weinberger <richard.weinberger@gmail.com>
Cc: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/include/asm/thread_info.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
index 7404715..ea3b445 100644
--- a/arch/x86/include/asm/thread_info.h
+++ b/arch/x86/include/asm/thread_info.h
@@ -40,8 +40,8 @@ struct thread_info {
 						*/
 	__u8			supervisor_stack[0];
 #endif
-	int			sig_on_uaccess_error:1;
-	int			uaccess_err:1;	/* uaccess failed */
+	unsigned		sig_on_uaccess_error:1;
+	unsigned		uaccess_err:1;	/* uaccess failed */
 };
 
 #define INIT_THREAD_INFO(tsk)			\
-- 
1.7.7



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-10 17:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 17:03 x86-64: Make uaccess_err unsigned Bart Van Assche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.