public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ben Dooks <ben.dooks@codethink.co.uk>
Subject: [for-next][PATCH 19/33] tracing: Make internal ftrace events static
Date: Thu, 14 Nov 2019 13:17:53 -0500	[thread overview]
Message-ID: <20191114181826.145493743@goodmis.org> (raw)
In-Reply-To: 20191114181734.067922168@goodmis.org

From: Ben Dooks <ben.dooks@codethink.co.uk>

The event_class_ftrace_##call and event_##call do not seem
to be used outside of trace_export.c so make them both static
to avoid a number of sparse warnings:

kernel/trace/trace_entries.h:59:1: warning: symbol 'event_class_ftrace_function' was not declared. Should it be static?
kernel/trace/trace_entries.h:59:1: warning: symbol '__event_function' was not declared. Should it be static?
kernel/trace/trace_entries.h:77:1: warning: symbol 'event_class_ftrace_funcgraph_entry' was not declared. Should it be static?
kernel/trace/trace_entries.h:77:1: warning: symbol '__event_funcgraph_entry' was not declared. Should it be static?
kernel/trace/trace_entries.h:93:1: warning: symbol 'event_class_ftrace_funcgraph_exit' was not declared. Should it be static?
kernel/trace/trace_entries.h:93:1: warning: symbol '__event_funcgraph_exit' was not declared. Should it be static?
kernel/trace/trace_entries.h:129:1: warning: symbol 'event_class_ftrace_context_switch' was not declared. Should it be static?
kernel/trace/trace_entries.h:129:1: warning: symbol '__event_context_switch' was not declared. Should it be static?
kernel/trace/trace_entries.h:149:1: warning: symbol 'event_class_ftrace_wakeup' was not declared. Should it be static?
kernel/trace/trace_entries.h:149:1: warning: symbol '__event_wakeup' was not declared. Should it be static?
kernel/trace/trace_entries.h:171:1: warning: symbol 'event_class_ftrace_kernel_stack' was not declared. Should it be static?
kernel/trace/trace_entries.h:171:1: warning: symbol '__event_kernel_stack' was not declared. Should it be static?
kernel/trace/trace_entries.h:191:1: warning: symbol 'event_class_ftrace_user_stack' was not declared. Should it be static?
kernel/trace/trace_entries.h:191:1: warning: symbol '__event_user_stack' was not declared. Should it be static?
kernel/trace/trace_entries.h:214:1: warning: symbol 'event_class_ftrace_bprint' was not declared. Should it be static?
kernel/trace/trace_entries.h:214:1: warning: symbol '__event_bprint' was not declared. Should it be static?
kernel/trace/trace_entries.h:230:1: warning: symbol 'event_class_ftrace_print' was not declared. Should it be static?
kernel/trace/trace_entries.h:230:1: warning: symbol '__event_print' was not declared. Should it be static?
kernel/trace/trace_entries.h:247:1: warning: symbol 'event_class_ftrace_raw_data' was not declared. Should it be static?
kernel/trace/trace_entries.h:247:1: warning: symbol '__event_raw_data' was not declared. Should it be static?
kernel/trace/trace_entries.h:262:1: warning: symbol 'event_class_ftrace_bputs' was not declared. Should it be static?
kernel/trace/trace_entries.h:262:1: warning: symbol '__event_bputs' was not declared. Should it be static?
kernel/trace/trace_entries.h:277:1: warning: symbol 'event_class_ftrace_mmiotrace_rw' was not declared. Should it be static?
kernel/trace/trace_entries.h:277:1: warning: symbol '__event_mmiotrace_rw' was not declared. Should it be static?
kernel/trace/trace_entries.h:298:1: warning: symbol 'event_class_ftrace_mmiotrace_map' was not declared. Should it be static?
kernel/trace/trace_entries.h:298:1: warning: symbol '__event_mmiotrace_map' was not declared. Should it be static?
kernel/trace/trace_entries.h:322:1: warning: symbol 'event_class_ftrace_branch' was not declared. Should it be static?
kernel/trace/trace_entries.h:322:1: warning: symbol '__event_branch' was not declared. Should it be static?
kernel/trace/trace_entries.h:343:1: warning: symbol 'event_class_ftrace_hwlat' was not declared. Should it be static?
kernel/trace/trace_entries.h:343:1: warning: symbol '__event_hwlat' was not declared. Should it be static?

