Hi,

On Wed, May 7, 2025 at 3:44 AM Colin Ian King <colin.i.k...@gmail.com> wrote:
>
> The check for scancode 0xe0 is always false because earlier on
> the scan code is masked with 0x7f so there are never going to
> be values greater than 0x7f. Remove the redundant check.
>
> Signed-off-by: Colin Ian King <colin.i.k...@gmail.com>
> ---
>  kernel/debug/kdb/kdb_keyboard.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/kernel/debug/kdb/kdb_keyboard.c b/kernel/debug/kdb/kdb_keyboard.c
> index 3a74604fdb8a..386d30e530b7 100644
> --- a/kernel/debug/kdb/kdb_keyboard.c
> +++ b/kernel/debug/kdb/kdb_keyboard.c
> @@ -145,9 +145,6 @@ int kdb_get_kbd_char(void)
>                 return CTRL('F');
>         }
>
> -       if (scancode == 0xe0)
> -               return -1;
> -

What a glorious bit of undocumented code. I agree that this is dead
code and should be safe to remove.

Reviewed-by: Douglas Anderson <diand...@chromium.org>


_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to