diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-06-19 03:40:31 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-06-21 16:02:08 -0400 |
commit | 9f98cd69c1517e05aa00ab843f054457cc3488c1 (patch) | |
tree | bb93d93058573185afec5723158a7d895b0ffcf7 /sound/soc | |
parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) |
ASoC: sh/fsi: Make one-bit bitfields unsigned
One-bit signed bitfields have two possible values: 0 and -1. This sometimes
leads to unexpected results (e.g. foo.bar = 1; foo.bar == 1 => false) which is
why it is recommended to make one-bit bitfields unsigned.
This fixes the following sparse warnings:
sound/soc/sh/fsi.c:267:25: error: dubious one-bit signed bitfield
sound/soc/sh/fsi.c:268:22: error: dubious one-bit signed bitfield
sound/soc/sh/fsi.c:269:20: error: dubious one-bit signed bitfield
sound/soc/sh/fsi.c:270:28: error: dubious one-bit signed bitfield
sound/soc/sh/fsi.c:271:26: error: dubious one-bit signed bitfield
sound/soc/sh/fsi.c:272:25: error: dubious one-bit signed bitfield
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/sh/fsi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 710a079a7377..2c95d85c69cb 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -264,12 +264,12 @@ struct fsi_priv { | |||
264 | u32 fmt; | 264 | u32 fmt; |
265 | 265 | ||
266 | int chan_num:16; | 266 | int chan_num:16; |
267 | int clk_master:1; | 267 | unsigned int clk_master:1; |
268 | int clk_cpg:1; | 268 | unsigned int clk_cpg:1; |
269 | int spdif:1; | 269 | unsigned int spdif:1; |
270 | int enable_stream:1; | 270 | unsigned int enable_stream:1; |
271 | int bit_clk_inv:1; | 271 | unsigned int bit_clk_inv:1; |
272 | int lr_clk_inv:1; | 272 | unsigned int lr_clk_inv:1; |
273 | }; | 273 | }; |
274 | 274 | ||
275 | struct fsi_stream_handler { | 275 | struct fsi_stream_handler { |