ipc4: logging: fix builds with mtrace and probes both disabled

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 1721f70426 ("logging: add logging through
probes").

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
Kai Vehmanen 2023-09-18 18:38:51 +03:00 committed by Kai Vehmanen
parent 7ca9a2eb8a
commit f3c290f14b
1 changed files with 11 additions and 2 deletions

View File

@ -158,9 +158,8 @@ int ipc4_logging_enable_logs(bool first_block,
return 0; return 0;
} }
#endif #elif CONFIG_LOG_BACKEND_SOF_PROBE
#ifdef CONFIG_LOG_BACKEND_SOF_PROBE
int ipc4_logging_enable_logs(bool first_block, int ipc4_logging_enable_logs(bool first_block,
bool last_block, bool last_block,
uint32_t data_offset_or_size, uint32_t data_offset_or_size,
@ -196,6 +195,16 @@ int ipc4_logging_enable_logs(bool first_block,
return 0; 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 #endif
int ipc4_logging_shutdown(void) int ipc4_logging_shutdown(void)