On 03.02.2025 17:48, Andrew Cooper wrote: > On 03/02/2025 4:26 pm, Jan Beulich wrote: >> ... now that static initialization is possible. Use RADIX_TREE() for >> pci_segments and ivrs_maps. >> >> Requested-by: Andrew Cooper <[email protected]> >> Signed-off-by: Jan Beulich <[email protected]> > > I'd not considered having RADIX_TREE() but it's nicer than my attempt. > > However, > >> --- a/xen/include/xen/radix-tree.h >> +++ b/xen/include/xen/radix-tree.h >> @@ -72,6 +72,9 @@ struct radix_tree_root { >> *** radix-tree API starts here ** >> */ >> >> +#define RADIX_TREE_INIT() {} > > ... this ought to be (struct radix_tree_root){} so it can't be used with > other types, and radix_tree_init() wants to become: > > void radix_tree_init(struct radix_tree_root *root) > { > *root = RADIX_TREE_INIT(); > } > > instead of the raw memset(), so the connection is retained.
Can do; in fact I did consider both, but omitted them for simplicity. > Assuming you're happy with these adjustments, Reviewed-by: Andrew Cooper > <[email protected]> Thanks. Jan
