All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [patch -next] x86: dubious one-bit signed bitfields
Date: Wed, 07 Dec 2011 06:38:49 +0000	[thread overview]
Message-ID: <20111207063848.GA14507@elgon.mountain> (raw)

It doesn't cause any runtime problems in this case, but bitfields should
be unsigned.  This file gets included a lot so it generates thousands of
Sparse warnings about dubious one-bit signed bitfields.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
index 0ecd1a9..114dca1 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 int		sig_on_uaccess_error:1;
+	unsigned int		uaccess_err:1;	/* uaccess failed */
 };
 
 #define INIT_THREAD_INFO(tsk)			\

             reply	other threads:[~2011-12-07  6:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07  6:38 Dan Carpenter [this message]
2011-12-07  7:39 ` [patch -next] x86: dubious one-bit signed bitfields H. Peter Anvin
2011-12-07  7:58 ` Dan Carpenter
2011-12-07 18:14 ` H. Peter Anvin
2011-12-15 13:45 ` Dan Carpenter
2011-12-15 16:38 ` Andy Lutomirski
2011-12-15 17:06 ` Dan Carpenter
2012-01-04  6:41 ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111207063848.GA14507@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.