diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2021-02-18 16:19:20 -0600 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-10 13:06:57 +0000 |
commit | 47108a61b2f7f5a9eb13f88691f03147c4f9fc40 (patch) | |
tree | 40f9ece075a7fbcdf0294b9d07a042b69f1b1b8e /sound/soc/soc-topology.c | |
parent | 61456212e80ee274828d2d14fcc7b9364dfc0744 (diff) |
ASoC: soc-topology: clarify expression
cppcheck warning:
sound/soc/soc-topology.c:1676:52: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
flags & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES ? 1 : 0;
^
sound/soc/soc-topology.c:1680:55: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
flags & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS ?
^
sound/soc/soc-topology.c:1685:57: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
flags & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS ?
^
sound/soc/soc-topology.c:1768:52: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES ? 1 : 0;
^
sound/soc/soc-topology.c:1772:55: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS ?
^
sound/soc/soc-topology.c:1777:57: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS ?
^
sound/soc/soc-topology.c:1782:48: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
flags & SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP ?
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210218221921.88991-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r-- | sound/soc/soc-topology.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 1b0cd33a1348..73076d425efb 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1673,16 +1673,16 @@ static void set_dai_flags(struct snd_soc_dai_driver *dai_drv, { if (flag_mask & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES) dai_drv->symmetric_rate = - flags & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES ? 1 : 0; + (flags & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES) ? 1 : 0; if (flag_mask & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS) dai_drv->symmetric_channels = - flags & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS ? + (flags & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS) ? 1 : 0; if (flag_mask & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS) dai_drv->symmetric_sample_bits = - flags & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS ? + (flags & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS) ? 1 : 0; } @@ -1765,22 +1765,22 @@ static void set_link_flags(struct snd_soc_dai_link *link, { if (flag_mask & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES) link->symmetric_rate = - flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES ? 1 : 0; + (flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES) ? 1 : 0; if (flag_mask & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS) link->symmetric_channels = - flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS ? + (flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS) ? 1 : 0; if (flag_mask & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS) link->symmetric_sample_bits = - flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS ? + (flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS) ? 1 : 0; if (flag_mask & SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP) link->ignore_suspend = - flags & SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP ? - 1 : 0; + (flags & SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP) ? + 1 : 0; } /* create the FE DAI link */ |