Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/traps: Cleanup coding style

Just some trivial whitespace and coding style changes.

Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>

authored by

Heiko Carstens and committed by
Vasily Gorbik
a9f24559 8d5c2b49

+25 -54
+25 -54
arch/s390/kernel/traps.c
··· 3 3 * S390 version 4 4 * Copyright IBM Corp. 1999, 2000 5 5 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), 6 - * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com), 6 + * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com), 7 7 * 8 8 * Derived from "arch/i386/kernel/traps.c" 9 9 * Copyright (C) 1991, 1992 Linus Torvalds 10 10 */ 11 11 12 - /* 13 - * 'Traps.c' handles hardware traps and faults after we have saved some 14 - * state in 'asm.s'. 15 - */ 16 12 #include <linux/cpufeature.h> 17 13 #include <linux/kprobes.h> 18 14 #include <linux/kdebug.h> ··· 39 43 address = current->thread.trap_tdb.data[3]; 40 44 else 41 45 address = regs->psw.addr; 42 - return (void __user *) (address - (regs->int_code >> 16)); 46 + return (void __user *)(address - (regs->int_code >> 16)); 43 47 } 44 48 45 49 #ifdef CONFIG_GENERIC_BUG ··· 54 58 if (user_mode(regs)) { 55 59 force_sig_fault(si_signo, si_code, get_trap_ip(regs)); 56 60 report_user_fault(regs, si_signo, 0); 57 - } else { 61 + } else { 58 62 if (!fixup_exception(regs)) 59 63 die(regs, str); 60 - } 64 + } 61 65 } 62 66 63 67 static void do_trap(struct pt_regs *regs, int si_signo, int si_code, char *str) 64 68 { 65 - if (notify_die(DIE_TRAP, str, regs, 0, 66 - regs->int_code, si_signo) == NOTIFY_STOP) 69 + if (notify_die(DIE_TRAP, str, regs, 0, regs->int_code, si_signo) == NOTIFY_STOP) 67 70 return; 68 71 do_report_trap(regs, si_signo, si_code, str); 69 72 } ··· 74 79 return; 75 80 if (!current->ptrace) 76 81 return; 77 - force_sig_fault(SIGTRAP, TRAP_HWBKPT, 78 - (void __force __user *) current->thread.per_event.address); 82 + force_sig_fault(SIGTRAP, TRAP_HWBKPT, (void __force __user *)current->thread.per_event.address); 79 83 } 80 84 NOKPROBE_SYMBOL(do_per_trap); 81 85 ··· 93 99 do_trap(regs, signr, sicode, str); \ 94 100 } 95 101 96 - DO_ERROR_INFO(addressing_exception, SIGILL, ILL_ILLADR, 97 - "addressing exception") 98 - DO_ERROR_INFO(execute_exception, SIGILL, ILL_ILLOPN, 99 - "execute exception") 100 - DO_ERROR_INFO(divide_exception, SIGFPE, FPE_INTDIV, 101 - "fixpoint divide exception") 102 - DO_ERROR_INFO(overflow_exception, SIGFPE, FPE_INTOVF, 103 - "fixpoint overflow exception") 104 - DO_ERROR_INFO(hfp_overflow_exception, SIGFPE, FPE_FLTOVF, 105 - "HFP overflow exception") 106 - DO_ERROR_INFO(hfp_underflow_exception, SIGFPE, FPE_FLTUND, 107 - "HFP underflow exception") 108 - DO_ERROR_INFO(hfp_significance_exception, SIGFPE, FPE_FLTRES, 109 - "HFP significance exception") 110 - DO_ERROR_INFO(hfp_divide_exception, SIGFPE, FPE_FLTDIV, 111 - "HFP divide exception") 112 - DO_ERROR_INFO(hfp_sqrt_exception, SIGFPE, FPE_FLTINV, 113 - "HFP square root exception") 114 - DO_ERROR_INFO(operand_exception, SIGILL, ILL_ILLOPN, 115 - "operand exception") 116 - DO_ERROR_INFO(privileged_op, SIGILL, ILL_PRVOPC, 117 - "privileged operation") 118 - DO_ERROR_INFO(special_op_exception, SIGILL, ILL_ILLOPN, 119 - "special operation exception") 120 - DO_ERROR_INFO(transaction_exception, SIGILL, ILL_ILLOPN, 121 - "transaction constraint exception") 102 + DO_ERROR_INFO(addressing_exception, SIGILL, ILL_ILLADR, "addressing exception") 103 + DO_ERROR_INFO(divide_exception, SIGFPE, FPE_INTDIV, "fixpoint divide exception") 104 + DO_ERROR_INFO(execute_exception, SIGILL, ILL_ILLOPN, "execute exception") 105 + DO_ERROR_INFO(hfp_divide_exception, SIGFPE, FPE_FLTDIV, "HFP divide exception") 106 + DO_ERROR_INFO(hfp_overflow_exception, SIGFPE, FPE_FLTOVF, "HFP overflow exception") 107 + DO_ERROR_INFO(hfp_significance_exception, SIGFPE, FPE_FLTRES, "HFP significance exception") 108 + DO_ERROR_INFO(hfp_sqrt_exception, SIGFPE, FPE_FLTINV, "HFP square root exception") 109 + DO_ERROR_INFO(hfp_underflow_exception, SIGFPE, FPE_FLTUND, "HFP underflow exception") 110 + DO_ERROR_INFO(operand_exception, SIGILL, ILL_ILLOPN, "operand exception") 111 + DO_ERROR_INFO(overflow_exception, SIGFPE, FPE_INTOVF, "fixpoint overflow exception") 112 + DO_ERROR_INFO(privileged_op, SIGILL, ILL_PRVOPC, "privileged operation") 113 + DO_ERROR_INFO(special_op_exception, SIGILL, ILL_ILLOPN, "special operation exception") 114 + DO_ERROR_INFO(specification_exception, SIGILL, ILL_ILLOPN, "specification exception"); 115 + DO_ERROR_INFO(transaction_exception, SIGILL, ILL_ILLOPN, "transaction constraint exception") 122 116 123 117 static inline void do_fp_trap(struct pt_regs *regs, __u32 fpc) 124 118 { 125 119 int si_code = 0; 120 + 126 121 /* FPC[2] is Data Exception Code */ 127 122 if ((fpc & 0x00000300) == 0) { 128 123 /* bits 6 and 7 of DXC are 0 iff IEEE exception */ ··· 143 160 u16 opcode; 144 161 145 162 location = get_trap_ip(regs); 146 - 147 163 if (user_mode(regs)) { 148 164 if (get_user(opcode, location)) 149 165 return; ··· 155 173 } else if (opcode == UPROBE_SWBP_INSN) { 156 174 is_uprobe_insn = 1; 157 175 #endif 158 - } else 176 + } else { 159 177 signal = SIGILL; 178 + } 160 179 } 161 180 /* 162 - * We got either an illegal op in kernel mode, or user space trapped 181 + * This is either an illegal op in kernel mode, or user space trapped 163 182 * on a uprobes illegal instruction. See if kprobes or uprobes picks 164 183 * it up. If not, SIGILL. 165 184 */ 166 185 if (is_uprobe_insn || !user_mode(regs)) { 167 - if (notify_die(DIE_BPT, "bpt", regs, 0, 168 - 3, SIGTRAP) != NOTIFY_STOP) 186 + if (notify_die(DIE_BPT, "bpt", regs, 0, 3, SIGTRAP) != NOTIFY_STOP) 169 187 signal = SIGILL; 170 188 } 171 189 if (signal) 172 190 do_trap(regs, signal, ILL_ILLOPC, "illegal operation"); 173 191 } 174 192 NOKPROBE_SYMBOL(illegal_op); 175 - 176 - DO_ERROR_INFO(specification_exception, SIGILL, ILL_ILLOPN, 177 - "specification exception"); 178 193 179 194 static void vector_exception(struct pt_regs *regs) 180 195 { ··· 224 245 { 225 246 if (user_mode(regs)) 226 247 return; 227 - 228 248 switch (report_bug(regs->psw.addr - (regs->int_code >> 16), regs)) { 229 249 case BUG_TRAP_TYPE_NONE: 230 250 fixup_exception(regs); ··· 297 319 teid.val = lc->trans_exc_code; 298 320 regs->int_code = lc->pgm_int_code; 299 321 regs->int_parm_long = teid.val; 300 - 301 322 /* 302 323 * In case of a guest fault, short-circuit the fault handler and return. 303 324 * This way the sie64a() function will return 0; fault address and ··· 309 332 current->thread.gmap_int_code = regs->int_code & 0xffff; 310 333 return; 311 334 } 312 - 313 335 state = irqentry_enter(regs); 314 - 315 336 if (user_mode(regs)) { 316 337 update_timer_sys(); 317 338 if (!cpu_has_bear()) { ··· 318 343 } 319 344 current->thread.last_break = regs->last_break; 320 345 } 321 - 322 346 if (lc->pgm_code & 0x0200) { 323 347 /* transaction abort */ 324 348 current->thread.trap_tdb = lc->pgm_tdb; 325 349 } 326 - 327 350 if (lc->pgm_code & PGM_INT_CODE_PER) { 328 351 if (user_mode(regs)) { 329 352 struct per_event *ev = &current->thread.per_event; ··· 337 364 goto out; 338 365 } 339 366 } 340 - 341 367 if (!irqs_disabled_flags(regs->psw.mask)) 342 368 trace_hardirqs_on(); 343 369 __arch_local_irq_ssm(regs->psw.mask & ~PSW_MASK_PER); 344 - 345 370 trapnr = regs->int_code & PGM_INT_CODE_MASK; 346 371 if (trapnr) 347 372 pgm_check_table[trapnr](regs);