Skip to content

Conversation

@ujfalusi
Copy link
Contributor

The original code confuses static code analyzers since it was relying on the fact that we have the 2x input and 1x output pin config in adjacent position in smart_amp_data struct similarly to the extended module configuration.

While it works, it is not a good practice.

Split the copy of input and output pin formats to make the code obvious and error prone.

Fixes: bcc1407 ("smart_amp_test: Split the module config and blob receiving for IPC4")
Reported-by: Andrey Borisovich andrey.borisovich@intel.com

The original code confuses static code analyzers since it was relying on
the fact that we have the 2x input and 1x output pin config in adjacent
position in smart_amp_data struct similarly to the extended module
configuration.

While it works, it is not a good practice.

Split the copy of input and output pin formats to make the code obvious and
error prone.

Fixes: bcc1407 ("smart_amp_test: Split the module config and blob receiving for IPC4")
Reported-by: Andrey Borisovich <andrey.borisovich@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
@andrula-song
Copy link
Contributor

I have a PR #7588 about this too, which one do you like to keep?

@ranj063
Copy link
Collaborator

ranj063 commented May 12, 2023

I have a PR #7588 about this too, which one do you like to keep?

@ujfalusi Andrula beat you to this already. Lets go with #7588

@ujfalusi ujfalusi closed this May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants