Am 17. Oktober 2025 19:34:36 UTC schrieb Bernhard Beschow <[email protected]>:
>
>
>Am 17. Oktober 2025 14:58:50 UTC schrieb Michael Tokarev <[email protected]>:
>>17.10.2025 17:11, Bernhard Beschow wrote:
>>> ... In apic_mem_{read,write}, the
>>> own APIC instance is available as the opaque parameter
>>
>>> diff --git a/hw/intc/apic.c b/hw/intc/apic.c
>>
>>> @@ -876,7 +870,7 @@ static uint64_t apic_mem_read(void *opaque, hwaddr
>>> addr, unsigned size)
>>> }
>>> index = (addr >> 4) & 0xff;
>>> - apic_register_read(index, &val);
>>> + apic_register_read(opaque, index, &val);
>>
>>I think it would be better to use local variable here:
>>
>> APICCommonState *s = opaque;
>>
>>and use it down the line. Yes, there's just one usage, but it is
>>still clearer this way (in my opinion anyway).
>>
>>Ditto in apic_mem_write.
>
>I agree. Will fix in the next iteration.
I couldn't use the opaque parameter in v3 at all, so I needed an
`APICCommonState *s` anyway.
Best regards,
Bernhard
>
>Best regards,
>Bernhard
>
>>
>>But it's more a nitpick really.
>>
>>Thanks,
>>
>>/mjt