x86: coding style fixes to arch/x86/kernel/signal_64.c
Fix all errors and many warnings reported by checkpatch.pl without change signal_64.o arch/x86/kernel/signal_64.o text data bss dec hex filename 5143 0 8 5151 141f signal_64.o.after 5143 0 8 5151 141f signal_64.o.before md5: e68718092b3641cb27e79e55ce57e3ad signal_64.o.after e68718092b3641cb27e79e55ce57e3ad signal_64.o.before Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
08aadf069d
commit
caa007dd36
@@ -24,4 +24,9 @@ struct rt_sigframe {
|
|||||||
struct ucontext uc;
|
struct ucontext uc;
|
||||||
struct siginfo info;
|
struct siginfo info;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
|
sigset_t *set, struct pt_regs *regs);
|
||||||
|
int ia32_setup_frame(int sig, struct k_sigaction *ka,
|
||||||
|
sigset_t *set, struct pt_regs *regs);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -19,9 +19,10 @@
|
|||||||
#include <linux/stddef.h>
|
#include <linux/stddef.h>
|
||||||
#include <linux/personality.h>
|
#include <linux/personality.h>
|
||||||
#include <linux/compiler.h>
|
#include <linux/compiler.h>
|
||||||
|
#include <linux/uaccess.h>
|
||||||
|
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/ucontext.h>
|
#include <asm/ucontext.h>
|
||||||
#include <asm/uaccess.h>
|
|
||||||
#include <asm/i387.h>
|
#include <asm/i387.h>
|
||||||
#include <asm/proto.h>
|
#include <asm/proto.h>
|
||||||
#include <asm/ia32_unistd.h>
|
#include <asm/ia32_unistd.h>
|
||||||
@@ -41,11 +42,6 @@
|
|||||||
# define FIX_EFLAGS __FIX_EFLAGS
|
# define FIX_EFLAGS __FIX_EFLAGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
|
||||||
sigset_t *set, struct pt_regs * regs);
|
|
||||||
int ia32_setup_frame(int sig, struct k_sigaction *ka,
|
|
||||||
sigset_t *set, struct pt_regs * regs);
|
|
||||||
|
|
||||||
asmlinkage long
|
asmlinkage long
|
||||||
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
|
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
|
||||||
struct pt_regs *regs)
|
struct pt_regs *regs)
|
||||||
@@ -119,7 +115,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
|
|||||||
/* Always make any pending restarted system calls return -EINTR */
|
/* Always make any pending restarted system calls return -EINTR */
|
||||||
current_thread_info()->restart_block.fn = do_no_restart_syscall;
|
current_thread_info()->restart_block.fn = do_no_restart_syscall;
|
||||||
|
|
||||||
#define COPY(x) err |= __get_user(regs->x, &sc->x)
|
#define COPY(x) (err |= __get_user(regs->x, &sc->x))
|
||||||
|
|
||||||
COPY(di); COPY(si); COPY(bp); COPY(sp); COPY(bx);
|
COPY(di); COPY(si); COPY(bp); COPY(sp); COPY(bx);
|
||||||
COPY(dx); COPY(cx); COPY(ip);
|
COPY(dx); COPY(cx); COPY(ip);
|
||||||
@@ -149,7 +145,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
struct _fpstate __user * buf;
|
struct _fpstate __user *buf;
|
||||||
err |= __get_user(buf, &sc->fpstate);
|
err |= __get_user(buf, &sc->fpstate);
|
||||||
|
|
||||||
if (buf) {
|
if (buf) {
|
||||||
@@ -199,7 +195,7 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
|
|||||||
return ax;
|
return ax;
|
||||||
|
|
||||||
badframe:
|
badframe:
|
||||||
signal_fault(regs,frame,"sigreturn");
|
signal_fault(regs, frame, "sigreturn");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,7 +204,8 @@ badframe:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs, unsigned long mask, struct task_struct *me)
|
setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
|
||||||
|
unsigned long mask, struct task_struct *me)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
@@ -264,7 +261,7 @@ get_stack(struct k_sigaction *ka, struct pt_regs *regs, unsigned long size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||||
sigset_t *set, struct pt_regs * regs)
|
sigset_t *set, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct rt_sigframe __user *frame;
|
struct rt_sigframe __user *frame;
|
||||||
struct _fpstate __user *fp = NULL;
|
struct _fpstate __user *fp = NULL;
|
||||||
@@ -448,9 +445,9 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
|
|||||||
ptrace_notify(SIGTRAP);
|
ptrace_notify(SIGTRAP);
|
||||||
|
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
spin_lock_irq(¤t->sighand->siglock);
|
||||||
sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask);
|
sigorsets(¤t->blocked, ¤t->blocked, &ka->sa.sa_mask);
|
||||||
if (!(ka->sa.sa_flags & SA_NODEFER))
|
if (!(ka->sa.sa_flags & SA_NODEFER))
|
||||||
sigaddset(¤t->blocked,sig);
|
sigaddset(¤t->blocked, sig);
|
||||||
recalc_sigpending();
|
recalc_sigpending();
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
spin_unlock_irq(¤t->sighand->siglock);
|
||||||
}
|
}
|
||||||
@@ -556,7 +553,8 @@ void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
|
|||||||
struct task_struct *me = current;
|
struct task_struct *me = current;
|
||||||
if (show_unhandled_signals && printk_ratelimit()) {
|
if (show_unhandled_signals && printk_ratelimit()) {
|
||||||
printk("%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx",
|
printk("%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx",
|
||||||
me->comm,me->pid,where,frame,regs->ip,regs->sp,regs->orig_ax);
|
me->comm, me->pid, where, frame, regs->ip,
|
||||||
|
regs->sp, regs->orig_ax);
|
||||||
print_vma_addr(" in ", regs->ip);
|
print_vma_addr(" in ", regs->ip);
|
||||||
printk("\n");
|
printk("\n");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user