summaryrefslogtreecommitdiffstats
path: root/kernel/debug/kdb/kdb_io.c
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2014-09-11 11:41:12 +0200
committerJason Wessel <jason.wessel@windriver.com>2015-02-19 19:39:03 +0100
commit32d375f6f24c3e4c9c235672695b4c314cf6b964 (patch)
treede88ecb16da03a74a833c525d360cc83dcbba141 /kernel/debug/kdb/kdb_io.c
parentkdb: Provide forward search at more prompt (diff)
downloadlinux-32d375f6f24c3e4c9c235672695b4c314cf6b964.tar.xz
linux-32d375f6f24c3e4c9c235672695b4c314cf6b964.zip
kdb: Const qualifier for kdb_getstr's prompt argument
All current callers of kdb_getstr() can pass constant pointers via the prompt argument. This patch adds a const qualification to make explicit the fact that this is safe. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'kernel/debug/kdb/kdb_io.c')
-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 ca13e6215537..fc1ef736253c 100644
--- a/kernel/debug/kdb/kdb_io.c
+++ b/kernel/debug/kdb/kdb_io.c
@@ -439,7 +439,7 @@ poll_again:
* substituted for %d, %x or %o in the prompt.
*/
-char *kdb_getstr(char *buffer, size_t bufsize, char *prompt)
+char *kdb_getstr(char *buffer, size_t bufsize, const char *prompt)
{
if (prompt && kdb_prompt_str != prompt)
strncpy(kdb_prompt_str, prompt, CMD_BUFLEN);