Skip to content

Commit 6aea49c

Browse files
Fengguang Wurostedt
authored andcommitted
tracing/syscalls: Make local functions static
Some functions in the syscall tracing is used only locally to the file, but they are labeled global. Convert them to static functions. Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
1 parent d24d7db commit 6aea49c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

kernel/trace/trace_syscalls.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static struct syscall_metadata *syscall_nr_to_meta(int nr)
7777
return syscalls_metadata[nr];
7878
}
7979

80-
enum print_line_t
80+
static enum print_line_t
8181
print_syscall_enter(struct trace_iterator *iter, int flags,
8282
struct trace_event *event)
8383
{
@@ -130,7 +130,7 @@ print_syscall_enter(struct trace_iterator *iter, int flags,
130130
return TRACE_TYPE_HANDLED;
131131
}
132132

133-
enum print_line_t
133+
static enum print_line_t
134134
print_syscall_exit(struct trace_iterator *iter, int flags,
135135
struct trace_event *event)
136136
{
@@ -270,7 +270,7 @@ static int syscall_exit_define_fields(struct ftrace_event_call *call)
270270
return ret;
271271
}
272272

273-
void ftrace_syscall_enter(void *ignore, struct pt_regs *regs, long id)
273+
static void ftrace_syscall_enter(void *ignore, struct pt_regs *regs, long id)
274274
{
275275
struct syscall_trace_enter *entry;
276276
struct syscall_metadata *sys_data;
@@ -305,7 +305,7 @@ void ftrace_syscall_enter(void *ignore, struct pt_regs *regs, long id)
305305
trace_current_buffer_unlock_commit(buffer, event, 0, 0);
306306
}
307307

308-
void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
308+
static void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
309309
{
310310
struct syscall_trace_exit *entry;
311311
struct syscall_metadata *sys_data;
@@ -337,7 +337,7 @@ void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
337337
trace_current_buffer_unlock_commit(buffer, event, 0, 0);
338338
}
339339

340-
int reg_event_syscall_enter(struct ftrace_event_call *call)
340+
static int reg_event_syscall_enter(struct ftrace_event_call *call)
341341
{
342342
int ret = 0;
343343
int num;
@@ -356,7 +356,7 @@ int reg_event_syscall_enter(struct ftrace_event_call *call)
356356
return ret;
357357
}
358358

359-
void unreg_event_syscall_enter(struct ftrace_event_call *call)
359+
static void unreg_event_syscall_enter(struct ftrace_event_call *call)
360360
{
361361
int num;
362362

@@ -371,7 +371,7 @@ void unreg_event_syscall_enter(struct ftrace_event_call *call)
371371
mutex_unlock(&syscall_trace_lock);
372372
}
373373

374-
int reg_event_syscall_exit(struct ftrace_event_call *call)
374+
static int reg_event_syscall_exit(struct ftrace_event_call *call)
375375
{
376376
int ret = 0;
377377
int num;
@@ -390,7 +390,7 @@ int reg_event_syscall_exit(struct ftrace_event_call *call)
390390
return ret;
391391
}
392392

393-
void unreg_event_syscall_exit(struct ftrace_event_call *call)
393+
static void unreg_event_syscall_exit(struct ftrace_event_call *call)
394394
{
395395
int num;
396396

@@ -459,7 +459,7 @@ unsigned long __init __weak arch_syscall_addr(int nr)
459459
return (unsigned long)sys_call_table[nr];
460460
}
461461

462-
int __init init_ftrace_syscalls(void)
462+
static int __init init_ftrace_syscalls(void)
463463
{
464464
struct syscall_metadata *meta;
465465
unsigned long addr;

0 commit comments

Comments
 (0)