ASoC: SOF: ipc: clarify operator precedence
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 12 Jun 2019 16:57:05 +0000 (11:57 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 13 Jun 2019 18:54:38 +0000 (19:54 +0100)
Cppcheck complains about the following warning, fix by adding
parentheses

[sound/soc/sof/ipc.c:783]:
(style) Clarify calculation precedence for '&' and '?'.
[sound/soc/sof/ipc.c:785]:
(style) Clarify calculation precedence for '&' and '?'.
[sound/soc/sof/ipc.c:787]:
(style) Clarify calculation precedence for '&' and '?'.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc.c

index f3eb46bc808beb72ce1a880713fb16fe779716e7..20dfca9c93b76d27afece04094adc03f3a5c6eb0 100644 (file)
@@ -780,11 +780,11 @@ int snd_sof_ipc_valid(struct snd_sof_dev *sdev)
                         " lock debug: %s\n"
                         " lock vdebug: %s\n",
                         v->build, v->date, v->time,
-                        ready->flags & SOF_IPC_INFO_GDB ?
+                        (ready->flags & SOF_IPC_INFO_GDB) ?
                                "enabled" : "disabled",
-                        ready->flags & SOF_IPC_INFO_LOCKS ?
+                        (ready->flags & SOF_IPC_INFO_LOCKS) ?
                                "enabled" : "disabled",
-                        ready->flags & SOF_IPC_INFO_LOCKSV ?
+                        (ready->flags & SOF_IPC_INFO_LOCKSV) ?
                                "enabled" : "disabled");
        }