From: Will Deacon <will.deacon@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: mark.rutland@arm.com, catalin.marinas@arm.com,
Will Deacon <will.deacon@arm.com>
Subject: [PATCH 03/10] arm64: debug: Remove unused return value from do_debug_exception()
Date: Fri, 1 Mar 2019 13:28:02 +0000 [thread overview]
Message-ID: <20190301132809.24653-4-will.deacon@arm.com> (raw)
In-Reply-To: <20190301132809.24653-1-will.deacon@arm.com>
do_debug_exception() goes out of its way to return a value that isn't
ever used, so just make the thing void.
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
arch/arm64/mm/fault.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index ef46925096f0..f684f92d517c 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -824,13 +824,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
@@ -842,17 +841,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);
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-03-01 13:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 13:27 [PATCH 00/10] Rework debug exception handling code Will Deacon
2019-03-01 13:28 ` [PATCH 01/10] arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug signals Will Deacon
2019-03-01 13:45 ` Mark Rutland
2019-03-05 13:35 ` Sasha Levin
2019-03-01 13:28 ` [PATCH 02/10] arm64: debug: Ensure debug handlers check triggering exception level Will Deacon
2019-03-01 13:46 ` Mark Rutland
2019-03-05 13:35 ` Sasha Levin
2019-03-01 13:28 ` Will Deacon [this message]
2019-03-01 13:48 ` [PATCH 03/10] arm64: debug: Remove unused return value from do_debug_exception() Mark Rutland
2019-03-01 13:28 ` [PATCH 04/10] arm64: debug: Rename addr parameter for non-watchpoint exception hooks Will Deacon
2019-03-01 13:49 ` Mark Rutland
2019-03-01 13:28 ` [PATCH 05/10] arm64: debug: Remove meaningless comment Will Deacon
2019-03-01 14:08 ` Mark Rutland
2019-03-01 13:28 ` [PATCH 06/10] arm64: debug: Separate debug hooks based on target exception level Will Deacon
2019-03-01 14:07 ` Mark Rutland
2019-03-01 13:28 ` [PATCH 07/10] arm64: kprobes: Avoid calling kprobes debug handlers explicitly Will Deacon
2019-03-01 14:12 ` Mark Rutland
2019-03-01 13:28 ` [PATCH 08/10] arm64: debug: Remove redundant user_mode(regs) checks from debug handlers Will Deacon
2019-03-01 14:13 ` Mark Rutland
2019-03-01 13:28 ` [PATCH 09/10] arm64: probes: Move magic BRK values into brk-imm.h Will Deacon
2019-03-01 14:16 ` Mark Rutland
2019-03-01 13:28 ` [PATCH 10/10] arm64: debug: Clean up brk_handler() Will Deacon
2019-03-01 14:17 ` Mark Rutland
2019-03-01 16:24 ` [PATCH 00/10] Rework debug exception handling code Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190301132809.24653-4-will.deacon@arm.com \
--to=will.deacon@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).