[PATCH 0/4] qom: Introduce object*_property_add_bool_ptr() functions

Eduardo Habkost posted 4 patches 3 years, 6 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201022223140.2083123-1-ehabkost@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <rth@twiddle.net>, Eduardo Habkost <ehabkost@redhat.com>
include/qom/object.h | 23 +++++++++++++
authz/listfile.c     | 27 ++-------------
hw/core/machine.c    | 78 ++++++++------------------------------------
hw/i386/pc.c         | 57 +++++---------------------------
qom/object.c         | 31 ++++++++++++++++++
5 files changed, 79 insertions(+), 137 deletions(-)
[PATCH 0/4] qom: Introduce object*_property_add_bool_ptr() functions
Posted by Eduardo Habkost 3 years, 6 months ago
Based-on: 20201009160122.1662082-1-ehabkost@redhat.com
Git branch: https://github.com/ehabkost/qemu work/qom-bool-ptr-prop

This series introduces a helper to make it easier to register
simple boolan QOM properties.  It will be useful for simplifying
existing property code in some types that can't use
QDEV_PROP_BOOL yet (because they are not TYPE_DEVICE subtypes).
As examples, some TYPE_MACHINE and TYPE_QAUTHZ_LIST_FILE
properties are converted to use the new functions.

This depends on the QOM property code cleanup that was also
submitted as part of:

  https://lore.kernel.org/qemu-devel/20201009160122.1662082-1-ehabkost@redhat.com
  Subject: [PATCH 00/12] qom: Make all -object types use only class properties<

Eduardo Habkost (4):
  qom: object*_property_add_bool_ptr() functions
  autz/listfile: Use object_class_property_add_bool_ptr()
  machine: Use object_class_property_add_bool_ptr() when possible
  pc: Use object_class_property_add_bool_ptr()

 include/qom/object.h | 23 +++++++++++++
 authz/listfile.c     | 27 ++-------------
 hw/core/machine.c    | 78 ++++++++------------------------------------
 hw/i386/pc.c         | 57 +++++---------------------------
 qom/object.c         | 31 ++++++++++++++++++
 5 files changed, 79 insertions(+), 137 deletions(-)

-- 
2.28.0



Re: [PATCH 0/4] qom: Introduce object*_property_add_bool_ptr() functions
Posted by Philippe Mathieu-Daudé 3 years, 6 months ago
On 10/23/20 12:31 AM, Eduardo Habkost wrote:
> Based-on: 20201009160122.1662082-1-ehabkost@redhat.com
> Git branch: https://github.com/ehabkost/qemu work/qom-bool-ptr-prop
> 
> This series introduces a helper to make it easier to register
> simple boolan QOM properties.  It will be useful for simplifying
> existing property code in some types that can't use
> QDEV_PROP_BOOL yet (because they are not TYPE_DEVICE subtypes).
> As examples, some TYPE_MACHINE and TYPE_QAUTHZ_LIST_FILE
> properties are converted to use the new functions.
> 
> This depends on the QOM property code cleanup that was also
> submitted as part of:
> 
>    https://lore.kernel.org/qemu-devel/20201009160122.1662082-1-ehabkost@redhat.com
>    Subject: [PATCH 00/12] qom: Make all -object types use only class properties<
> 
> Eduardo Habkost (4):
>    qom: object*_property_add_bool_ptr() functions
>    autz/listfile: Use object_class_property_add_bool_ptr()
>    machine: Use object_class_property_add_bool_ptr() when possible
>    pc: Use object_class_property_add_bool_ptr()
> 
>   include/qom/object.h | 23 +++++++++++++
>   authz/listfile.c     | 27 ++-------------
>   hw/core/machine.c    | 78 ++++++++------------------------------------
>   hw/i386/pc.c         | 57 +++++---------------------------
>   qom/object.c         | 31 ++++++++++++++++++
>   5 files changed, 79 insertions(+), 137 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>