| Message ID | 20261104064552.959862-3-armbru@redhat.com |
|---|---|
| State | New |
| Headers | show |
| Series | qom/qdev: associate properties with QAPI types fixups | expand |
On 4/11/26 07:45, Markus Armbruster wrote: > pca955x_initfn() passes @type "bool" to object_property_add(). The > properties are actually string-typed: pca955x_get_led() and > pca955x_set_led() use visit_type_str(). Pass "str" instead. > > Fixes: a90d8f84674d ("misc/pca9552: Add qom set and get") > Signed-off-by: Markus Armbruster <armbru@redhat.com> > --- > hw/gpio/pca9552.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Glenn Miles <milesg@linux.ibm.com> Thanks, Glenn On Wed, 2026-11-04 at 07:45 +0100, Markus Armbruster wrote: > pca955x_initfn() passes @type "bool" to object_property_add(). The > properties are actually string-typed: pca955x_get_led() and > pca955x_set_led() use visit_type_str(). Pass "str" instead. > > Fixes: a90d8f84674d ("misc/pca9552: Add qom set and get") > Signed-off-by: Markus Armbruster <armbru@redhat.com> > --- > hw/gpio/pca9552.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/gpio/pca9552.c b/hw/gpio/pca9552.c > index 7e5fda4980..07ef0fb20b 100644 > --- a/hw/gpio/pca9552.c > +++ b/hw/gpio/pca9552.c > @@ -567,7 +567,7 @@ static void pca955x_initfn(Object *obj) > if (k->has_led_support) { > /* LED variant: expose the LED selector state as led%d. */ > name = g_strdup_printf("led%d", ix); > - object_property_add(obj, name, "bool", NULL, > + object_property_add(obj, name, "str", NULL, > pca955x_get_led, pca955x_set_led, NULL, NULL); > } else { > /* GPIO variant: expose the pin logic level as pin%d. */
diff --git a/hw/gpio/pca9552.c b/hw/gpio/pca9552.c index 7e5fda4980..07ef0fb20b 100644 --- a/hw/gpio/pca9552.c +++ b/hw/gpio/pca9552.c @@ -567,7 +567,7 @@ static void pca955x_initfn(Object *obj) if (k->has_led_support) { /* LED variant: expose the LED selector state as led%d. */ name = g_strdup_printf("led%d", ix); - object_property_add(obj, name, "bool", NULL, + object_property_add(obj, name, "str", NULL, pca955x_get_led, pca955x_set_led, NULL, NULL); } else { /* GPIO variant: expose the pin logic level as pin%d. */
pca955x_initfn() passes @type "bool" to object_property_add(). The properties are actually string-typed: pca955x_get_led() and pca955x_set_led() use visit_type_str(). Pass "str" instead. Fixes: a90d8f84674d ("misc/pca9552: Add qom set and get") Signed-off-by: Markus Armbruster <armbru@redhat.com> --- hw/gpio/pca9552.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)