History

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.

Steven Rostedt committed 7 months ago

Commit 724d1971 parent bade44f1 file · +0 −7Browse files

Unified · Split

kernel/trace/trace.c+0−7
@@ -810,19 +810,12 @@ int tracing_alloc_snapshot(void) · 809 unmodified lines
810 810
811 return ret;811 return ret;
812}812}
813EXPORT_SYMBOL_GPL(tracing_alloc_snapshot);
814#else813#else
815void tracing_snapshot(void)814void tracing_snapshot(void)
816{815{
817 WARN_ONCE(1, "Snapshot feature not enabled, but internal snapshot used");816 WARN_ONCE(1, "Snapshot feature not enabled, but internal snapshot used");
818}817}
819EXPORT_SYMBOL_GPL(tracing_snapshot);818EXPORT_SYMBOL_GPL(tracing_snapshot);
820int tracing_alloc_snapshot(void)
821{
822 WARN_ONCE(1, "Snapshot feature not enabled, but snapshot allocation used");
823 return -ENODEV;
824}
825EXPORT_SYMBOL_GPL(tracing_alloc_snapshot);
826void tracing_snapshot_alloc(void)819void tracing_snapshot_alloc(void)
827{820{
828 /* Give warning */821 /* Give warning */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t