Commit d119595f authored by Benjamin Berg's avatar Benjamin Berg Committed by Richard Weinberger

um: Switch printk calls to adhere to correct coding style

This means having the string literal in one line and using __func__
where appropriate.
Signed-off-by: default avatarBenjamin Berg <benjamin@sipsolutions.net>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 8f88c73a
...@@ -29,8 +29,8 @@ void flush_thread(void) ...@@ -29,8 +29,8 @@ void flush_thread(void)
ret = unmap(&current->mm->context.id, 0, TASK_SIZE, 1, &data); ret = unmap(&current->mm->context.id, 0, TASK_SIZE, 1, &data);
if (ret) { if (ret) {
printk(KERN_ERR "flush_thread - clearing address space failed, " printk(KERN_ERR "%s - clearing address space failed, err = %d\n",
"err = %d\n", ret); __func__, ret);
force_sig(SIGKILL); force_sig(SIGKILL);
} }
get_safe_registers(current_pt_regs()->regs.gp, get_safe_registers(current_pt_regs()->regs.gp,
......
...@@ -60,8 +60,8 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr) ...@@ -60,8 +60,8 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr)
printk(UM_KERN_ERR "Registers - \n"); printk(UM_KERN_ERR "Registers - \n");
for (i = 0; i < MAX_REG_NR; i++) for (i = 0; i < MAX_REG_NR; i++)
printk(UM_KERN_ERR "\t%d\t0x%lx\n", i, syscall_regs[i]); printk(UM_KERN_ERR "\t%d\t0x%lx\n", i, syscall_regs[i]);
panic("do_syscall_stub : PTRACE_SETREGS failed, errno = %d\n", panic("%s : PTRACE_SETREGS failed, errno = %d\n",
-n); __func__, -n);
} }
err = ptrace(PTRACE_CONT, pid, 0, 0); err = ptrace(PTRACE_CONT, pid, 0, 0);
...@@ -81,20 +81,17 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr) ...@@ -81,20 +81,17 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr)
offset = *((unsigned long *) mm_idp->stack + 1); offset = *((unsigned long *) mm_idp->stack + 1);
if (offset) { if (offset) {
data = (unsigned long *)(mm_idp->stack + offset - STUB_DATA); data = (unsigned long *)(mm_idp->stack + offset - STUB_DATA);
printk(UM_KERN_ERR "do_syscall_stub : ret = %ld, offset = %ld, " printk(UM_KERN_ERR "%s : ret = %ld, offset = %ld, data = %p\n",
"data = %p\n", ret, offset, data); __func__, ret, offset, data);
syscall = (unsigned long *)((unsigned long)data + data[0]); syscall = (unsigned long *)((unsigned long)data + data[0]);
printk(UM_KERN_ERR "do_syscall_stub: syscall %ld failed, " printk(UM_KERN_ERR "%s: syscall %ld failed, return value = 0x%lx, expected return value = 0x%lx\n",
"return value = 0x%lx, expected return value = 0x%lx\n", __func__, syscall[0], ret, syscall[7]);
syscall[0], ret, syscall[7]); printk(UM_KERN_ERR " syscall parameters: 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx\n",
printk(UM_KERN_ERR " syscall parameters: "
"0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx\n",
syscall[1], syscall[2], syscall[3], syscall[1], syscall[2], syscall[3],
syscall[4], syscall[5], syscall[6]); syscall[4], syscall[5], syscall[6]);
for (n = 1; n < data[0]/sizeof(long); n++) { for (n = 1; n < data[0]/sizeof(long); n++) {
if (n == 1) if (n == 1)
printk(UM_KERN_ERR " additional syscall " printk(UM_KERN_ERR " additional syscall data:");
"data:");
if (n % 4 == 1) if (n % 4 == 1)
printk("\n" UM_KERN_ERR " "); printk("\n" UM_KERN_ERR " ");
printk(" 0x%lx", data[n]); printk(" 0x%lx", data[n]);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment