Skip to content

Commit

Permalink
ipc4: logging: fix builds with mtrace and probes both disabled
Browse files Browse the repository at this point in the history
If both SOF_PROBES and MTRACE logging backends are disabled at build
time, IPC4 build failed due to undefined ipc4_logging_enable_logs().
Fixes a bug in commit 1721f70 ("logging: add logging through
probes").

Signed-off-by: Kai Vehmanen <[email protected]>
  • Loading branch information
kv2019i committed Sep 18, 2023
1 parent 3b31adc commit 72f87b3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/ipc/ipc4/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,8 @@ int ipc4_logging_enable_logs(bool first_block,
return 0;
}

#endif
#elif CONFIG_LOG_BACKEND_SOF_PROBE

#ifdef CONFIG_LOG_BACKEND_SOF_PROBE
int ipc4_logging_enable_logs(bool first_block,
bool last_block,
uint32_t data_offset_or_size,
Expand Down Expand Up @@ -196,6 +195,16 @@ int ipc4_logging_enable_logs(bool first_block,
return 0;
}

#else /* unsupported logging method */

int ipc4_logging_enable_logs(bool first_block,
bool last_block,
uint32_t data_offset_or_size,
const char *data)
{
return IPC4_UNKNOWN_MESSAGE_TYPE;
}

#endif

int ipc4_logging_shutdown(void)
Expand Down

0 comments on commit 72f87b3

Please sign in to comment.