[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 23/28] smbus-eeprom: remove PROP_PTR
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 23/28] smbus-eeprom: remove PROP_PTR |
Date: |
Tue, 22 Oct 2019 18:19:21 +0100 |
On Tue, 22 Oct 2019 at 17:24, Marc-André Lureau
<address@hidden> wrote:
>
> Instead, set the initial data field directly.
>
> (the initial data is an array of 256 bytes. As I don't know if it may
> change over time, I keep the pointer to original buffer as is, but it
> might be worth to consider to copy it instead)
All the callers to smbus_eeprom_init_one() allocate the
memory for the initial data, populate it, pass the pointer
to smbus_eeprom_init_one() and do not save the pointer
anyway. So we effectively "own" the data -- we could choose
to copy the data and make the callers free the memory instead.
> Signed-off-by: Marc-André Lureau <address@hidden>
I'd still like to know what the right QOM way to pass
256 bytes of constant data to a device as a property is.
thanks
-- PMM
- [PATCH v2 15/28] vmmouse: replace PROP_PTR with PROP_LINK, (continued)
- [PATCH v2 15/28] vmmouse: replace PROP_PTR with PROP_LINK, Marc-André Lureau, 2019/10/22
- [PATCH v2 18/28] dp8393x: replace PROP_PTR with PROP_LINK, Marc-André Lureau, 2019/10/22
- [PATCH v2 16/28] lance: replace PROP_PTR with PROP_LINK, Marc-André Lureau, 2019/10/22
- [PATCH v2 17/28] etraxfs: remove PROP_PTR usage, Marc-André Lureau, 2019/10/22
- [PATCH v2 19/28] leon3: use qemu_irq framework instead of callback as property, Marc-André Lureau, 2019/10/22
- [PATCH v2 20/28] sparc: move PIL irq handling to cpu.c, Marc-André Lureau, 2019/10/22
- [PATCH v2 21/28] RFC: mips/cps: fix setting saar property, Marc-André Lureau, 2019/10/22
- [PATCH v2 22/28] cris: improve passing PIC interrupt vector to the CPU, Marc-André Lureau, 2019/10/22
- [PATCH v2 24/28] omap-intc: remove PROP_PTR, Marc-André Lureau, 2019/10/22
- [PATCH v2 23/28] smbus-eeprom: remove PROP_PTR, Marc-André Lureau, 2019/10/22
- Re: [PATCH v2 23/28] smbus-eeprom: remove PROP_PTR,
Peter Maydell <=
- [PATCH v2 26/28] omap-gpio: remove PROP_PTR, Marc-André Lureau, 2019/10/22
- [PATCH v2 25/28] omap-i2c: remove PROP_PTR, Marc-André Lureau, 2019/10/22
- [PATCH v2 27/28] qdev: remove PROP_MEMORY_REGION, Marc-André Lureau, 2019/10/22
- [PATCH v2 28/28] Remove QDEV_PROP_PTR, Marc-André Lureau, 2019/10/22