Explorar o código

ASoC: rcar: Use && instead of & for boolean expressions

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>
Lars-Peter Clausen %!s(int64=11) %!d(string=hai) anos
pai
achega
c8e6e96073
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      sound/soc/sh/rcar/gen.c

+ 1 - 1
sound/soc/sh/rcar/gen.c

@@ -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 ? */