Skip to content

Commit

Permalink
ASoC: rcar: Use && instead of & for boolean expressions
Browse files Browse the repository at this point in the history
Sparse spits out the following warning:
	sound/soc/sh/rcar/gen.c:250:21: warning: dubious: x & !y

It does this because sometimes mixing boolean and bit-wise logic has not the
intended result. In this case we are fine, but replacing the bit-wise '&' with
the boolean '&&' silences the sparse warning. The generated code for both cases
is the same.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Aug 17, 2014
1 parent 7d1311b commit c8e6e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/sh/rcar/gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ rsnd_gen2_dma_addr(struct rsnd_priv *priv,
};

/* it shouldn't happen */
if (use_dvc & !use_src)
if (use_dvc && !use_src)
dev_err(dev, "DVC is selected without SRC\n");

/* use SSIU or SSI ? */
Expand Down

0 comments on commit c8e6e96

Please sign in to comment.