riscv: remove the switch statement in do_trap_break()
authorVincent Chen <vincent.chen@sifive.com>
Mon, 23 Sep 2019 00:45:17 +0000 (08:45 +0800)
committerPaul Walmsley <paul.walmsley@sifive.com>
Mon, 14 Oct 2019 19:30:28 +0000 (12:30 -0700)
commit2f01b7864188b895e0f18250b650328da4fe3cb2
tree9e9f727cc0b09d10de1a5956960a094edc88ef21
parent4f5cafb5cb8471e54afdc9054d973535614f7675
riscv: remove the switch statement in do_trap_break()

To make the code more straightforward, replace the switch statement
with an if statement.

Suggested-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
[paul.walmsley@sifive.com: cleaned up patch description; updated to
 apply]
Link: https://lore.kernel.org/linux-riscv/20190927224711.GI4700@infradead.org/
Link: https://lore.kernel.org/linux-riscv/CABvJ_xiHJSB7P5QekuLRP=LBPzXXghAfuUpPUYb=a_HbnOQ6BA@mail.gmail.com/
Link: https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/VDCU2WOB6KQISREO4V5DTXEI2M7VOV55/
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
arch/riscv/kernel/traps.c