[PATCH 14/18] ALSA: atmel: ac97: clarify operator precedence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix cppcheck warnings:

sound/atmel/ac97c.c:478:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
    casr & AC97C_CSR_OVRUN   ? " OVRUN"   : "",
                             ^
sound/atmel/ac97c.c:479:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
    casr & AC97C_CSR_RXRDY   ? " RXRDY"   : "",
                             ^
sound/atmel/ac97c.c:480:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
    casr & AC97C_CSR_UNRUN   ? " UNRUN"   : "",
                             ^
sound/atmel/ac97c.c:481:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
    casr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "",
                             ^
sound/atmel/ac97c.c:482:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
    casr & AC97C_CSR_TXRDY   ? " TXRDY"   : "",
                             ^
sound/atmel/ac97c.c:524:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
    cosr & AC97C_CSR_OVRUN   ? " OVRUN"   : "",
                             ^
sound/atmel/ac97c.c:525:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
    cosr & AC97C_CSR_RXRDY   ? " RXRDY"   : "",
                             ^
sound/atmel/ac97c.c:526:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
    cosr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "",
                             ^
sound/atmel/ac97c.c:527:30: style: Clarify calculation precedence for
'&' and '?'. [clarifyCalculation]
    cosr & AC97C_CSR_TXRDY   ? " TXRDY"   : "",
                             ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
---
 sound/atmel/ac97c.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index 1006458f7f85..66ecbd4d034e 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -475,12 +475,12 @@ static irqreturn_t atmel_ac97c_interrupt(int irq, void *dev)
 		struct snd_pcm_runtime *runtime;
 		int offset, next_period, block_size;
 		dev_dbg(&chip->pdev->dev, "channel A event%s%s%s%s%s%s\n",
-				casr & AC97C_CSR_OVRUN   ? " OVRUN"   : "",
-				casr & AC97C_CSR_RXRDY   ? " RXRDY"   : "",
-				casr & AC97C_CSR_UNRUN   ? " UNRUN"   : "",
-				casr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "",
-				casr & AC97C_CSR_TXRDY   ? " TXRDY"   : "",
-				!casr                    ? " NONE"    : "");
+			(casr & AC97C_CSR_OVRUN)   ? " OVRUN"   : "",
+			(casr & AC97C_CSR_RXRDY)   ? " RXRDY"   : "",
+			(casr & AC97C_CSR_UNRUN)   ? " UNRUN"   : "",
+			(casr & AC97C_CSR_TXEMPTY) ? " TXEMPTY" : "",
+			(casr & AC97C_CSR_TXRDY)   ? " TXRDY"   : "",
+			!casr                      ? " NONE"    : "");
 		if ((casr & camr) & AC97C_CSR_ENDTX) {
 			runtime = chip->playback_substream->runtime;
 			block_size = frames_to_bytes(runtime, runtime->period_size);
@@ -521,11 +521,11 @@ static irqreturn_t atmel_ac97c_interrupt(int irq, void *dev)
 
 	if (sr & AC97C_SR_COEVT) {
 		dev_info(&chip->pdev->dev, "codec channel event%s%s%s%s%s\n",
-				cosr & AC97C_CSR_OVRUN   ? " OVRUN"   : "",
-				cosr & AC97C_CSR_RXRDY   ? " RXRDY"   : "",
-				cosr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "",
-				cosr & AC97C_CSR_TXRDY   ? " TXRDY"   : "",
-				!cosr                    ? " NONE"    : "");
+			 (cosr & AC97C_CSR_OVRUN)   ? " OVRUN"   : "",
+			 (cosr & AC97C_CSR_RXRDY)   ? " RXRDY"   : "",
+			 (cosr & AC97C_CSR_TXEMPTY) ? " TXEMPTY" : "",
+			 (cosr & AC97C_CSR_TXRDY)   ? " TXRDY"   : "",
+			 !cosr                      ? " NONE"    : "");
 		retval = IRQ_HANDLED;
 	}
 
-- 
2.25.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux