[PATCH 0/2] ASoC: SOF: ipc4-topology: minor cleanup
Two updates on warnings reported by cppcheck.
Pierre-Louis Bossart (2): ASoC: SOF: ipc4-topology: clarify calculation precedence ASoC: SOF: ipc4-topology: remove useless assignment
sound/soc/sof/ipc4-topology.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
cppcheck warning:
sound/soc/sof/ipc4-topology.c:334:64: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] type = fw_module->man4_module_entry.type & SOF_IPC4_MODULE_DP ? 1 : 0; ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com Reviewed-by: Chao Song chao.song@intel.com Reviewed-by: Bard Liao yung-chuan.liao@linux.intel.com --- sound/soc/sof/ipc4-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index 64929dc9af397..1503e3c49e703 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -331,7 +331,7 @@ static int sof_ipc4_widget_setup_msg(struct snd_sof_widget *swidget, struct sof_ msg->extension = SOF_IPC4_MOD_EXT_PPL_ID(swidget->pipeline_id); msg->extension |= SOF_IPC4_MOD_EXT_CORE_ID(swidget->core);
- type = fw_module->man4_module_entry.type & SOF_IPC4_MODULE_DP ? 1 : 0; + type = (fw_module->man4_module_entry.type & SOF_IPC4_MODULE_DP) ? 1 : 0; msg->extension |= SOF_IPC4_MOD_EXT_DOMAIN(type);
return 0;
cppcheck warning:
sound/soc/sof/ipc4-topology.c:1533:12: style: Variable 'pipeline' is assigned a value that is never used. [unreadVariable] pipeline = pipe_widget->private; ^
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com Reviewed-by: Chao Song chao.song@intel.com Reviewed-by: Bard Liao yung-chuan.liao@linux.intel.com --- sound/soc/sof/ipc4-topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index 1503e3c49e703..66bbe101680cf 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -1447,7 +1447,6 @@ static int sof_ipc4_control_setup(struct snd_sof_dev *sdev, struct snd_sof_contr
static int sof_ipc4_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget) { - struct snd_sof_widget *pipe_widget = swidget->pipe_widget; struct sof_ipc4_pipeline *pipeline; struct sof_ipc4_msg *msg; void *ipc_data = NULL; @@ -1530,7 +1529,7 @@ static int sof_ipc4_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget swidget->widget->name); return ret; } - pipeline = pipe_widget->private; + msg->primary &= ~SOF_IPC4_MOD_INSTANCE_MASK; msg->primary |= SOF_IPC4_MOD_INSTANCE(swidget->instance_id);
On Tue, 20 Sep 2022 16:54:03 +0200, Pierre-Louis Bossart wrote:
Two updates on warnings reported by cppcheck.
Pierre-Louis Bossart (2): ASoC: SOF: ipc4-topology: clarify calculation precedence ASoC: SOF: ipc4-topology: remove useless assignment
sound/soc/sof/ipc4-topology.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
[...]
Applied to
broonie/sound.git for-next
Thanks!
[1/2] ASoC: SOF: ipc4-topology: clarify calculation precedence commit: 80d53171f85a8e97b2aa1d50045dbc1b5dd1bc97 [2/2] ASoC: SOF: ipc4-topology: remove useless assignment commit: 7738211bce7ae43624121fcf121aec87b2149af1
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (2)
-
Mark Brown
-
Pierre-Louis Bossart