Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audio: chain_dma: fix incorrect format specifier for error codes #9774

Conversation

tmleman
Copy link
Contributor

@tmleman tmleman commented Jan 13, 2025

This patch corrects the format specifier used for printing error codes in the chain_dma.c file. The error codes are signed integers, but the format specifier used was %u, which is for unsigned integers. This caused negative error codes to be printed incorrectly as large positive values. The format specifier has been changed to %d to correctly print signed integers.

This is a cosmetic change that ensures error codes are accurately represented in the logs, aiding in debugging and analysis.

Before the Patch

[    3.322131] <err> chain_dma: chain_task_run: chain_task_run(): dma_reload() host error, ret = 4294967291

After the Patch

[    2.254653] <err> chain_dma: chain_task_run: chain_task_run(): dma_reload() host error, ret = -5

This patch corrects the format specifier used for printing error codes
in the chain_dma.c file. The error codes are signed integers, but the
format specifier used was `%u`, which is for unsigned integers. This
caused negative error codes to be printed incorrectly as large positive
values. The format specifier has been changed to `%d` to correctly print
signed integers.

This is a cosmetic change that ensures error codes are accurately
represented in the logs, aiding in debugging and analysis.

Signed-off-by: Tomasz Leman <[email protected]>
Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

@ujfalusi fyi - will help with debugging chain DMA !

@lgirdwood lgirdwood merged commit 287e4f9 into thesofproject:main Jan 14, 2025
43 of 49 checks passed
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