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. Best regards, Bernhard > >But it's more a nitpick really. > >Thanks, > >/mjt
- [PATCH v2 01/11] hw/timer/i8254: Add I/O trace events Bernhard Beschow
- [PATCH v2 02/11] hw/audio/pcspk: Add I/O trace events Bernhard Beschow
- [PATCH v2 10/11] hw/i386/x86-cpu: Remove now unused cpu_g... Bernhard Beschow
- [PATCH v2 03/11] hw/rtc/mc146818rtc: Convert CMOS_DPRINTF... Bernhard Beschow
- [PATCH v2 08/11] hw/i386/apic: Ensure own APIC use in api... Bernhard Beschow
- [PATCH v2 11/11] tests/qtest/ds1338-test: Reuse from_bcd(... Bernhard Beschow
- [PATCH v2 06/11] hw/ide/ide-internal: Move dma_buf_commit... Bernhard Beschow
- [PATCH v2 04/11] hw/rtc/mc146818rtc: Use ARRAY_SIZE macro Bernhard Beschow
- [PATCH v2 09/11] hw/intc/apic: Ensure own APIC use in api... Bernhard Beschow
- Re: [PATCH v2 09/11] hw/intc/apic: Ensure own APIC u... Michael Tokarev
- Re: [PATCH v2 09/11] hw/intc/apic: Ensure own AP... Bernhard Beschow
- Re: [PATCH v2 09/11] hw/intc/apic: Ensure ow... Bernhard Beschow
- [PATCH v2 07/11] hw/i386/apic: Prefer APICCommonState ove... Bernhard Beschow
- [PATCH v2 05/11] hw/rtc/mc146818rtc: Assert correct usage... Bernhard Beschow
