kdb: kdb_main: refactor code in kdb_md_line
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Thu, 16 Aug 2018 14:01:41 +0000 (09:01 -0500)
committerDaniel Thompson <daniel.thompson@linaro.org>
Tue, 13 Nov 2018 20:37:53 +0000 (20:37 +0000)
commit9eb62f0e1bc70ebc9b15837a0c4e8f12a7b910cb
tree42a78bb2b7a3e751c34c07c34b9cbc8dad128d48
parentc2b94c72d93d0929f48157eef128c4f9d2e603ce
kdb: kdb_main: refactor code in kdb_md_line

Replace the whole switch statement with a for loop.  This makes the
code clearer and easy to read.

This also addresses the following Coverity warnings:

Addresses-Coverity-ID: 115090 ("Missing break in switch")
Addresses-Coverity-ID: 115091 ("Missing break in switch")
Addresses-Coverity-ID: 114700 ("Missing break in switch")

Suggested-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
[daniel.thompson@linaro.org: Tiny grammar change in description]
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
kernel/debug/kdb/kdb_main.c