Message ID | 20230216122524.67212-3-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | bulk: Have object_child_foreach() take Error* and return boolean | expand |
On 2/16/23 09:25, Philippe Mathieu-Daudé wrote: > The '1' returned value isn't used because > spapr_phb_get_free_liobn_cb() isn't called recursively > (it is only called once in spapr_phb_get_free_liobn()). > > The next commit will convert object_child_foreach() > handlers to return a boolean indicating error. > Remove this value to avoid confusion. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> > hw/ppc/spapr_rtas_ddw.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/ppc/spapr_rtas_ddw.c b/hw/ppc/spapr_rtas_ddw.c > index 7ba11382bc..98f1310c6e 100644 > --- a/hw/ppc/spapr_rtas_ddw.c > +++ b/hw/ppc/spapr_rtas_ddw.c > @@ -51,7 +51,6 @@ static int spapr_phb_get_free_liobn_cb(Object *child, void *opaque) > tcet = (SpaprTceTable *) object_dynamic_cast(child, TYPE_SPAPR_TCE_TABLE); > if (tcet && !tcet->nb_table) { > *(uint32_t *)opaque = tcet->liobn; > - return 1; > } > return 0; > }
diff --git a/hw/ppc/spapr_rtas_ddw.c b/hw/ppc/spapr_rtas_ddw.c index 7ba11382bc..98f1310c6e 100644 --- a/hw/ppc/spapr_rtas_ddw.c +++ b/hw/ppc/spapr_rtas_ddw.c @@ -51,7 +51,6 @@ static int spapr_phb_get_free_liobn_cb(Object *child, void *opaque) tcet = (SpaprTceTable *) object_dynamic_cast(child, TYPE_SPAPR_TCE_TABLE); if (tcet && !tcet->nb_table) { *(uint32_t *)opaque = tcet->liobn; - return 1; } return 0; }
The '1' returned value isn't used because spapr_phb_get_free_liobn_cb() isn't called recursively (it is only called once in spapr_phb_get_free_liobn()). The next commit will convert object_child_foreach() handlers to return a boolean indicating error. Remove this value to avoid confusion. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/ppc/spapr_rtas_ddw.c | 1 - 1 file changed, 1 deletion(-)