forked from luck/tmp_suning_uos_patched
ASoC: Intel: sof_sdw: remove ternary operator
cppcheck reports the following warning: sound/soc/intel/boards/sof_sdw.c:866:46: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] hdmi_num = sof_sdw_quirk & SOF_SDW_TGL_HDMI ? ^ There's no reason to use the ternary operator here, we might as well use a regular if-else construct. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Jaska Uimonen <jaska.uimonen@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200923080514.3242858-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
50b18e4a26
commit
f1bf9a6b4e
|
@ -863,8 +863,10 @@ static int sof_card_dai_links_create(struct device *dev,
|
|||
for (i = 0; i < ARRAY_SIZE(codec_info_list); i++)
|
||||
codec_info_list[i].amp_num = 0;
|
||||
|
||||
hdmi_num = sof_sdw_quirk & SOF_SDW_TGL_HDMI ?
|
||||
SOF_TGL_HDMI_COUNT : SOF_PRE_TGL_HDMI_COUNT;
|
||||
if (sof_sdw_quirk & SOF_SDW_TGL_HDMI)
|
||||
hdmi_num = SOF_TGL_HDMI_COUNT;
|
||||
else
|
||||
hdmi_num = SOF_PRE_TGL_HDMI_COUNT;
|
||||
|
||||
ssp_mask = SOF_SSP_GET_PORT(sof_sdw_quirk);
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user