]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: sof_sdw: remove ternary operator
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 23 Sep 2020 08:05:10 +0000 (11:05 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 23 Sep 2020 17:13:12 +0000 (18:13 +0100)
commit96b32342f481d4b7cfe68af86692b1dee5a079cd
tree750363c78913961ac0257b4271b2524e71f7e4e5
parentcca9be00470e054db4d5c2c36aacf40d0999c6f6
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>
sound/soc/intel/boards/sof_sdw.c