All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/19] qom: Use qlit to represent property defaults
@ 2020-11-23 19:47 Eduardo Habkost
  2020-11-23 19:48 ` [PATCH v3 01/19] qnum: Make qnum_get_double() get const pointer Eduardo Habkost
                   ` (18 more replies)
  0 siblings, 19 replies; 29+ messages in thread
From: Eduardo Habkost @ 2020-11-23 19:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Daniel P. Berrangé,
	Markus Armbruster, Marc-André Lureau, Eduardo Habkost

Based-on: 20201104160021.2342108-1-ehabkost@redhat.com
Git branch: https://gitlab.com/ehabkost/qemu/-/commits/work/qdev-qlit-defaults

This extend qlit.h to support all QNum types (signed int,
unsigned int, and double), and use QLitObject to represent field
property defaults.

It allows us to get rid of most type-specific .set_default_value
functions for QOM property types.

The only remaining .set_default_value function in the code is
field_prop_set_default_value_enum().  This will take a bit more
work because the default is currently stored as int, but parsed
as string, so it will be addressed in a separate series.

Changes v2 -> v3:

* qnum/qlit patches:
  * Variable naming in qnum code
  * Coding style changes in qnum code
  * Split "qlit: Support all types of QNums"
    in smaller patches
  * Replace QLIT_QNUM with QLIT_QNUM_INT
  * Extend test cases, move most of the new test case code to
    check-qlit.c
  * Remove qnum_get_value() and qlit_get_type() function
  * Removed kernel-doc conversion patch, to reduce noise in series review
* qom patches:
  * Split "qom: Use qlit to represent property defaults" in
    smaller patches, hopefully making review easier
  * Small changes in UUID property code (See
    "qom: Don't ignore defval on UUID property" and
    "qom: Fix documentation of UUID property type")

Changes v1 -> v2:
* Rebase to latest version of field properties series
* Fix unit test failure
* Coding style changes

Eduardo Habkost (19):
  qnum: Make qnum_get_double() get const pointer
  qnum: Make num_x/num_y variables at qnum_is_equal() const
  qnum: QNumValue type for QNum value literals
  qnum: qnum_value_is_equal() function
  qlit: Use qnum_value_is_equal() when comparing QNums
  qlit: Rename QLIT_QNUM to QLIT_QNUM_INT
  qlit: Use QNumValue to represent QNums
  qlit: Move qlit_equal_qobject() reference values to array
  qlit: Add more test literals to qlit_equal_qobject() test case
  qlit: Support all types of QNums
  qom: field_prop_set_default_value() helper
  qom: Replace defval value in Property with QLitObject
  qom: Fix documentation of UUID property type
  qom: Don't ignore defval on UUID property
  qom: Make object_property_set_default() public
  qom: Make PropertyInfo.set_default_value optional
  qom: Delete field_prop_set_default_value_*int()
  qom: Delete set_default_uuid()
  qom: Delete set_default_value_bool()

 include/hw/qdev-properties-system.h   |   4 +-
 include/qapi/qmp/qlit.h               |  11 ++-
 include/qapi/qmp/qnum.h               |  26 +++++-
 include/qom/field-property-internal.h |   7 +-
 include/qom/field-property.h          |  30 +++----
 include/qom/object.h                  |  11 +++
 include/qom/property-types.h          |  18 ++--
 hw/core/qdev-properties-system.c      |  13 +--
 qobject/qlit.c                        |   5 +-
 qobject/qnum.c                        | 113 ++++++++++++++------------
 qom/field-property.c                  |  36 ++++++--
 qom/object.c                          |   2 +-
 qom/property-types.c                  |  37 ++-------
 tests/check-qjson.c                   |  30 +++----
 tests/check-qlit.c                    |  72 +++++++++++++---
 tests/check-qnum.c                    |  14 ++--
 16 files changed, 253 insertions(+), 176 deletions(-)

-- 
2.28.0




^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2020-11-24 15:19 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 19:47 [PATCH v3 00/19] qom: Use qlit to represent property defaults Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 01/19] qnum: Make qnum_get_double() get const pointer Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 02/19] qnum: Make num_x/num_y variables at qnum_is_equal() const Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 03/19] qnum: QNumValue type for QNum value literals Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 04/19] qnum: qnum_value_is_equal() function Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 05/19] qlit: Use qnum_value_is_equal() when comparing QNums Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 06/19] qlit: Rename QLIT_QNUM to QLIT_QNUM_INT Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 07/19] qlit: Use QNumValue to represent QNums Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 08/19] qlit: Move qlit_equal_qobject() reference values to array Eduardo Habkost
2020-11-24  9:51   ` Markus Armbruster
2020-11-24 14:47     ` Eduardo Habkost
2020-11-24 15:17       ` Markus Armbruster
2020-11-23 19:48 ` [PATCH v3 09/19] qlit: Add more test literals to qlit_equal_qobject() test case Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 10/19] qlit: Support all types of QNums Eduardo Habkost
2020-11-24  9:55   ` Markus Armbruster
2020-11-24 10:56     ` Paolo Bonzini
2020-11-24 12:22       ` Markus Armbruster
2020-11-24 15:03         ` Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 11/19] qom: field_prop_set_default_value() helper Eduardo Habkost
2020-11-24  9:58   ` Markus Armbruster
2020-11-24 14:44     ` Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 12/19] qom: Replace defval value in Property with QLitObject Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 13/19] qom: Fix documentation of UUID property type Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 14/19] qom: Don't ignore defval on UUID property Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 15/19] qom: Make object_property_set_default() public Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 16/19] qom: Make PropertyInfo.set_default_value optional Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 17/19] qom: Delete field_prop_set_default_value_*int() Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 18/19] qom: Delete set_default_uuid() Eduardo Habkost
2020-11-23 19:48 ` [PATCH v3 19/19] qom: Delete set_default_value_bool() Eduardo Habkost

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.