summaryrefslogtreecommitdiff
path: root/arch/um/kernel
diff options
context:
space:
mode:
authorTiwei Bie <tiwei.btw@antgroup.com>2024-03-06 18:19:17 +0800
committerRichard Weinberger <richard@nod.at>2024-04-22 21:43:03 +0200
commit53471c574974a3df4a5705b1db431d69058cc6d9 (patch)
tree51cb41a305c0956d79f766aee32673dd5dcb81d1 /arch/um/kernel
parent31a5990ed253a66712d7ddc29c92d297a991fdf2 (diff)
um: Make local functions and variables static
This will also fix the warnings like: warning: no previous prototype for ‘fork_handler’ [-Wmissing-prototypes] 140 | void fork_handler(void) | ^~~~~~~~~~~~ Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r--arch/um/kernel/kmsg_dump.c2
-rw-r--r--arch/um/kernel/process.c8
-rw-r--r--arch/um/kernel/time.c6
3 files changed, 8 insertions, 8 deletions
diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel/kmsg_dump.c
index 427dd5a61a38..4382cf02a6d1 100644
--- a/arch/um/kernel/kmsg_dump.c
+++ b/arch/um/kernel/kmsg_dump.c
@@ -57,7 +57,7 @@ static struct kmsg_dumper kmsg_dumper = {
.dump = kmsg_dumper_stdout
};
-int __init kmsg_dumper_stdout_init(void)
+static int __init kmsg_dumper_stdout_init(void)
{
return kmsg_dump_register(&kmsg_dumper);
}
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index ab95648e93e1..20f3813143d8 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -137,7 +137,7 @@ void new_thread_handler(void)
}
/* Called magically, see new_thread_handler above */
-void fork_handler(void)
+static void fork_handler(void)
{
force_flush_all();
@@ -268,14 +268,14 @@ int clear_user_proc(void __user *buf, int size)
static atomic_t using_sysemu = ATOMIC_INIT(0);
int sysemu_supported;
-void set_using_sysemu(int value)
+static void set_using_sysemu(int value)
{
if (value > sysemu_supported)
return;
atomic_set(&using_sysemu, value);
}
-int get_using_sysemu(void)
+static int get_using_sysemu(void)
{
return atomic_read(&using_sysemu);
}
@@ -313,7 +313,7 @@ static const struct proc_ops sysemu_proc_ops = {
.proc_write = sysemu_proc_write,
};
-int __init make_proc_sysemu(void)
+static int __init make_proc_sysemu(void)
{
struct proc_dir_entry *ent;
if (!sysemu_supported)
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index 3e270da6b6f6..efa5b9c97992 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -319,7 +319,7 @@ void time_travel_add_event_rel(struct time_travel_event *e,
time_travel_add_event(e, time_travel_time + delay_ns);
}
-void time_travel_periodic_timer(struct time_travel_event *e)
+static void time_travel_periodic_timer(struct time_travel_event *e)
{
time_travel_add_event(&time_travel_timer_event,
time_travel_time + time_travel_timer_interval);
@@ -812,7 +812,7 @@ unsigned long calibrate_delay_is_known(void)
return 0;
}
-int setup_time_travel(char *str)
+static int setup_time_travel(char *str)
{
if (strcmp(str, "=inf-cpu") == 0) {
time_travel_mode = TT_MODE_INFCPU;
@@ -862,7 +862,7 @@ __uml_help(setup_time_travel,
"devices using it, assuming the device has the right capabilities.\n"
"The optional ID is a 64-bit integer that's sent to the central scheduler.\n");
-int setup_time_travel_start(char *str)
+static int setup_time_travel_start(char *str)
{
int err;