summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2024-05-28 07:11:48 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-19 05:33:40 +0200
commitc06023caca61f79534f7e83a8edc4f22333e1d15 (patch)
treee4f31944c8f6c9ca55a125475c4690bc82016cbf /kernel
parent128037541177797af9cefcdf3e06841e77a77f32 (diff)
downloadlinux-c06023caca61f79534f7e83a8edc4f22333e1d15.tar.gz
linux-c06023caca61f79534f7e83a8edc4f22333e1d15.tar.bz2
linux-c06023caca61f79534f7e83a8edc4f22333e1d15.zip
kdb: Use the passed prompt in kdb_position_cursor()
[ Upstream commit e2e821095949cde46256034975a90f88626a2a73 ] The function kdb_position_cursor() takes in a "prompt" parameter but never uses it. This doesn't _really_ matter since all current callers of the function pass the same value and it's a global variable, but it's a bit ugly. Let's clean it up. Found by code inspection. This patch is expected to functionally be a no-op. Fixes: 09b35989421d ("kdb: Use format-strings rather than '\0' injection in kdb_read()") Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20240528071144.1.I0feb49839c6b6f4f2c4bf34764f5e95de3f55a66@changeid Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/debug/kdb/kdb_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c
index 9ce4e52532b7..bfce77a0daac 100644
--- a/kernel/debug/kdb/kdb_io.c
+++ b/kernel/debug/kdb/kdb_io.c
@@ -192,7 +192,7 @@ static int kdb_read_get_key(char *buffer, size_t bufsize)
*/
static void kdb_position_cursor(char *prompt, char *buffer, char *cp)
{
- kdb_printf("\r%s", kdb_prompt_str);
+ kdb_printf("\r%s", prompt);
if (cp > buffer)
kdb_printf("%.*s", (int)(cp - buffer), buffer);
}