| From a8211a29676269f3b5694eb52fa8400c669c6014 Mon Sep 17 00:00:00 2001 |
| From: Sasha Levin <sashal@kernel.org> |
| Date: Fri, 4 Mar 2022 14:57:32 -0600 |
| Subject: ASoC: SOF: debug: clarify operator precedence |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
| |
| [ Upstream commit 9188812539d1d9a13dac690c95ec657259859ba4 ] |
| |
| cppcheck warning: |
| |
| for '&' and '?'. [clarifyCalculation] |
| char *level = flags & SOF_DBG_DUMP_OPTIONAL ? KERN_DEBUG : KERN_ERR; |
| ^ |
| |
| sound/soc/sof/debug.c:398:46: style: Clarify calculation precedence |
| Reviewed-by: Ranjani Sridharan <ranjani.sridharan@intel.com> |
| Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> |
| Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
| Link: https://lore.kernel.org/r/20220304205733.62233-10-pierre-louis.bossart@linux.intel.com |
| Signed-off-by: Mark Brown <broonie@kernel.org> |
| Signed-off-by: Sasha Levin <sashal@kernel.org> |
| --- |
| sound/soc/sof/debug.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c |
| index 6d6757075f7c..e755c0c5f86c 100644 |
| --- a/sound/soc/sof/debug.c |
| +++ b/sound/soc/sof/debug.c |
| @@ -960,7 +960,7 @@ static void snd_sof_dbg_print_fw_state(struct snd_sof_dev *sdev, const char *lev |
| |
| void snd_sof_dsp_dbg_dump(struct snd_sof_dev *sdev, const char *msg, u32 flags) |
| { |
| - char *level = flags & SOF_DBG_DUMP_OPTIONAL ? KERN_DEBUG : KERN_ERR; |
| + char *level = (flags & SOF_DBG_DUMP_OPTIONAL) ? KERN_DEBUG : KERN_ERR; |
| bool print_all = sof_debug_check_flag(SOF_DBG_PRINT_ALL_DUMPS); |
| |
| if (flags & SOF_DBG_DUMP_OPTIONAL && !print_all) |
| -- |
| 2.34.1 |
| |