mirror of
https://github.com/torvalds/linux.git
synced 2026-11-23 23:11:40 +00:00
tracing: Remove tracing_alloc_snapshot() when snapshot isn't defined
The function tracing_alloc_snapshot() is only used between trace.c and
trace_snapshot.c. When snapshot isn't configured, it's not used at all.
The stub function was defined as a global with no users and no prototype
causing build issues.
Remove the function when snapshot isn't configured as nothing is calling
it.
Also remove the EXPORT_SYMBOL_GPL() that was associated with it as it's
not used outside of the tracing subsystem which also includes any modules.
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Link: https://patch.msgid.link/20260328101946.2c4ef4a5@robin
Reported-by: Mark Brown <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Fixes: bade44fe54 (tracing: Move snapshot code out of trace.c and into trace_snapshot.c)
Signed-off-by: Steven Rostedt (Google) <[email protected]>
This commit is contained in:
committed by
Steven Rostedt (Google)
parent
bade44fe54
commit
724d197aae
@@ -810,19 +810,12 @@ int tracing_alloc_snapshot(void)
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tracing_alloc_snapshot);
|
||||
#else
|
||||
void tracing_snapshot(void)
|
||||
{
|
||||
WARN_ONCE(1, "Snapshot feature not enabled, but internal snapshot used");
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tracing_snapshot);
|
||||
int tracing_alloc_snapshot(void)
|
||||
{
|
||||
WARN_ONCE(1, "Snapshot feature not enabled, but snapshot allocation used");
|
||||
return -ENODEV;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tracing_alloc_snapshot);
|
||||
void tracing_snapshot_alloc(void)
|
||||
{
|
||||
/* Give warning */
|
||||
|
||||
Reference in New Issue
Block a user