提交 207ddd0a 编写于 作者: D David S. Miller

[SPARC64]: Fix most sparse warnings in arch/sparc64/kernel/sys_sparc.c

Sparse still doesn't like the funny cast we make from a scalar to a
"union semun" (which is correct by the C language and in particular
works with the sparc64 calling conventions, but sparse doesn't grok
that yet).
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 cf3d7c1e
......@@ -14,6 +14,8 @@ extern void __init boot_cpu_id_too_large(int cpu);
extern unsigned int dcache_parity_tl1_occurred;
extern unsigned int icache_parity_tl1_occurred;
extern asmlinkage void update_perfctrs(void);
extern asmlinkage void sparc_breakpoint(struct pt_regs *regs);
extern void timer_interrupt(int irq, struct pt_regs *regs);
extern asmlinkage void syscall_trace(struct pt_regs *regs,
......
/* $Id: sys_sparc.c,v 1.57 2002/02/09 19:49:30 davem Exp $
* linux/arch/sparc64/kernel/sys_sparc.c
/* linux/arch/sparc64/kernel/sys_sparc.c
*
* This file contains various random system calls that
* have a non-standard calling sequence on the Linux/sparc
......@@ -30,6 +29,9 @@
#include <asm/perfctr.h>
#include <asm/unistd.h>
#include "entry.h"
#include "systbls.h"
/* #define DEBUG_UNIMP_SYSCALL */
asmlinkage unsigned long sys_getpagesize(void)
......@@ -445,7 +447,8 @@ asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
goto out;
case SEMTIMEDOP:
err = sys_semtimedop(first, ptr, (unsigned)second,
(const struct timespec __user *) fifth);
(const struct timespec __user *)
(unsigned long) fifth);
goto out;
case SEMGET:
err = sys_semget(first, (int)second, (int)third);
......@@ -788,7 +791,7 @@ asmlinkage long sys_utrap_install(utrap_entry_t type,
} else {
if ((utrap_handler_t)current_thread_info()->utraps[type] != new_p &&
current_thread_info()->utraps[0] > 1) {
long *p = current_thread_info()->utraps;
unsigned long *p = current_thread_info()->utraps;
current_thread_info()->utraps =
kmalloc((UT_TRAP_INSTRUCTION_31+1)*sizeof(long),
......@@ -816,7 +819,8 @@ asmlinkage long sys_utrap_install(utrap_entry_t type,
return 0;
}
long sparc_memory_ordering(unsigned long model, struct pt_regs *regs)
asmlinkage long sparc_memory_ordering(unsigned long model,
struct pt_regs *regs)
{
if (model >= 3)
return -EINVAL;
......
#ifndef _SYSTBLS_H
#define _SYSTBLS_H
#include <linux/kernel.h>
#include <linux/types.h>
#include <asm/utrap.h>
extern asmlinkage unsigned long sys_getpagesize(void);
extern asmlinkage unsigned long sparc_brk(unsigned long brk);
extern asmlinkage long sparc_pipe(struct pt_regs *regs);
extern asmlinkage long sys_ipc(unsigned int call, int first,
unsigned long second,
unsigned long third,
void __user *ptr, long fifth);
extern asmlinkage long sparc64_newuname(struct new_utsname __user *name);
extern asmlinkage long sparc64_personality(unsigned long personality);
extern asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long off);
extern asmlinkage long sys64_munmap(unsigned long addr, size_t len);
extern asmlinkage unsigned long sys64_mremap(unsigned long addr,
unsigned long old_len,
unsigned long new_len,
unsigned long flags,
unsigned long new_addr);
extern asmlinkage unsigned long c_sys_nis_syscall(struct pt_regs *regs);
extern asmlinkage long sys_getdomainname(char __user *name, int len);
extern asmlinkage long solaris_syscall(struct pt_regs *regs);
extern asmlinkage long sunos_syscall(struct pt_regs *regs);
extern asmlinkage long sys_utrap_install(utrap_entry_t type,
utrap_handler_t new_p,
utrap_handler_t new_d,
utrap_handler_t __user *old_p,
utrap_handler_t __user *old_d);
extern asmlinkage long sparc_memory_ordering(unsigned long model,
struct pt_regs *regs);
extern asmlinkage long sys_rt_sigaction(int sig,
const struct sigaction __user *act,
struct sigaction __user *oact,
void __user *restorer,
size_t sigsetsize);
extern asmlinkage long sys_perfctr(int opcode, unsigned long arg0,
unsigned long arg1, unsigned long arg2);
#endif /* _SYSTBLS_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册