Re: [PATCH 4/4] riscv: remove the switch statement in do_trap_break()

2019-10-09 Thread Paul Walmsley
On Mon, 7 Oct 2019, Christoph Hellwig wrote: > On Mon, Oct 07, 2019 at 09:08:23AM -0700, Paul Walmsley wrote: > > force_sig_fault(SIGTRAP, TRAP_BRKPT, > > (void __user *)(regs->sepc)); > > No nee for the extra braces, which also means it all fits onto a

Re: [PATCH 4/4] riscv: remove the switch statement in do_trap_break()

2019-10-08 Thread Paul Walmsley
On Tue, 8 Oct 2019, Vincent Chen wrote: > Sorry, I missed the comment. Christoph's suggestion is also good to me. > I will modify it as you suggested. Thanks - no need to resend, I'll queue the modified patch up here. - Paul

Re: [PATCH 4/4] riscv: remove the switch statement in do_trap_break()

2019-10-07 Thread Vincent Chen
Sorry, I missed the comment. Christoph's suggestion is also good to me. I will modify it as you suggested. Thanks On Tue, Oct 8, 2019 at 12:31 AM Paul Walmsley wrote: > > On Mon, 7 Oct 2019, Christoph Hellwig wrote: > > > On Mon, Oct 07, 2019 at 09:08:23AM -0700, Paul Walmsley wrote: > > >

Re: [PATCH 4/4] riscv: remove the switch statement in do_trap_break()

2019-10-07 Thread Paul Walmsley
On Mon, 7 Oct 2019, Christoph Hellwig wrote: > On Mon, Oct 07, 2019 at 09:08:23AM -0700, Paul Walmsley wrote: > > force_sig_fault(SIGTRAP, TRAP_BRKPT, > > (void __user *)(regs->sepc)); > > No nee for the extra braces, which also means it all fits onto a

Re: [PATCH 4/4] riscv: remove the switch statement in do_trap_break()

2019-10-07 Thread Christoph Hellwig
On Mon, Oct 07, 2019 at 09:08:23AM -0700, Paul Walmsley wrote: > force_sig_fault(SIGTRAP, TRAP_BRKPT, > (void __user *)(regs->sepc)); No nee for the extra braces, which also means it all fits onto a single line. You could have just copied what I

Re: [PATCH 4/4] riscv: remove the switch statement in do_trap_break()

2019-10-07 Thread Paul Walmsley
Vincent, On Fri, 27 Sep 2019, Christoph Hellwig wrote: > On Mon, Sep 23, 2019 at 08:45:17AM +0800, Vincent Chen wrote: > > To make the code more straightforward, replacing the switch statement > > with if statement. > > > > Suggested-by: Paul Walmsley > > Signed-off-by: Vincent Chen ... > I

Re: [PATCH 4/4] riscv: remove the switch statement in do_trap_break()

2019-09-27 Thread Christoph Hellwig
On Mon, Sep 23, 2019 at 08:45:17AM +0800, Vincent Chen wrote: > To make the code more straightforward, replacing the switch statement > with if statement. > > Suggested-by: Paul Walmsley > Signed-off-by: Vincent Chen > --- > arch/riscv/kernel/traps.c | 23 --- > 1 file

[PATCH 4/4] riscv: remove the switch statement in do_trap_break()

2019-09-22 Thread Vincent Chen
To make the code more straightforward, replacing the switch statement with if statement. Suggested-by: Paul Walmsley Signed-off-by: Vincent Chen --- arch/riscv/kernel/traps.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/arch/riscv/kernel/traps.c