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>
This commit is contained in:
Pierre-Louis Bossart 2021-02-18 16:19:20 -06:00 committed by Mark Brown
parent 61456212e8
commit 47108a61b2
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

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