|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH 6/9] hw/display/sm501: QOM-alias 'dma-offset' property in chipset object |
Date: | Fri, 3 Feb 2023 14:21:23 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 |
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é <philmd@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.
[Prev in Thread] | Current Thread | [Next in Thread] |