aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Louis Bossart <[email protected]>2020-09-23 11:05:10 +0300
committerMark Brown <[email protected]>2020-09-23 18:13:12 +0100
commitf1bf9a6b4e5ed3a764c1f5715a02f438b7c2889f (patch)
tree750363c78913961ac0257b4271b2524e71f7e4e5
parent50b18e4a2608e3897f3787eaa7dfa869b40d9923 (diff)
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 <[email protected]> Reviewed-by: Jaska Uimonen <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Signed-off-by: Kai Vehmanen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/intel/boards/sof_sdw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index 210b66d1f9a2..79c3c19317fe 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -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);
/*