kdb: Tidy up code to handle escape sequences
authorDaniel Thompson <daniel.thompson@linaro.org>
Fri, 25 Oct 2019 07:33:24 +0000 (08:33 +0100)
committerDaniel Thompson <daniel.thompson@linaro.org>
Mon, 28 Oct 2019 12:02:11 +0000 (12:02 +0000)
commit53b63136e81220cb2f8b541c03a1df9199896821
treeebe79afc83641526c86d65e9866f056b45d8683b
parentd07ce4e32a8d68062c58a3e635619313c52d0bf7
kdb: Tidy up code to handle escape sequences

kdb_read_get_key() has extremely complex break/continue control flow
managed by state variables and is very hard to review or modify. In
particular the way the escape sequence handling interacts with the
general control flow is hard to follow. Separate out the escape key
handling, without changing the control flow. This makes the main body of
the code easier to review.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20191025073328.643-2-daniel.thompson@linaro.org
kernel/debug/kdb/kdb_io.c