> On Nov 19, 2019, at 10:06 AM, Stefan Hajnoczi <stefa...@redhat.com> 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 <fel...@nutanix.com>
>> ---
>> 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 <stefa...@redhat.com>

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