mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2026-01-06 01:47:54 +01:00
kdb: Merge identical case statements in kdb_read()
commit 6244917f37 upstream.
The code that handles case 14 (down) and case 16 (up) has been copy and
pasted despite being byte-for-byte identical. Combine them.
Cc: stable@vger.kernel.org # Not a bug fix but it is needed for later bug fixes
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/20240424-kgdb_read_refactor-v3-4-f236dbe9828d@linaro.org
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
958ba65a35
commit
e00ec562b0
|
|
@ -317,6 +317,7 @@ poll_again:
|
|||
}
|
||||
break;
|
||||
case 14: /* Down */
|
||||
case 16: /* Up */
|
||||
memset(tmpbuffer, ' ',
|
||||
strlen(kdb_prompt_str) + (lastchar-buffer));
|
||||
*(tmpbuffer+strlen(kdb_prompt_str) +
|
||||
|
|
@ -331,15 +332,6 @@ poll_again:
|
|||
++cp;
|
||||
}
|
||||
break;
|
||||
case 16: /* Up */
|
||||
memset(tmpbuffer, ' ',
|
||||
strlen(kdb_prompt_str) + (lastchar-buffer));
|
||||
*(tmpbuffer+strlen(kdb_prompt_str) +
|
||||
(lastchar-buffer)) = '\0';
|
||||
kdb_printf("\r%s\r", tmpbuffer);
|
||||
*lastchar = (char)key;
|
||||
*(lastchar+1) = '\0';
|
||||
return lastchar;
|
||||
case 9: /* Tab */
|
||||
if (tab < 2)
|
||||
++tab;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user