* [PATCH][next] kdb: remove redundant check for scancode 0xe0
@ 2025-05-07 10:43 Colin Ian King
2025-06-10 23:37 ` Doug Anderson
2025-09-26 14:59 ` Daniel Thompson
0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2025-05-07 10:43 UTC (permalink / raw)
To: Jason Wessel, Daniel Thompson, Douglas Anderson, kgdb-bugreport
Cc: kernel-janitors, linux-kernel
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.king@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;
-
/*
* For Japanese 86/106 keyboards
* See comment in drivers/char/pc_keyb.c.
--
2.49.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][next] kdb: remove redundant check for scancode 0xe0
2025-05-07 10:43 [PATCH][next] kdb: remove redundant check for scancode 0xe0 Colin Ian King
@ 2025-06-10 23:37 ` Doug Anderson
2025-09-26 14:59 ` Daniel Thompson
1 sibling, 0 replies; 3+ messages in thread
From: Doug Anderson @ 2025-06-10 23:37 UTC (permalink / raw)
To: Colin Ian King
Cc: Jason Wessel, Daniel Thompson, kgdb-bugreport, kernel-janitors,
linux-kernel
Hi,
On Wed, May 7, 2025 at 3:44 AM Colin Ian King <colin.i.king@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.king@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 <dianders@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] kdb: remove redundant check for scancode 0xe0
2025-05-07 10:43 [PATCH][next] kdb: remove redundant check for scancode 0xe0 Colin Ian King
2025-06-10 23:37 ` Doug Anderson
@ 2025-09-26 14:59 ` Daniel Thompson
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Thompson @ 2025-09-26 14:59 UTC (permalink / raw)
To: Jason Wessel, Douglas Anderson, kgdb-bugreport, Colin Ian King
Cc: kernel-janitors, linux-kernel
On Wed, 07 May 2025 11:43:37 +0100, Colin Ian King 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.
>
>
Applied, thanks!
[1/1] kdb: remove redundant check for scancode 0xe0
commit: fdbdd0ccb30af18d3b29e714ac8d5ab6163279e0
Best regards,
--
Daniel Thompson (RISCstar) <danielt@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-26 14:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07 10:43 [PATCH][next] kdb: remove redundant check for scancode 0xe0 Colin Ian King
2025-06-10 23:37 ` Doug Anderson
2025-09-26 14:59 ` Daniel Thompson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox