summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320dac33.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2021-03-12 12:22:45 -0600
committerMark Brown <broonie@kernel.org>2021-03-18 13:50:54 +0000
commit39e69cef0aa9f6897161a11ed84362f5805c43fd (patch)
tree0858b03f081e7df8f5229f8ca4b0e56709e3844a /sound/soc/codecs/tlv320dac33.c
parentffab1215bdbea7358051f8dd87b1240e4c6d56e6 (diff)
downloadlinux-39e69cef0aa9f6897161a11ed84362f5805c43fd.tar.gz
linux-39e69cef0aa9f6897161a11ed84362f5805c43fd.tar.bz2
linux-39e69cef0aa9f6897161a11ed84362f5805c43fd.zip
ASoC: tlv320dac33: clarify expression
cppcheck warning: sound/soc/codecs/tlv320dac33.c:1074:43: style: Clarify calculation precedence for '%' and '?'. [clarifyCalculation] (dac33->alarm_threshold % period_size ? ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210312182246.5153-23-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/tlv320dac33.c')
-rw-r--r--sound/soc/codecs/tlv320dac33.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index d905e03aaec7..48572d66cb3b 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -1071,7 +1071,7 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream,
*/
dac33->nsample = period_size *
((dac33->alarm_threshold / period_size) +
- (dac33->alarm_threshold % period_size ?
+ ((dac33->alarm_threshold % period_size) ?
1 : 0));
else if (period_size > nsample_limit)
dac33->nsample = nsample_limit;