From: Pierre-Louis Bossart Date: Thu, 11 Mar 2021 00:43:28 +0000 (-0600) Subject: ASoC: wm8978: clarify expression X-Git-Tag: accepted/tizen/unified/20230118.172025~7091^2~1^2~190^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=729d42a4ab1a7bc9f4b5c37c57a3a4270333351f;p=platform%2Fkernel%2Flinux-rpi.git ASoC: wm8978: clarify expression cppcheck warning: sound/soc/codecs/wm8978.c:727:57: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] enum wm8978_sysclk_src current_clk_id = clking & 0x100 ? ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210311004332.120901-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index 4b5ecd1..7091e1a 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c @@ -724,7 +724,7 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream, /* Sampling rate mask = 0xe (for filters) */ u16 add_ctl = snd_soc_component_read(component, WM8978_ADDITIONAL_CONTROL) & ~0xe; u16 clking = snd_soc_component_read(component, WM8978_CLOCKING); - enum wm8978_sysclk_src current_clk_id = clking & 0x100 ? + enum wm8978_sysclk_src current_clk_id = (clking & 0x100) ? WM8978_PLL : WM8978_MCLK; unsigned int f_sel, diff, diff_best = INT_MAX; int i, best = 0;