mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
vl: remove serial_max_hds
serial_hd(i) is NULL if and only if i >= serial_max_hds(). Test serial_hd(i) instead of bounding the loop at serial_max_hds(), thus removing one more function that vl.c is expected to export. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
bf4d4056fb
commit
46ee119fb6
3 changed files with 2 additions and 13 deletions
|
@ -2878,10 +2878,8 @@ static void spapr_machine_init(MachineState *machine)
|
|||
/* Set up VIO bus */
|
||||
spapr->vio_bus = spapr_vio_bus_init();
|
||||
|
||||
for (i = 0; i < serial_max_hds(); i++) {
|
||||
if (serial_hd(i)) {
|
||||
spapr_vty_create(spapr->vio_bus, serial_hd(i));
|
||||
}
|
||||
for (i = 0; serial_hd(i); i++) {
|
||||
spapr_vty_create(spapr->vio_bus, serial_hd(i));
|
||||
}
|
||||
|
||||
/* We always have at least the nvram device on VIO */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue