On 23.11.2024 19:20, Daniel P. Smith wrote: > --- a/xen/arch/x86/domain_builder/fdt.h > +++ b/xen/arch/x86/domain_builder/fdt.h > @@ -27,6 +27,24 @@ static inline int __init fdt_cell_as_u64(const fdt32_t > *cell, uint64_t *val) > return 0; > } > > +static inline int __init fdt_prop_as_u32( > + const struct fdt_property *prop, uint32_t *val) > +{ > + if ( !prop || fdt32_to_cpu(prop->len) < sizeof(u32) ) > + return -EINVAL; > + > + return fdt_cell_as_u32((fdt32_t *)prop->data, val); > +} > + > +static inline bool __init match_fdt_property( > + const void *fdt, const struct fdt_property *prop, const char *s) > +{ > + int slen, len = strlen(s);
Plain int isn't quite appropriate for strlen()'s return. It doesn't strictly need to be size_t, but it should be at least unsigned int. > --- a/xen/arch/x86/setup.c > +++ b/xen/arch/x86/setup.c > @@ -1020,7 +1020,8 @@ static struct domain *__init create_dom0(struct > boot_info *bi) > dom0_cfg.flags |= XEN_DOMCTL_CDF_iommu; > > /* Create initial domain. Not d0 for pvshim. */ > - bd->domid = get_initial_domain_id(); > + if ( bd->domid == DOMID_INVALID ) > + bd->domid = get_initial_domain_id(); Looks like the comment then wants to move, too. Jan