Link: http://lkml.kernel.org/r/20191015121012.18824-1-ben.dooks@codethink.co.uk

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 kernel/trace/trace_export.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c
index 45630a76ed3a..2e6d2e9741cc 100644
--- a/kernel/trace/trace_export.c
+++ b/kernel/trace/trace_export.c
@@ -171,7 +171,7 @@ ftrace_define_fields_##name(struct trace_event_call *event_call)	\
 #define FTRACE_ENTRY_REG(call, struct_name, etype, tstruct, print, filter,\
 			 regfn)						\
 									\
-struct trace_event_class __refdata event_class_ftrace_##call = {	\
+static struct trace_event_class __refdata event_class_ftrace_##call = {	\
 	.system			= __stringify(TRACE_SYSTEM),		\
 	.define_fields		= ftrace_define_fields_##call,		\
 	.fields			= LIST_HEAD_INIT(event_class_ftrace_##call.fields),\
@@ -187,7 +187,7 @@ struct trace_event_call __used event_##call = {				\
 	.print_fmt		= print,				\
 	.flags			= TRACE_EVENT_FL_IGNORE_ENABLE,		\
 };									\
-struct trace_event_call __used						\
+static struct trace_event_call __used						\
 __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call;
 
 #undef FTRACE_ENTRY
-- 
2.23.0



  parent reply	other threads:[~2019-11-14 18:19 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14 18:17 [for-next][PATCH 00/33] tracing: Updates for 5.5 Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 01/33] ftrace: Introduce PERMANENT ftrace_ops flag Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 02/33] selftests/livepatch: Make dynamic debug setup and restore generic Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 03/33] selftests/livepatch: Test interaction with ftrace_enabled Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 04/33] ftrace: Separate out the copying of a ftrace_hash from __ftrace_hash_move() Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 05/33] ftrace: Separate out functionality from ftrace_location_range() Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 06/33] ftrace: Add register_ftrace_direct() Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 07/33] ftrace: Add ftrace_find_direct_func() Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 08/33] ftrace: Add sample module that uses register_ftrace_direct() Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 09/33] ftrace/selftest: Add tests to test register_ftrace_direct() Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 10/33] ftrace: Add another example of register_ftrace_direct() use case Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 11/33] ftrace/selftests: Update the direct call selftests to test two direct calls Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 12/33] ftrace/x86: Add register_ftrace_direct() for custom trampolines Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 13/33] ftrace/x86: Add a counter to test function_graph with direct Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 14/33] ftrace/x86: Tell objtool to ignore nondeterministic ftrace stack layout Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 15/33] ftrace: Add information on number of page groups allocated Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 16/33] ftrace: Implement fs notification for tracing_max_latency Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 17/33] preemptirq_delay_test: Add the burst feature and a sysfs trigger Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 18/33] tracing: Use CONFIG_PREEMPTION Steven Rostedt
2019-11-14 18:17 ` Steven Rostedt [this message]
2019-11-14 18:17 ` [for-next][PATCH 20/33] tracing: Declare newly exported APIs in include/linux/trace.h Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 21/33] tracing: Verify if trace array exists before destroying it Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 22/33] tracing: Adding NULL checks for trace_array descriptor pointer Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 23/33] fgraph: Fix function type mismatches of ftrace_graph_return using ftrace_stub Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 24/33] tracing/selftests: Turn off timeout setting Steven Rostedt
2019-11-14 18:17 ` [for-next][PATCH 25/33] lib/sort: Move swap, cmp and cmp_r function types for wider use Steven Rostedt
2019-11-14 18:18 ` [for-next][PATCH 26/33] lib/bsearch: Use generic type for comparator function Steven Rostedt
2019-11-14 18:18 ` [for-next][PATCH 27/33] tracing: " Steven Rostedt
2019-11-14 18:18 ` [for-next][PATCH 28/33] tracing/hwlat: Fix a few trivial nits Steven Rostedt
2019-11-14 18:18 ` [for-next][PATCH 29/33] tracing: use kvcalloc for tgid_map array allocation Steven Rostedt
2019-11-14 18:18 ` [for-next][PATCH 30/33] tracing/kprobe: Check whether the non-suffixed symbol is notrace Steven Rostedt
2019-11-14 18:18 ` [for-next][PATCH 31/33] seq_buf: Add printing formatted hex dumps Steven Rostedt
2019-11-14 18:18 ` [for-next][PATCH 32/33] tracing: Use seq_buf_hex_dump() to dump buffers Steven Rostedt
2019-11-14 18:18 ` [for-next][PATCH 33/33] tracing: Remove stray tab in TRACE_EVAL_MAP_FILEs help text Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191114181826.145493743@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=ben.dooks@codethink.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox