Skip to content

Conversation

@lyakh
Copy link
Collaborator

@lyakh lyakh commented Aug 7, 2025

Zephyr adds function names to log entries automatically, remove excessive verbatim names globally

lyakh added 10 commits August 7, 2025 09:15
Zephyr adds function names to log entries by itself, no need to
specify them in format strings additionally.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove verbatim function names under src/schedule, src/math,
src/init, src/idc.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove verbatim function names for eq_fir.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove verbatim function names for asrc.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove verbatim function names for tensorflow, google, eq_iir.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove verbatim function names for aria, dcblock, smart_amp, copier,
selector.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove verbatim function names for up_down_mixer, mixin_mixout,
codec, crossover.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove verbatim function names for mfcc, rtnr, mux, src,
module_adapter.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove verbatim function names for pipeline, drc, igo_nr, volume,
multiband_drc, buffers, tdfb.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove verbatim function names for src/audio.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
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

This PR removes redundant function names from logging format strings across the codebase. The change leverages Zephyr's automatic function name logging capability to eliminate verbose duplication in log messages.

  • Removes function name prefixes from log format strings (e.g., "function(): message" becomes just "message")
  • Standardizes entry point logging to use "entry" instead of function names
  • Applies changes consistently across IPC, audio components, and scheduling modules

Reviewed Changes

Copilot reviewed 82 out of 82 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/schedule/*.c Remove function names from scheduler and domain logging
src/ipc/*.c Clean up IPC handler and helper function log messages
src/audio//.c Update audio component logging across volume, EQ, DRC, and other modules
src/audio/pipeline/*.c Simplify pipeline management logging
src/audio/module_adapter/*.c Update module adapter and codec logging


if (md->state != MODULE_IDLE) {
comp_err(dev, "module_process(): wrong state of comp_id %x, state %d",
comp_err(dev, "wrong state of comp_id %x, state %d",
Copy link

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider using the standardized 'comp %x' format instead of 'comp_id %x' for consistency with other error messages in the codebase.

Suggested change
comp_err(dev, "wrong state of comp_id %x, state %d",
comp_err(dev, "wrong state of comp %x, state %d",

Copilot uses AI. Check for mistakes.
@lgirdwood
Copy link
Member

@lrudyX not expecting build to fail as its passed in other tests ?

@lgirdwood lgirdwood merged commit 7ed4499 into thesofproject:main Aug 8, 2025
38 of 45 checks passed
@lyakh lyakh deleted the fnname branch August 8, 2025 10:52
@lyakh
Copy link
Collaborator Author

lyakh commented Aug 12, 2025

obviously, this PR wasn't created manually, and it wasn't perfect - it left a lot of those function names in logs behind. For reference I used

for i in $(find src/ -name "*.c"); do for j in $(grep "^[^[:space:]#/].*(.*[^;]$" $i | sed -e "s/.*[ \*]\([a-zA-Z_0-9]*\)(.*/\1/" | sed -e "s/^\([^[:space:]]*\)(.*/\1/"); do grep "\".*$j" $i; done; done

to find all those left-overs - only under sof/src - that line found 1300 of them (after I've removed a few more manually, so actually there are more). Some of them are false positives, but not many. To Be Continued.

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