Commit 18bcac6e authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: qcom: q6dsp-dai: clarify expression

cppcheck warning:

sound/soc/qcom/qdsp6/q6afe-dai.c:264:35: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
  tdm->slot_mask = (dai->id & 0x1 ? tx_mask : rx_mask) & cap_mask;
                                  ^
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210218222916.89809-4-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 64298706
......@@ -261,7 +261,7 @@ static int q6tdm_set_tdm_slot(struct snd_soc_dai *dai,
tdm->nslots_per_frame = slots;
tdm->slot_width = slot_width;
/* TDM RX dais ids are even and tx are odd */
tdm->slot_mask = (dai->id & 0x1 ? tx_mask : rx_mask) & cap_mask;
tdm->slot_mask = ((dai->id & 0x1) ? tx_mask : rx_mask) & cap_mask;
break;
default:
dev_err(dai->dev, "%s: invalid dai id 0x%x\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment