Re: [PATCH v3 3/4] fdc: Inline fdctrl_connect_drives() into fdctrl_realize_common()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Henderson <richard.henderson@xxxxxxxxxx> 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?




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux