mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
qapi acpi: Elide redundant has_FOO in generated C
The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/acpi.py. Said commit explains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Ani Sinha <ani@anisinha.ca> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20221104160712.3005652-7-armbru@redhat.com>
This commit is contained in:
parent
4b2fc7dbc4
commit
b94ba62fd4
4 changed files with 7 additions and 10 deletions
|
@ -35,7 +35,6 @@ static ACPIOSTInfo *acpi_cpu_device_status(int idx, AcpiCpuStatus *cdev)
|
|||
DeviceState *dev = DEVICE(cdev->cpu);
|
||||
if (dev->id) {
|
||||
info->device = g_strdup(dev->id);
|
||||
info->has_device = true;
|
||||
}
|
||||
}
|
||||
return info;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue