public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] sound: pcxhr.h replace signed one-bit bitfields
Date: Thu, 19 Feb 2009 11:58:37 -0800	[thread overview]
Message-ID: <1235073517.4377.5.camel@brick> (raw)

The usage and comments make it clear values of 1/0 were intended
rather than -1/0

Noticed by sparse:
sound/pci/pcxhr/pcxhr.h:100:20: error: dubious one-bit signed bitfield
sound/pci/pcxhr/pcxhr.h:101:22: error: dubious one-bit signed bitfield
sound/pci/pcxhr/pcxhr.h:102:24: error: dubious one-bit signed bitfield
sound/pci/pcxhr/pcxhr.h:103:21: error: dubious one-bit signed bitfield
sound/pci/pcxhr/pcxhr.h:104:25: error: dubious one-bit signed bitfield
sound/pci/pcxhr/pcxhr.h:105:20: error: dubious one-bit signed bitfield

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
 sound/pci/pcxhr/pcxhr.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/pci/pcxhr/pcxhr.h b/sound/pci/pcxhr/pcxhr.h
index ac9c3b3..a661a18 100644
--- a/sound/pci/pcxhr/pcxhr.h
+++ b/sound/pci/pcxhr/pcxhr.h
@@ -97,12 +97,12 @@ struct pcxhr_mgr {
 	int capture_chips;
 	int fw_file_set;
 	int firmware_num;
-	int is_hr_stereo:1;
-	int board_has_aes1:1;	/* if 1 board has AES1 plug and SRC */
-	int board_has_analog:1;	/* if 0 the board is digital only */
-	int board_has_mic:1;	/* if 1 the board has microphone input */
-	int board_aes_in_192k:1;/* if 1 the aes input plugs do support 192kHz */
-	int mono_capture:1;	/* if 1 the board does mono capture */
+	unsigned int is_hr_stereo:1;
+	unsigned int board_has_aes1:1;	/* if 1 board has AES1 plug and SRC */
+	unsigned int board_has_analog:1;	/* if 0 the board is digital only */
+	unsigned int board_has_mic:1;	/* if 1 the board has microphone input */
+	unsigned int board_aes_in_192k:1;/* if 1 the aes input plugs do support 192kHz */
+	unsigned int mono_capture:1;	/* if 1 the board does mono capture */
 
 	struct snd_dma_buffer hostport;
 
-- 
1.6.2.rc1.175.g96b8a




             reply	other threads:[~2009-02-19 19:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-19 19:58 Harvey Harrison [this message]
2009-02-20  7:43 ` [PATCH] sound: pcxhr.h replace signed one-bit bitfields Takashi Iwai

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=1235073517.4377.5.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox