Address the TODO regarding first_valid_mfn by making the variable static when NUMA=y, thus also addressing a Misra C:2012 rule 8.4 concern (on x86).
Signed-off-by: Jan Beulich <jbeul...@suse.com> --- Julien suggests something like STATIC_IF(CONFIG_NUMA) unsigned long first_valid_mfn; but I view this as non-scalable (or at least I can't see how to implement such in a scalabale way) and hence undesirable to introduce. --- v2: New, split off. --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -254,12 +254,13 @@ static PAGE_LIST_HEAD(page_broken_list); * BOOT-TIME ALLOCATOR */ +#ifndef CONFIG_NUMA /* * first_valid_mfn is exported because it is used when !CONFIG_NUMA. - * - * TODO: Consider if we can conditionally export first_valid_mfn based - * on whether NUMA is selected. */ +#else +static +#endif mfn_t first_valid_mfn = INVALID_MFN_INITIALIZER; struct bootmem_region {