[PATCH 3/4] xen/uart: report an error if the device type is not supported

Roger Pau Monne posted 4 patches 1 week, 1 day ago
There is a newer version of this series
[PATCH 3/4] xen/uart: report an error if the device type is not supported
Posted by Roger Pau Monne 1 week, 1 day ago
When using key pairs for the uart configuration (com1 and com2 command line
options), report an error if the passed device=<type> is not recognized
instead of silently ignoring it.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/drivers/char/ns16550.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index da3b6fdf99d9..9cd3e471bfa5 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -1655,6 +1655,8 @@ static bool __init parse_namevalue_pairs(char *str, struct ns16550 *uart)
                 pci_uart_config(uart, 0, uart - ns16550_com);
                 dev_set = true;
             }
+            else
+                PARSE_ERR_RET("Unknown device type %s\n", param_value);
             break;
 
         case port_bdf:
-- 
2.51.0


Re: [PATCH 3/4] xen/uart: report an error if the device type is not supported
Posted by Andrew Cooper 1 week ago
On 25/03/2026 2:58 pm, Roger Pau Monne wrote:
> When using key pairs for the uart configuration (com1 and com2 command line
> options), report an error if the passed device=<type> is not recognized
> instead of silently ignoring it.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>