Commit 53471c57 authored by Tiwei Bie's avatar Tiwei Bie Committed by Richard Weinberger

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: default avatarTiwei Bie <tiwei.btw@antgroup.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 31a5990e
......@@ -15,7 +15,7 @@ struct pcap_init {
char *filter;
};
void pcap_init_kern(struct net_device *dev, void *data)
static void pcap_init_kern(struct net_device *dev, void *data)
{
struct uml_net_private *pri;
struct pcap_data *ppri;
......@@ -50,7 +50,7 @@ static const struct net_kern_info pcap_kern_info = {
.write = pcap_write,
};
int pcap_setup(char *str, char **mac_out, void *data)
static int pcap_setup(char *str, char **mac_out, void *data)
{
struct pcap_init *init = data;
char *remain, *host_if = NULL, *options[2] = { NULL, NULL };
......
......@@ -23,7 +23,7 @@
#include <os.h>
#include <poll.h>
struct pollfd kernel_pollfd;
static struct pollfd kernel_pollfd;
int start_io_thread(unsigned long sp, int *fd_out)
{
......
......@@ -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);
}
......
......@@ -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)
......
......@@ -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;
......
......@@ -63,7 +63,7 @@ const struct net_kern_info ethertap_kern_info = {
.write = etap_write,
};
int ethertap_setup(char *str, char **mac_out, void *data)
static int ethertap_setup(char *str, char **mac_out, void *data)
{
struct ethertap_init *init = data;
......
......@@ -53,7 +53,7 @@ const struct net_kern_info tuntap_kern_info = {
.write = tuntap_write,
};
int tuntap_setup(char *str, char **mac_out, void *data)
static int tuntap_setup(char *str, char **mac_out, void *data)
{
struct tuntap_init *init = data;
......
......@@ -72,7 +72,7 @@ static int signals_blocked;
static unsigned int signals_pending;
static unsigned int signals_active = 0;
void sig_handler(int sig, struct siginfo *si, mcontext_t *mc)
static void sig_handler(int sig, struct siginfo *si, mcontext_t *mc)
{
int enabled = signals_enabled;
......@@ -108,7 +108,7 @@ static void timer_real_alarm_handler(mcontext_t *mc)
timer_handler(SIGALRM, NULL, &regs);
}
void timer_alarm_handler(int sig, struct siginfo *unused_si, mcontext_t *mc)
static void timer_alarm_handler(int sig, struct siginfo *unused_si, mcontext_t *mc)
{
int enabled;
......
......@@ -17,7 +17,7 @@
#include <linux/elf.h>
#include <registers.h>
int have_xstate_support;
static int have_xstate_support;
int save_i387_registers(int pid, unsigned long *fp_regs)
{
......
......@@ -20,7 +20,7 @@
static int host_supports_tls = -1;
int host_gdt_entry_tls_min;
int do_set_thread_area(struct user_desc *info)
static int do_set_thread_area(struct user_desc *info)
{
int ret;
u32 cpu;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment