Commit 52c6d145 authored by Will Deacon's avatar Will Deacon

arm64: debug: Remove unused return value from do_debug_exception()

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: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent e2092740
...@@ -810,13 +810,12 @@ void __init hook_debug_fault_code(int nr, ...@@ -810,13 +810,12 @@ void __init hook_debug_fault_code(int nr,
debug_fault_info[nr].name = name; debug_fault_info[nr].name = name;
} }
asmlinkage int __exception do_debug_exception(unsigned long addr_if_watchpoint, asmlinkage void __exception do_debug_exception(unsigned long addr_if_watchpoint,
unsigned int esr, unsigned int esr,
struct pt_regs *regs) struct pt_regs *regs)
{ {
const struct fault_info *inf = esr_to_debug_fault_info(esr); const struct fault_info *inf = esr_to_debug_fault_info(esr);
unsigned long pc = instruction_pointer(regs); unsigned long pc = instruction_pointer(regs);
int rv;
/* /*
* Tell lockdep we disabled irqs in entry.S. Do nothing if they were * 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, ...@@ -828,17 +827,12 @@ asmlinkage int __exception do_debug_exception(unsigned long addr_if_watchpoint,
if (user_mode(regs) && !is_ttbr0_addr(pc)) if (user_mode(regs) && !is_ttbr0_addr(pc))
arm64_apply_bp_hardening(); arm64_apply_bp_hardening();
if (!inf->fn(addr_if_watchpoint, esr, regs)) { if (inf->fn(addr_if_watchpoint, esr, regs)) {
rv = 1;
} else {
arm64_notify_die(inf->name, regs, arm64_notify_die(inf->name, regs,
inf->sig, inf->code, (void __user *)pc, esr); inf->sig, inf->code, (void __user *)pc, esr);
rv = 0;
} }
if (interrupts_enabled(regs)) if (interrupts_enabled(regs))
trace_hardirqs_on(); trace_hardirqs_on();
return rv;
} }
NOKPROBE_SYMBOL(do_debug_exception); NOKPROBE_SYMBOL(do_debug_exception);
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