[S390] Get rid of a lot of sparse warnings.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
committed by
Martin Schwidefsky
parent
55dff5224a
commit
2b67fc4606
@ -12,10 +12,9 @@
|
||||
#include <linux/personality.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
struct exec_domain s390_exec_domain;
|
||||
static struct exec_domain s390_exec_domain;
|
||||
|
||||
static int __init
|
||||
s390_init (void)
|
||||
static int __init s390_init (void)
|
||||
{
|
||||
s390_exec_domain.name = "Linux/s390";
|
||||
s390_exec_domain.handler = NULL;
|
||||
|
@ -416,7 +416,7 @@ asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info)
|
||||
mm_segment_t old_fs = get_fs ();
|
||||
|
||||
set_fs (KERNEL_DS);
|
||||
ret = sys_sysinfo((struct sysinfo __user *) &s);
|
||||
ret = sys_sysinfo((struct sysinfo __force __user *) &s);
|
||||
set_fs (old_fs);
|
||||
err = put_user (s.uptime, &info->uptime);
|
||||
err |= __put_user (s.loads[0], &info->loads[0]);
|
||||
@ -445,7 +445,8 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
|
||||
mm_segment_t old_fs = get_fs ();
|
||||
|
||||
set_fs (KERNEL_DS);
|
||||
ret = sys_sched_rr_get_interval(pid, (struct timespec __user *) &t);
|
||||
ret = sys_sched_rr_get_interval(pid,
|
||||
(struct timespec __force __user *) &t);
|
||||
set_fs (old_fs);
|
||||
if (put_compat_timespec(&t, interval))
|
||||
return -EFAULT;
|
||||
@ -472,8 +473,8 @@ asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set,
|
||||
}
|
||||
set_fs (KERNEL_DS);
|
||||
ret = sys_rt_sigprocmask(how,
|
||||
set ? (sigset_t __user *) &s : NULL,
|
||||
oset ? (sigset_t __user *) &s : NULL,
|
||||
set ? (sigset_t __force __user *) &s : NULL,
|
||||
oset ? (sigset_t __force __user *) &s : NULL,
|
||||
sigsetsize);
|
||||
set_fs (old_fs);
|
||||
if (ret) return ret;
|
||||
@ -499,7 +500,7 @@ asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set,
|
||||
mm_segment_t old_fs = get_fs();
|
||||
|
||||
set_fs (KERNEL_DS);
|
||||
ret = sys_rt_sigpending((sigset_t __user *) &s, sigsetsize);
|
||||
ret = sys_rt_sigpending((sigset_t __force __user *) &s, sigsetsize);
|
||||
set_fs (old_fs);
|
||||
if (!ret) {
|
||||
switch (_NSIG_WORDS) {
|
||||
@ -524,7 +525,7 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo)
|
||||
if (copy_siginfo_from_user32(&info, uinfo))
|
||||
return -EFAULT;
|
||||
set_fs (KERNEL_DS);
|
||||
ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *) &info);
|
||||
ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __force __user *) &info);
|
||||
set_fs (old_fs);
|
||||
return ret;
|
||||
}
|
||||
@ -682,7 +683,7 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offse
|
||||
|
||||
set_fs(KERNEL_DS);
|
||||
ret = sys_sendfile(out_fd, in_fd,
|
||||
offset ? (off_t __user *) &of : NULL, count);
|
||||
offset ? (off_t __force __user *) &of : NULL, count);
|
||||
set_fs(old_fs);
|
||||
|
||||
if (offset && put_user(of, offset))
|
||||
@ -703,7 +704,8 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd,
|
||||
|
||||
set_fs(KERNEL_DS);
|
||||
ret = sys_sendfile64(out_fd, in_fd,
|
||||
offset ? (loff_t __user *) &lof : NULL, count);
|
||||
offset ? (loff_t __force __user *) &lof : NULL,
|
||||
count);
|
||||
set_fs(old_fs);
|
||||
|
||||
if (offset && put_user(lof, offset))
|
||||
|
@ -275,8 +275,8 @@ sys32_sigaltstack(const stack_t32 __user *uss, stack_t32 __user *uoss,
|
||||
}
|
||||
|
||||
set_fs (KERNEL_DS);
|
||||
ret = do_sigaltstack((stack_t __user *) (uss ? &kss : NULL),
|
||||
(stack_t __user *) (uoss ? &koss : NULL),
|
||||
ret = do_sigaltstack((stack_t __force __user *) (uss ? &kss : NULL),
|
||||
(stack_t __force __user *) (uoss ? &koss : NULL),
|
||||
regs->gprs[15]);
|
||||
set_fs (old_fs);
|
||||
|
||||
@ -401,7 +401,7 @@ asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs)
|
||||
goto badframe;
|
||||
|
||||
set_fs (KERNEL_DS);
|
||||
do_sigaltstack((stack_t __user *)&st, NULL, regs->gprs[15]);
|
||||
do_sigaltstack((stack_t __force __user *)&st, NULL, regs->gprs[15]);
|
||||
set_fs (old_fs);
|
||||
|
||||
return regs->gprs[2];
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include <linux/threads.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/reboot.h>
|
||||
|
||||
void machine_crash_shutdown(struct pt_regs *regs)
|
||||
{
|
||||
|
@ -120,7 +120,7 @@ struct debug_view debug_hex_ascii_view = {
|
||||
NULL
|
||||
};
|
||||
|
||||
struct debug_view debug_level_view = {
|
||||
static struct debug_view debug_level_view = {
|
||||
"level",
|
||||
&debug_prolog_level_fn,
|
||||
NULL,
|
||||
@ -129,7 +129,7 @@ struct debug_view debug_level_view = {
|
||||
NULL
|
||||
};
|
||||
|
||||
struct debug_view debug_pages_view = {
|
||||
static struct debug_view debug_pages_view = {
|
||||
"pages",
|
||||
&debug_prolog_pages_fn,
|
||||
NULL,
|
||||
@ -138,7 +138,7 @@ struct debug_view debug_pages_view = {
|
||||
NULL
|
||||
};
|
||||
|
||||
struct debug_view debug_flush_view = {
|
||||
static struct debug_view debug_flush_view = {
|
||||
"flush",
|
||||
NULL,
|
||||
NULL,
|
||||
@ -156,14 +156,14 @@ struct debug_view debug_sprintf_view = {
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
/* used by dump analysis tools to determine version of debug feature */
|
||||
unsigned int debug_feature_version = __DEBUG_FEATURE_VERSION;
|
||||
|
||||
/* static globals */
|
||||
|
||||
static debug_info_t *debug_area_first = NULL;
|
||||
static debug_info_t *debug_area_last = NULL;
|
||||
DECLARE_MUTEX(debug_lock);
|
||||
static DECLARE_MUTEX(debug_lock);
|
||||
|
||||
static int initialized;
|
||||
|
||||
@ -905,7 +905,7 @@ static struct ctl_table s390dbf_dir_table[] = {
|
||||
{ .ctl_name = 0 }
|
||||
};
|
||||
|
||||
struct ctl_table_header *s390dbf_sysctl_header;
|
||||
static struct ctl_table_header *s390dbf_sysctl_header;
|
||||
|
||||
void
|
||||
debug_stop_all(void)
|
||||
@ -1300,8 +1300,7 @@ out:
|
||||
* flushes debug areas
|
||||
*/
|
||||
|
||||
void
|
||||
debug_flush(debug_info_t* id, int area)
|
||||
static void debug_flush(debug_info_t* id, int area)
|
||||
{
|
||||
unsigned long flags;
|
||||
int i,j;
|
||||
@ -1511,8 +1510,7 @@ out:
|
||||
/*
|
||||
* clean up module
|
||||
*/
|
||||
void
|
||||
__exit debug_exit(void)
|
||||
static void __exit debug_exit(void)
|
||||
{
|
||||
debugfs_remove(debug_debugfs_root_entry);
|
||||
unregister_sysctl_table(s390dbf_sysctl_header);
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <asm/types.h>
|
||||
#include <asm/ebcdic.h>
|
||||
|
||||
/*
|
||||
* ASCII (IBM PC 437) -> EBCDIC 037
|
||||
|
@ -365,7 +365,8 @@ void __kprobes kretprobe_trampoline_holder(void)
|
||||
/*
|
||||
* Called when the probe at kretprobe trampoline is hit
|
||||
*/
|
||||
int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
|
||||
static int __kprobes trampoline_probe_handler(struct kprobe *p,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
struct kretprobe_instance *ri = NULL;
|
||||
struct hlist_head *head, empty_rp;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <asm/cio.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/pgtable.h>
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <linux/fs.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/moduleloader.h>
|
||||
|
||||
#if 0
|
||||
#define DEBUGP printk
|
||||
|
@ -86,15 +86,13 @@ FixPerRegisters(struct task_struct *task)
|
||||
per_info->control_regs.bits.storage_alt_space_ctl = 0;
|
||||
}
|
||||
|
||||
void
|
||||
set_single_step(struct task_struct *task)
|
||||
static void set_single_step(struct task_struct *task)
|
||||
{
|
||||
task->thread.per_info.single_step = 1;
|
||||
FixPerRegisters(task);
|
||||
}
|
||||
|
||||
void
|
||||
clear_single_step(struct task_struct *task)
|
||||
static void clear_single_step(struct task_struct *task)
|
||||
{
|
||||
task->thread.per_info.single_step = 0;
|
||||
FixPerRegisters(task);
|
||||
@ -309,7 +307,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
|
||||
copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
|
||||
if (copied != sizeof(tmp))
|
||||
return -EIO;
|
||||
return put_user(tmp, (unsigned long __user *) data);
|
||||
return put_user(tmp, (unsigned long __force __user *) data);
|
||||
|
||||
case PTRACE_PEEKUSR:
|
||||
/* read the word at location addr in the USER area. */
|
||||
@ -331,7 +329,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
|
||||
|
||||
case PTRACE_PEEKUSR_AREA:
|
||||
case PTRACE_POKEUSR_AREA:
|
||||
if (copy_from_user(&parea, (void __user *) addr,
|
||||
if (copy_from_user(&parea, (void __force __user *) addr,
|
||||
sizeof(parea)))
|
||||
return -EFAULT;
|
||||
addr = parea.kernel_addr;
|
||||
@ -341,10 +339,11 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data)
|
||||
if (request == PTRACE_PEEKUSR_AREA)
|
||||
ret = peek_user(child, addr, data);
|
||||
else {
|
||||
addr_t tmp;
|
||||
if (get_user (tmp, (addr_t __user *) data))
|
||||
addr_t utmp;
|
||||
if (get_user(utmp,
|
||||
(addr_t __force __user *) data))
|
||||
return -EFAULT;
|
||||
ret = poke_user(child, addr, tmp);
|
||||
ret = poke_user(child, addr, utmp);
|
||||
}
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -550,7 +549,7 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data)
|
||||
copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
|
||||
if (copied != sizeof(tmp))
|
||||
return -EIO;
|
||||
return put_user(tmp, (unsigned int __user *) data);
|
||||
return put_user(tmp, (unsigned int __force __user *) data);
|
||||
|
||||
case PTRACE_PEEKUSR:
|
||||
/* read the word at location addr in the USER area. */
|
||||
@ -571,7 +570,7 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data)
|
||||
|
||||
case PTRACE_PEEKUSR_AREA:
|
||||
case PTRACE_POKEUSR_AREA:
|
||||
if (copy_from_user(&parea, (void __user *) addr,
|
||||
if (copy_from_user(&parea, (void __force __user *) addr,
|
||||
sizeof(parea)))
|
||||
return -EFAULT;
|
||||
addr = parea.kernel_addr;
|
||||
@ -581,10 +580,11 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data)
|
||||
if (request == PTRACE_PEEKUSR_AREA)
|
||||
ret = peek_user_emu31(child, addr, data);
|
||||
else {
|
||||
__u32 tmp;
|
||||
if (get_user (tmp, (__u32 __user *) data))
|
||||
__u32 utmp;
|
||||
if (get_user(utmp,
|
||||
(__u32 __force __user *) data))
|
||||
return -EFAULT;
|
||||
ret = poke_user_emu31(child, addr, tmp);
|
||||
ret = poke_user_emu31(child, addr, utmp);
|
||||
}
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -595,17 +595,19 @@ do_ptrace_emu31(struct task_struct *child, long request, long addr, long data)
|
||||
return 0;
|
||||
case PTRACE_GETEVENTMSG:
|
||||
return put_user((__u32) child->ptrace_message,
|
||||
(unsigned int __user *) data);
|
||||
(unsigned int __force __user *) data);
|
||||
case PTRACE_GETSIGINFO:
|
||||
if (child->last_siginfo == NULL)
|
||||
return -EINVAL;
|
||||
return copy_siginfo_to_user32((compat_siginfo_t __user *) data,
|
||||
return copy_siginfo_to_user32((compat_siginfo_t
|
||||
__force __user *) data,
|
||||
child->last_siginfo);
|
||||
case PTRACE_SETSIGINFO:
|
||||
if (child->last_siginfo == NULL)
|
||||
return -EINVAL;
|
||||
return copy_siginfo_from_user32(child->last_siginfo,
|
||||
(compat_siginfo_t __user *) data);
|
||||
(compat_siginfo_t
|
||||
__force __user *) data);
|
||||
}
|
||||
return ptrace_request(child, request, addr, data);
|
||||
}
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/pfn.h>
|
||||
#include <linux/reboot.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/system.h>
|
||||
@ -117,7 +118,7 @@ void __devinit cpu_init (void)
|
||||
*/
|
||||
char vmhalt_cmd[128] = "";
|
||||
char vmpoff_cmd[128] = "";
|
||||
char vmpanic_cmd[128] = "";
|
||||
static char vmpanic_cmd[128] = "";
|
||||
|
||||
static inline void strncpy_skip_quote(char *dst, char *src, int n)
|
||||
{
|
||||
@ -275,10 +276,6 @@ static void __init conmode_default(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
extern void machine_restart_smp(char *);
|
||||
extern void machine_halt_smp(void);
|
||||
extern void machine_power_off_smp(void);
|
||||
|
||||
void (*_machine_restart)(char *command) = machine_restart_smp;
|
||||
void (*_machine_halt)(void) = machine_halt_smp;
|
||||
void (*_machine_power_off)(void) = machine_power_off_smp;
|
||||
|
@ -22,23 +22,23 @@
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <linux/mm.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/kernel_stat.h>
|
||||
#include <linux/smp_lock.h>
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/cache.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/cpu.h>
|
||||
|
||||
#include <linux/timex.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/sigp.h>
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/s390_ext.h>
|
||||
#include <asm/cpcmd.h>
|
||||
#include <asm/tlbflush.h>
|
||||
#include <asm/timer.h>
|
||||
|
||||
extern volatile int __cpu_logical_map[];
|
||||
|
||||
@ -53,12 +53,6 @@ cpumask_t cpu_possible_map = CPU_MASK_NONE;
|
||||
|
||||
static struct task_struct *current_set[NR_CPUS];
|
||||
|
||||
/*
|
||||
* Reboot, halt and power_off routines for SMP.
|
||||
*/
|
||||
extern char vmhalt_cmd[];
|
||||
extern char vmpoff_cmd[];
|
||||
|
||||
static void smp_ext_bitcall(int, ec_bit_sig);
|
||||
static void smp_ext_bitcall_others(ec_bit_sig);
|
||||
|
||||
@ -298,7 +292,7 @@ void machine_power_off_smp(void)
|
||||
* cpus are handled.
|
||||
*/
|
||||
|
||||
void do_ext_call_interrupt(__u16 code)
|
||||
static void do_ext_call_interrupt(__u16 code)
|
||||
{
|
||||
unsigned long bits;
|
||||
|
||||
@ -385,7 +379,7 @@ struct ec_creg_mask_parms {
|
||||
/*
|
||||
* callback for setting/clearing control bits
|
||||
*/
|
||||
void smp_ctl_bit_callback(void *info) {
|
||||
static void smp_ctl_bit_callback(void *info) {
|
||||
struct ec_creg_mask_parms *pp = info;
|
||||
unsigned long cregs[16];
|
||||
int i;
|
||||
@ -458,9 +452,6 @@ __init smp_count_cpus(void)
|
||||
/*
|
||||
* Activate a secondary processor.
|
||||
*/
|
||||
extern void init_cpu_timer(void);
|
||||
extern void init_cpu_vtimer(void);
|
||||
|
||||
int __devinit start_secondary(void *cpuvoid)
|
||||
{
|
||||
/* Setup the cpu */
|
||||
|
@ -245,7 +245,7 @@ static struct notifier_block nohz_idle_nb = {
|
||||
.notifier_call = nohz_idle_notify,
|
||||
};
|
||||
|
||||
void __init nohz_init(void)
|
||||
static void __init nohz_init(void)
|
||||
{
|
||||
if (register_idle_notifier(&nohz_idle_nb))
|
||||
panic("Couldn't register idle notifier");
|
||||
@ -271,8 +271,6 @@ void init_cpu_timer(void)
|
||||
__ctl_load(cr0, 0, 0);
|
||||
}
|
||||
|
||||
extern void vtime_init(void);
|
||||
|
||||
static cycle_t read_tod_clock(void)
|
||||
{
|
||||
return get_clock();
|
||||
|
@ -283,7 +283,7 @@ char *task_show_regs(struct task_struct *task, char *buffer)
|
||||
return buffer;
|
||||
}
|
||||
|
||||
DEFINE_SPINLOCK(die_lock);
|
||||
static DEFINE_SPINLOCK(die_lock);
|
||||
|
||||
void die(const char * str, struct pt_regs * regs, long err)
|
||||
{
|
||||
@ -364,8 +364,7 @@ void __kprobes do_single_step(struct pt_regs *regs)
|
||||
force_sig(SIGTRAP, current);
|
||||
}
|
||||
|
||||
asmlinkage void
|
||||
default_trap_handler(struct pt_regs * regs, long interruption_code)
|
||||
static void default_trap_handler(struct pt_regs * regs, long interruption_code)
|
||||
{
|
||||
if (regs->psw.mask & PSW_MASK_PSTATE) {
|
||||
local_irq_enable();
|
||||
@ -376,7 +375,7 @@ default_trap_handler(struct pt_regs * regs, long interruption_code)
|
||||
}
|
||||
|
||||
#define DO_ERROR_INFO(signr, str, name, sicode, siaddr) \
|
||||
asmlinkage void name(struct pt_regs * regs, long interruption_code) \
|
||||
static void name(struct pt_regs * regs, long interruption_code) \
|
||||
{ \
|
||||
siginfo_t info; \
|
||||
info.si_signo = signr; \
|
||||
@ -442,7 +441,7 @@ do_fp_trap(struct pt_regs *regs, void __user *location,
|
||||
"floating point exception", regs, &si);
|
||||
}
|
||||
|
||||
asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code)
|
||||
static void illegal_op(struct pt_regs * regs, long interruption_code)
|
||||
{
|
||||
siginfo_t info;
|
||||
__u8 opcode[6];
|
||||
@ -585,7 +584,7 @@ DO_ERROR_INFO(SIGILL, "specification exception", specification_exception,
|
||||
ILL_ILLOPN, get_check_address(regs));
|
||||
#endif
|
||||
|
||||
asmlinkage void data_exception(struct pt_regs * regs, long interruption_code)
|
||||
static void data_exception(struct pt_regs * regs, long interruption_code)
|
||||
{
|
||||
__u16 __user *location;
|
||||
int signal = 0;
|
||||
@ -675,7 +674,7 @@ asmlinkage void data_exception(struct pt_regs * regs, long interruption_code)
|
||||
}
|
||||
}
|
||||
|
||||
asmlinkage void space_switch_exception(struct pt_regs * regs, long int_code)
|
||||
static void space_switch_exception(struct pt_regs * regs, long int_code)
|
||||
{
|
||||
siginfo_t info;
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <asm/irq_regs.h>
|
||||
|
||||
static ext_int_info_t ext_int_info_timer;
|
||||
DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer);
|
||||
static DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer);
|
||||
|
||||
#ifdef CONFIG_VIRT_CPU_ACCOUNTING
|
||||
/*
|
||||
|
Reference in New Issue
Block a user