]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
arm64: debug: Remove unused return value from do_debug_exception()
authorWill Deacon <will.deacon@arm.com>
Mon, 25 Feb 2019 12:06:43 +0000 (12:06 +0000)
committerWill Deacon <will.deacon@arm.com>
Tue, 9 Apr 2019 10:21:12 +0000 (11:21 +0100)
do_debug_exception() goes out of its way to return a value that isn't
ever used, so just make the thing void.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/fault.c

index 4f343e603925df510ecb84d2a47e674521982ddb..0cb0e09995e110ef075c0f834ce22f3493f70d2e 100644 (file)
@@ -810,13 +810,12 @@ void __init hook_debug_fault_code(int nr,
        debug_fault_info[nr].name       = name;
 }
 
-asmlinkage int __exception do_debug_exception(unsigned long addr_if_watchpoint,
-                                             unsigned int esr,
-                                             struct pt_regs *regs)
+asmlinkage void __exception do_debug_exception(unsigned long addr_if_watchpoint,
+                                              unsigned int esr,
+                                              struct pt_regs *regs)
 {
        const struct fault_info *inf = esr_to_debug_fault_info(esr);
        unsigned long pc = instruction_pointer(regs);
-       int rv;
 
        /*
         * Tell lockdep we disabled irqs in entry.S. Do nothing if they were
@@ -828,17 +827,12 @@ asmlinkage int __exception do_debug_exception(unsigned long addr_if_watchpoint,
        if (user_mode(regs) && !is_ttbr0_addr(pc))
                arm64_apply_bp_hardening();
 
-       if (!inf->fn(addr_if_watchpoint, esr, regs)) {
-               rv = 1;
-       } else {
+       if (inf->fn(addr_if_watchpoint, esr, regs)) {
                arm64_notify_die(inf->name, regs,
                                 inf->sig, inf->code, (void __user *)pc, esr);
-               rv = 0;
        }
 
        if (interrupts_enabled(regs))
                trace_hardirqs_on();
-
-       return rv;
 }
 NOKPROBE_SYMBOL(do_debug_exception);