Skip to content

Conversation

@lyakh
Copy link
Collaborator

@lyakh lyakh commented May 30, 2025

Remove a check for an impossible condition and make code clearer. The check became redundant after 097405872507 ("module_adapter: Don't propagate ENOSPC and ENODATA error codes"). Presence of redundant checks makes code confusing.

@lyakh lyakh requested review from Copilot and softwarecki May 30, 2025 11:57
@lyakh lyakh requested review from jxstelter and ranj063 as code owners May 30, 2025 11:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Remove a superfluous check for impossible return codes in module_adapter_sink_source_copy, making the error path clearer.

  • Simplify error handling by removing the special-case suppression of -ENOSPC and -ENODATA
  • Log all non-zero returns from module_process_sink_src
Comments suppressed due to low confidence (1)

src/audio/module_adapter/module_adapter.c:994

  • [nitpick] Consider adding a unit or integration test to cover the error path in module_adapter_sink_source_copy, verifying that failures from module_process_sink_src are logged and returned as expected.
comp_err(dev, "module_adapter_sink_source_copy() process failed with error: %d",

Remove a check for an impossible condition and make code clearer. The
check became redundant after 097405872507 ("module_adapter: Don't
propagate ENOSPC and ENODATA error codes"). Presence of redundant
checks makes code confusing.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@lgirdwood lgirdwood merged commit a50bde5 into thesofproject:main Jun 9, 2025
44 of 48 checks passed
@lyakh lyakh deleted the adap branch June 10, 2025 06:34
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.

3 participants