Commit 42947cb9 authored by Paolo 'Blaisorblade' Giarrusso's avatar Paolo 'Blaisorblade' Giarrusso Committed by Linus Torvalds

[PATCH] uml: some harmless sparse warning fixes

Fix some simple sparse warnings - a lot more staticness and a misplaced
__user.
Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4cd7ed94
...@@ -403,7 +403,7 @@ int chan_window_size(struct list_head *chans, unsigned short *rows_out, ...@@ -403,7 +403,7 @@ int chan_window_size(struct list_head *chans, unsigned short *rows_out,
return 0; return 0;
} }
void free_one_chan(struct chan *chan, int delay_free_irq) static void free_one_chan(struct chan *chan, int delay_free_irq)
{ {
list_del(&chan->list); list_del(&chan->list);
...@@ -416,7 +416,7 @@ void free_one_chan(struct chan *chan, int delay_free_irq) ...@@ -416,7 +416,7 @@ void free_one_chan(struct chan *chan, int delay_free_irq)
kfree(chan); kfree(chan);
} }
void free_chan(struct list_head *chans, int delay_free_irq) static void free_chan(struct list_head *chans, int delay_free_irq)
{ {
struct list_head *ele, *next; struct list_head *ele, *next;
struct chan *chan; struct chan *chan;
...@@ -497,7 +497,7 @@ struct chan_type { ...@@ -497,7 +497,7 @@ struct chan_type {
struct chan_ops *ops; struct chan_ops *ops;
}; };
struct chan_type chan_table[] = { static struct chan_type chan_table[] = {
{ "fd", &fd_ops }, { "fd", &fd_ops },
#ifdef CONFIG_NULL_CHAN #ifdef CONFIG_NULL_CHAN
......
...@@ -18,7 +18,7 @@ struct daemon_init { ...@@ -18,7 +18,7 @@ struct daemon_init {
char *ctl_sock; char *ctl_sock;
}; };
void daemon_init(struct net_device *dev, void *data) static void daemon_init(struct net_device *dev, void *data)
{ {
struct uml_net_private *pri; struct uml_net_private *pri;
struct daemon_data *dpri; struct daemon_data *dpri;
...@@ -64,7 +64,7 @@ static struct net_kern_info daemon_kern_info = { ...@@ -64,7 +64,7 @@ static struct net_kern_info daemon_kern_info = {
.write = daemon_write, .write = daemon_write,
}; };
int daemon_setup(char *str, char **mac_out, void *data) static int daemon_setup(char *str, char **mac_out, void *data)
{ {
struct daemon_init *init = data; struct daemon_init *init = data;
char *remain; char *remain;
......
...@@ -714,7 +714,7 @@ struct winch { ...@@ -714,7 +714,7 @@ struct winch {
struct tty_struct *tty; struct tty_struct *tty;
}; };
irqreturn_t winch_interrupt(int irq, void *data, struct pt_regs *unused) static irqreturn_t winch_interrupt(int irq, void *data, struct pt_regs *unused)
{ {
struct winch *winch = data; struct winch *winch = data;
struct tty_struct *tty; struct tty_struct *tty;
......
...@@ -26,7 +26,7 @@ struct mcast_init { ...@@ -26,7 +26,7 @@ struct mcast_init {
int ttl; int ttl;
}; };
void mcast_init(struct net_device *dev, void *data) static void mcast_init(struct net_device *dev, void *data)
{ {
struct uml_net_private *pri; struct uml_net_private *pri;
struct mcast_data *dpri; struct mcast_data *dpri;
......
...@@ -327,7 +327,7 @@ void mconsole_stop(struct mc_request *req) ...@@ -327,7 +327,7 @@ void mconsole_stop(struct mc_request *req)
/* This list is populated by __initcall routines. */ /* This list is populated by __initcall routines. */
LIST_HEAD(mconsole_devices); static LIST_HEAD(mconsole_devices);
void mconsole_register_dev(struct mc_device *new) void mconsole_register_dev(struct mc_device *new)
{ {
...@@ -561,6 +561,8 @@ void mconsole_sysrq(struct mc_request *req) ...@@ -561,6 +561,8 @@ void mconsole_sysrq(struct mc_request *req)
} }
#endif #endif
#ifdef CONFIG_MODE_SKAS
static void stack_proc(void *arg) static void stack_proc(void *arg)
{ {
struct task_struct *from = current, *to = arg; struct task_struct *from = current, *to = arg;
...@@ -574,7 +576,7 @@ static void stack_proc(void *arg) ...@@ -574,7 +576,7 @@ static void stack_proc(void *arg)
* Dumps a stacks registers to the linux console. * Dumps a stacks registers to the linux console.
* Usage stack <pid>. * Usage stack <pid>.
*/ */
void do_stack(struct mc_request *req) static void do_stack_trace(struct mc_request *req)
{ {
char *ptr = req->request.data; char *ptr = req->request.data;
int pid_requested= -1; int pid_requested= -1;
...@@ -605,6 +607,7 @@ void do_stack(struct mc_request *req) ...@@ -605,6 +607,7 @@ void do_stack(struct mc_request *req)
} }
with_console(req, stack_proc, to); with_console(req, stack_proc, to);
} }
#endif /* CONFIG_MODE_SKAS */
void mconsole_stack(struct mc_request *req) void mconsole_stack(struct mc_request *req)
{ {
...@@ -613,7 +616,7 @@ void mconsole_stack(struct mc_request *req) ...@@ -613,7 +616,7 @@ void mconsole_stack(struct mc_request *req)
*/ */
CHOOSE_MODE(mconsole_reply(req, "Sorry, this doesn't work in TT mode", CHOOSE_MODE(mconsole_reply(req, "Sorry, this doesn't work in TT mode",
1, 0), 1, 0),
do_stack(req)); do_stack_trace(req));
} }
/* Changed by mconsole_setup, which is __setup, and called before SMP is /* Changed by mconsole_setup, which is __setup, and called before SMP is
......
...@@ -33,7 +33,7 @@ static struct tty_driver *ssl_driver; ...@@ -33,7 +33,7 @@ static struct tty_driver *ssl_driver;
#define NR_PORTS 64 #define NR_PORTS 64
void ssl_announce(char *dev_name, int dev) static void ssl_announce(char *dev_name, int dev)
{ {
printk(KERN_INFO "Serial line %d assigned device '%s'\n", dev, printk(KERN_INFO "Serial line %d assigned device '%s'\n", dev,
dev_name); dev_name);
...@@ -98,7 +98,7 @@ static int ssl_remove(int n) ...@@ -98,7 +98,7 @@ static int ssl_remove(int n)
return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n); return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n);
} }
int ssl_open(struct tty_struct *tty, struct file *filp) static int ssl_open(struct tty_struct *tty, struct file *filp)
{ {
return line_open(serial_lines, tty); return line_open(serial_lines, tty);
} }
...@@ -182,7 +182,7 @@ static struct console ssl_cons = { ...@@ -182,7 +182,7 @@ static struct console ssl_cons = {
.index = -1, .index = -1,
}; };
int ssl_init(void) static int ssl_init(void)
{ {
char *new_title; char *new_title;
......
...@@ -33,7 +33,7 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) ...@@ -33,7 +33,7 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
extern void log_exec(char **argv, void *tty); extern void log_exec(char **argv, void *tty);
static long execve1(char *file, char __user * __user *argv, static long execve1(char *file, char __user * __user *argv,
char *__user __user *env) char __user *__user *env)
{ {
long error; long error;
......
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