UML: make several more things static
authorWANG Cong <xiyou.wangcong@gmail.com>
Thu, 24 Jul 2008 04:28:49 +0000 (21:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:24 +0000 (10:47 -0700)
- Make some variables and functions static, since they don't need to be
  global.

- Remove an unused function - arch/um/kernel/time.c::sched_clock().

- Clean the style a bit as complained by checkpatch.pl.

Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: WANG Cong <wangcong@zeuux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 files changed:
arch/um/include/skas/skas.h
arch/um/include/um_uaccess.h
arch/um/kernel/physmem.c
arch/um/kernel/ptrace.c
arch/um/kernel/time.c
arch/um/kernel/uaccess.c
arch/um/os-Linux/sigio.c
arch/um/os-Linux/signal.c
arch/um/os-Linux/skas/process.c
arch/um/os-Linux/umid.c
arch/um/sys-i386/bugs.c
arch/um/sys-i386/checksum.S
arch/um/sys-i386/ldt.c
include/asm-um/ptrace-generic.h

index b073f8a..64d2c74 100644 (file)
@@ -16,7 +16,6 @@ extern int user_thread(unsigned long stack, int flags);
 extern void new_thread_handler(void);
 extern void handle_syscall(struct uml_pt_regs *regs);
 extern int new_mm(unsigned long stack);
-extern void get_skas_faultinfo(int pid, struct faultinfo * fi);
 extern long execute_syscall_skas(void *r);
 extern unsigned long current_stub_stack(void);
 
index 2b6fc8e..45c0499 100644 (file)
@@ -34,7 +34,6 @@ extern int copy_to_user(void __user *to, const void *from, int n);
 
 extern int __do_copy_to_user(void *to, const void *from, int n,
                             void **fault_addr, jmp_buf **fault_catcher);
-extern void __do_copy(void *to, const void *from, int n);
 
 /*
  * strncpy_from_user: - Copy a NUL terminated string from userspace.
index 9757085..a1a9090 100644 (file)
@@ -185,7 +185,7 @@ unsigned long find_iomem(char *driver, unsigned long *len_out)
        return 0;
 }
 
-int setup_iomem(void)
+static int setup_iomem(void)
 {
        struct iomem_region *region = iomem_regions;
        unsigned long iomem_start = high_physmem + PAGE_SIZE;
index 47b57b4..15e8b7c 100644 (file)
@@ -225,7 +225,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
        return ret;
 }
 
-void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs,
+static void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs,
                  int error_code)
 {
        struct siginfo info;
index c3e2f36..47f04f4 100644 (file)
 #include "kern_util.h"
 #include "os.h"
 
-/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies_64 * (NSEC_PER_SEC / HZ);
-}
-
 void timer_handler(int sig, struct uml_pt_regs *regs)
 {
        unsigned long flags;
index f0f4b04..dd33f04 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/string.h>
 #include "os.h"
 
-void __do_copy(void *to, const void *from, int n)
+static void __do_copy(void *to, const void *from, int n)
 {
        memcpy(to, from, n);
 }
index eb8f2e4..63d299d 100644 (file)
@@ -530,7 +530,7 @@ static void tty_close(int master, int slave)
                printk(UM_KERN_CONT "No, enabling workaround\n");
 }
 
-void __init check_sigio(void)
+static void __init check_sigio(void)
 {
        if ((access("/dev/ptmx", R_OK) < 0) &&
            (access("/dev/ptyp0", R_OK) < 0)) {
index 5aade60..6ae1807 100644 (file)
@@ -126,7 +126,7 @@ void set_sigstack(void *sig_stack, int size)
                panic("enabling signal stack failed, errno = %d\n", errno);
 }
 
-void (*handlers[_NSIG])(int sig, struct sigcontext *sc);
+static void (*handlers[_NSIG])(int sig, struct sigcontext *sc);
 
 void handle_signal(int sig, struct sigcontext *sc)
 {
index 172ad8f..d6e0a22 100644 (file)
@@ -96,7 +96,7 @@ bad_wait:
 
 extern unsigned long current_stub_stack(void);
 
-void get_skas_faultinfo(int pid, struct faultinfo * fi)
+static void get_skas_faultinfo(int pid, struct faultinfo *fi)
 {
        int err;
 
index 106fa86..a27defb 100644 (file)
@@ -245,7 +245,7 @@ int __init set_umid(char *name)
 /* Changed in make_umid, which is called during early boot */
 static int umid_setup = 0;
 
-int __init make_umid(void)
+static int __init make_umid(void)
 {
        int fd, err;
        char tmp[256];
index a74442d..2c6d0d7 100644 (file)
@@ -12,7 +12,7 @@
 #include "sysdep/ptrace.h"
 
 /* Set during early boot */
-int host_has_cmov = 1;
+static int host_has_cmov = 1;
 static jmp_buf cmov_test_return;
 
 static void cmov_sigill_test_handler(int sig)
index 62c7e56..f058d2f 100644 (file)
@@ -243,13 +243,12 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst,
        .previous
 
 .align 4
-.globl csum_partial_copy_generic_i386
-                               
+
 #ifndef CONFIG_X86_USE_PPRO_CHECKSUM
 
 #define ARGBASE 16             
 #define FP             12
-               
+
 csum_partial_copy_generic_i386:
        subl  $4,%esp   
        pushl %edi
index a34263e..a4846a8 100644 (file)
@@ -14,8 +14,8 @@
 
 extern int modify_ldt(int func, void *ptr, unsigned long bytecount);
 
-long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc,
-                    void **addr, int done)
+static long write_ldt_entry(struct mm_id *mm_idp, int func,
+                    struct user_desc *desc, void **addr, int done)
 {
        long res;
 
index 6aefcd3..3157497 100644 (file)
@@ -47,9 +47,6 @@ extern int set_fpregs(struct user_i387_struct __user *buf,
 
 extern void show_regs(struct pt_regs *regs);
 
-extern void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs,
-                        int error_code);
-
 extern int arch_copy_tls(struct task_struct *new);
 extern void clear_flushed_tls(struct task_struct *task);