* [patch] ASoC: rcar: some dubious one-bit signed bitfields
@ 2013-11-08 9:46 Dan Carpenter
2013-11-24 13:42 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-11-08 9:46 UTC (permalink / raw)
To: Liam Girdwood
Cc: Mark Brown, Jaroslav Kysela, Takashi Iwai, Kuninori Morimoto,
alsa-devel, kernel-janitors
Because these are signed they can either be 0 or -1 instead of 0 and 1
as intended. It doesn't cause a problem from what I can see, but it's
dangerous and Sparse complains:
sound/soc/sh/rcar/rsnd.h:177:25:
error: dubious one-bit signed bitfield
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 9e463e5..b5ac3a2 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -174,11 +174,11 @@ struct rsnd_dai {
struct rsnd_dai_stream playback;
struct rsnd_dai_stream capture;
- int clk_master:1;
- int bit_clk_inv:1;
- int frm_clk_inv:1;
- int sys_delay:1;
- int data_alignment:1;
+ unsigned int clk_master:1;
+ unsigned int bit_clk_inv:1;
+ unsigned int frm_clk_inv:1;
+ unsigned int sys_delay:1;
+ unsigned int data_alignment:1;
};
#define rsnd_dai_nr(priv) ((priv)->dai_nr)
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [patch] ASoC: rcar: some dubious one-bit signed bitfields
2013-11-08 9:46 [patch] ASoC: rcar: some dubious one-bit signed bitfields Dan Carpenter
@ 2013-11-24 13:42 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-11-24 13:42 UTC (permalink / raw)
To: Dan Carpenter
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Kuninori Morimoto,
alsa-devel, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 261 bytes --]
On Fri, Nov 08, 2013 at 12:46:53PM +0300, Dan Carpenter wrote:
> Because these are signed they can either be 0 or -1 instead of 0 and 1
> as intended. It doesn't cause a problem from what I can see, but it's
> dangerous and Sparse complains:
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-24 13:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-08 9:46 [patch] ASoC: rcar: some dubious one-bit signed bitfields Dan Carpenter
2013-11-24 13:42 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox