[PATCH] x86/boot: remove commented out code in getchar()

Thorsten Blum posted 1 patch 1 month, 2 weeks ago
arch/x86/boot/tty.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] x86/boot: remove commented out code in getchar()
Posted by Thorsten Blum 1 month, 2 weeks ago
The code has been commented out ever since commit df7699c56421 ("x86,
setup: "glove box" BIOS interrupts in the core boot code") - remove it.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 arch/x86/boot/tty.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/x86/boot/tty.c b/arch/x86/boot/tty.c
index f7eb976b0a4b..3ca8115ef5eb 100644
--- a/arch/x86/boot/tty.c
+++ b/arch/x86/boot/tty.c
@@ -88,7 +88,6 @@ int getchar(void)
 	struct biosregs ireg, oreg;
 
 	initregs(&ireg);
-	/* ireg.ah = 0x00; */
 	intcall(0x16, &ireg, &oreg);
 
 	return oreg.al;
Re: [PATCH] x86/boot: remove commented out code in getchar()
Posted by H. Peter Anvin 1 month, 2 weeks ago
On April 29, 2026 3:17:09 AM PDT, Thorsten Blum <thorsten.blum@linux.dev> wrote:
>The code has been commented out ever since commit df7699c56421 ("x86,
>setup: "glove box" BIOS interrupts in the core boot code") - remove it.
>
>Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
>---
> arch/x86/boot/tty.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/arch/x86/boot/tty.c b/arch/x86/boot/tty.c
>index f7eb976b0a4b..3ca8115ef5eb 100644
>--- a/arch/x86/boot/tty.c
>+++ b/arch/x86/boot/tty.c
>@@ -88,7 +88,6 @@ int getchar(void)
> 	struct biosregs ireg, oreg;
> 
> 	initregs(&ireg);
>-	/* ireg.ah = 0x00; */
> 	intcall(0x16, &ireg, &oreg);
> 
> 	return oreg.al;

NAK.

It's a comment: it isn't necessary to set ireg.ah to zero there because it is already zero.