On 3/2/23 14:05, BALATON Zoltan wrote:
On Fri, 3 Feb 2023, Philippe Mathieu-Daudé wrote:
No need to use an intermediate 'dma-offset' property in the
chipset object. Alias the property, so when the machine (here
r2d-plus) sets the value on the chipset, it is propagated to
the OHCI object.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
hw/display/sm501.c | 22 +++++++++++-----------
hw/sh4/r2d.c | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)
It does not seem to be any simpler by the number of lines but maybe a
bit cleaner.
Well it also moves to the "Embed QOM objects" pattern which Peter prefers.
Note this device doesn't implement unrealize().
I wonder if it would worth renaming the property to
dma-offset to match that of ohci so it's less confusing what it refers
to. It's only used by r2d and this patch already changing that so would
be an easy change.
We can't because TYPE_PCI_SM501 is user-creatable, so we need to
go thru the whole deprecation process and we don't have any API to
deprecate QOM properties yet.
I'll add these comments to the description.