qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] qom/object: enable setter for uint types


From: Felipe Franciosi
Subject: Re: [PATCH] qom/object: enable setter for uint types
Date: Mon, 25 Nov 2019 15:59:57 +0000

> On Nov 19, 2019, at 10:06 AM, Stefan Hajnoczi <address@hidden> wrote:
> 
> On Sun, Nov 17, 2019 at 03:50:32PM +0000, Felipe Franciosi wrote:
>> Traditionally, the uint-specific property helpers only offer getters.
>> When adding object (or class) uint types, one must therefore use the
>> generic property helper if a setter is needed.
>> 
>> This enhances the uint-specific property helper APIs by adding a
>> 'readonly' field and modifying all users of that API to set this
>> parameter to true. If 'readonly' is false, though, the helper will add
>> an automatic setter for the value.
>> 
>> Signed-off-by: Felipe Franciosi <address@hidden>
>> ---
>> hw/acpi/ich9.c       |   4 +-
>> hw/acpi/pcihp.c      |   6 +--
>> hw/acpi/piix4.c      |  12 +++---
>> hw/isa/lpc_ich9.c    |   4 +-
>> hw/ppc/spapr_drc.c   |   2 +-
>> include/qom/object.h |  28 ++++++++----
>> qom/object.c         | 100 ++++++++++++++++++++++++++++++++-----------
>> ui/console.c         |   3 +-
>> 8 files changed, 111 insertions(+), 48 deletions(-)
> 
> Reviewed-by: Stefan Hajnoczi <address@hidden>

While cleaning up more code to use these helpers, I realised that some
setters included a check to ensure values were not overflowing. I
therefore decided to improve on this setter and send other related
changes together in the following patchset:

https://lists.gnu.org/archive/html/qemu-devel/2019-11/msg04136.html

Please don't merge this patch and look at the patchset instead.

F.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]