|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v3 12/18] ns16550: Parse into pci_sbdf_t directly
Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
---
xen/drivers/char/ns16550.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index a3d6c46a73..cdc9122ff9 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -1571,22 +1571,22 @@ static bool __init parse_positional(struct ns16550
*uart, char **str)
#ifdef CONFIG_HAS_PCI
if ( *conf == ',' && *++conf != ',' )
{
- unsigned int b, d, f;
+ pci_sbdf_t sbdf;
- conf = parse_pci(conf, NULL, &b, &d, &f);
+ conf = parse_pci(conf, &sbdf);
if ( !conf )
PARSE_ERR_RET("Bad port PCI coordinates");
- uart->pci_device = PCI_SBDF(0, b, d, f);
+ uart->pci_device = sbdf;
uart->ps_bdf_enable = true;
}
if ( *conf == ',' && *++conf != ',' )
{
- unsigned int b, d, f;
+ pci_sbdf_t sbdf;
- if ( !parse_pci(conf, NULL, &b, &d, &f) )
+ if ( !parse_pci(conf, &sbdf) )
PARSE_ERR_RET("Bad bridge PCI coordinates");
- uart->pci_bridge = PCI_SBDF(0, b, d, f);
+ uart->pci_bridge = sbdf;
uart->pb_bdf_enable = true;
}
#endif
@@ -1670,22 +1670,22 @@ static bool __init parse_namevalue_pairs(char *str,
struct ns16550 *uart)
case port_bdf:
{
- unsigned int b, d, f;
+ pci_sbdf_t sbdf;
- if ( !parse_pci(param_value, NULL, &b, &d, &f) )
+ if ( !parse_pci(param_value, &sbdf) )
PARSE_ERR_RET("Bad port PCI coordinates\n");
- uart->pci_device = PCI_SBDF(0, b, d, f);
+ uart->pci_device = sbdf;
uart->ps_bdf_enable = true;
break;
}
case bridge_bdf:
{
- unsigned int b, d, f;
+ pci_sbdf_t sbdf;
- if ( !parse_pci(param_value, NULL, &b, &d, &f) )
+ if ( !parse_pci(param_value, &sbdf) )
PARSE_ERR_RET("Bad bridge PCI coordinates\n");
- uart->pci_bridge = PCI_SBDF(0, b, d, f);
+ uart->pci_bridge = sbdf;
uart->pb_bdf_enable = true;
break;
}
--
2.54.0
--
Teddy Astie | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |