提交 99764fa4 编写于 作者: W WANG Cong 提交者: Linus Torvalds

UML: make several more things static

- 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: NWANG Cong <wangcong@zeuux.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 4a567582
......@@ -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);
......
......@@ -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.
......
......@@ -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;
......
......@@ -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;
......
......@@ -13,14 +13,6 @@
#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;
......
......@@ -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);
}
......
......@@ -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)) {
......
......@@ -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)
{
......
......@@ -96,7 +96,7 @@ void wait_stub_done(int pid)
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;
......
......@@ -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];
......
......@@ -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)
......
......@@ -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
......
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册