[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 3/4] fdc: Inline fdctrl_connect_drives() into fdctrl_reali
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v3 3/4] fdc: Inline fdctrl_connect_drives() into fdctrl_realize_common() |
Date: |
Wed, 10 Mar 2021 09:13:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Richard Henderson <richard.henderson@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?