um: remove dead code
authorRichard Weinberger <richard@nod.at>
Tue, 26 Jul 2011 00:12:55 +0000 (17:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Jul 2011 03:57:13 +0000 (20:57 -0700)
GCC 4.6's -Wunused-but-set-variable found some dead code.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/drivers/chan_kern.c
arch/um/drivers/line.c
arch/um/kernel/reboot.c

index 25e1965df7ce6960440e2f51d2bf59c203a94f2d..d4191fe1ceded2e87b1ed08dacc748810f0a79d8 100644 (file)
@@ -543,11 +543,10 @@ int parse_chan_pair(char *str, struct line *line, int device,
                    const struct chan_opts *opts, char **error_out)
 {
        struct list_head *chans = &line->chan_list;
-       struct chan *new, *chan;
+       struct chan *new;
        char *in, *out;
 
        if (!list_empty(chans)) {
-               chan = list_entry(chans->next, struct chan, list);
                free_chan(chans, 0);
                INIT_LIST_HEAD(chans);
        }
index 35dd0b86401a833624af552c5043585f8a1b5825..d51c404239a8f0d0e7ec5c7c010d4eff8ee43036 100644 (file)
@@ -176,10 +176,9 @@ void line_flush_buffer(struct tty_struct *tty)
 {
        struct line *line = tty->driver_data;
        unsigned long flags;
-       int err;
 
        spin_lock_irqsave(&line->lock, flags);
-       err = flush_buffer(line);
+       flush_buffer(line);
        spin_unlock_irqrestore(&line->lock, flags);
 }
 
index 869bec9f2516d8ae46d6deb4c96d73b1c64e9817..4d93dff6b3713e321a66f49ef160d3da4380e7a2 100644 (file)
@@ -20,9 +20,8 @@ static void kill_off_processes(void)
                os_kill_ptraced_process(userspace_pid[0], 1);
        else {
                struct task_struct *p;
-               int pid, me;
+               int pid;
 
-               me = os_getpid();
                for_each_process(p) {
                        if (p->mm == NULL)
                                continue;