[PATCH v3 3/4] fdc: Inline fdctrl_connect_drives() into fdctrl_realize_common()
Markus Armbruster
armbru at redhat.com
Wed Mar 10 08:13:48 UTC 2021
Richard Henderson <richard.henderson at linaro.org> writes:
> On 3/9/21 8:12 AM, Markus Armbruster wrote:
>> @@ -2565,6 +2551,7 @@ static void fdctrl_realize_common(DeviceState *dev, FDCtrl *fdctrl,
>> Error **errp)
>> {
>> int i, j;
>> + FDrive *drive;
>> static int command_tables_inited = 0;
>> if (fdctrl->fallback == FLOPPY_DRIVE_TYPE_AUTO) {
>> @@ -2604,7 +2591,13 @@ static void fdctrl_realize_common(DeviceState *dev, FDCtrl *fdctrl,
>> }
>> floppy_bus_create(fdctrl, &fdctrl->bus, dev);
>> - fdctrl_connect_drives(fdctrl, dev, errp);
>> +
>> + for (i = 0; i < MAX_FD; i++) {
>> + drive = &fdctrl->drives[i];
>
> FWIW, the declaration could be local to this loop.
Old-school habits. John, got a preference?
More information about the libvir-list
mailing list