Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH] hvc_vio: fix CONFIG_HVC_OLD_HVSI ifdef guards
@ 2026-12-04  2:13 Pengpeng Hou
  2026-12-04  2:23 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Pengpeng Hou @ 2026-12-04  2:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: linuxppc-dev, linux-serial, linux-kernel, Pengpeng Hou

When the old HVSI driver is selected, HVC VIO should exclude the
overlapping protocol match and stop after its early console setup. Both
tests currently use HVC_OLD_HVSI without its CONFIG_ prefix.

Use the configured symbol at both sites, without changing the other
terminal protocols.

The issue was found by our static-analysis tool and manually reviewed.

Fixes: 4d2bb3f50036 ("powerpc/pseries: Re-implement HVSI as part of hvc_vio")
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
---
The original patch was prepared with Gemini. Codex assisted with this
review and revision (Assisted-by: gpt 5).
Built hvc_vio.o for pSeries with Clang 18 and W=1 with HVC_OLD_HVSI=y.
The hvc_driver_table initializer no longer included hvterm-protocol
after the change, while hvterm1 remained. No console I/O was performed.

 drivers/tty/hvc/hvc_vio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c
index 14c6a556461769efca84df643897e4e6bec6f626..7b7373eaaa407ad35239c438172b75f3f6de2883 100644
--- a/drivers/tty/hvc/hvc_vio.c
+++ b/drivers/tty/hvc/hvc_vio.c
@@ -42,7 +42,7 @@ static const char hvc_driver_name[] = "hvc_console";
 
 static const struct vio_device_id hvc_driver_table[] = {
 	{"serial", "hvterm1"},
-#ifndef HVC_OLD_HVSI
+#ifndef CONFIG_HVC_OLD_HVSI
 	{"serial", "hvterm-protocol"},
 #endif
 	{ "", "" }
@@ -417,7 +417,7 @@ void __init hvc_vio_init_early(void)
 	udbg_putc = udbg_hvc_putc;
 	udbg_getc = udbg_hvc_getc;
 	udbg_getc_poll = udbg_hvc_getc_poll;
-#ifdef HVC_OLD_HVSI
+#ifdef CONFIG_HVC_OLD_HVSI
 	/* When using the old HVSI driver don't register the HVC
 	 * backend for HVSI, only do udbg
 	 */

base-commit: d06ce6f1eb5eeffd4ebcfde345dc34a98131d106


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hvc_vio: fix CONFIG_HVC_OLD_HVSI ifdef guards
  2026-12-04  2:13 [PATCH] hvc_vio: fix CONFIG_HVC_OLD_HVSI ifdef guards Pengpeng Hou
@ 2026-12-04  2:23 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-04  2:23 UTC (permalink / raw)
  To: Pengpeng Hou; +Cc: linux-serial

> When the old HVSI driver is selected, HVC VIO should exclude the
> overlapping protocol match and stop after its early console setup. Both
> tests currently use HVC_OLD_HVSI without its CONFIG_ prefix.
> 
> Use the configured symbol at both sites, without changing the other
> terminal protocols.
> 
> The issue was found by our static-analysis tool and manually reviewed.
> 
> Fixes: 4d2bb3f50036 ("powerpc/pseries: Re-implement HVSI as part of hvc_vio")
> Signed-off-by: Pengpeng Hou <hppiscas@163.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/179635042485.74470.11009210054559560119@163.com?part=1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-04  2:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04  2:13 [PATCH] hvc_vio: fix CONFIG_HVC_OLD_HVSI ifdef guards Pengpeng Hou
2026-12-04  2:23 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox