On 04.08.2023 17:27, Nicola Vetrini wrote: > The variable declared in the header file 'xen/arch/x86/include/asm/e820.h' > is shadowed by many function parameters, so it is renamed to avoid these > violations. > > No functional changes. > > Signed-off-by: Nicola Vetrini <nicola.vetr...@bugseng.com> > --- > This patch is similar to other renames done on previous patches, and the > preferred strategy there was to rename the global variable. This one > has more occurrences that are spread in various files, but > the general pattern is the same.
Still I think it would be better done the other way around, and perhaps in more than a single patch. It looks like "many == 3", i.e. - e820_add_range(), which is only ever called with "e820" as its argument, and hence the parameter could be dropped, - e820_change_range_type(), which is in the same situation, and - reserve_e820_ram(), which wants its parameter renamed. Alternatively, if we really were to change the name of the global, we'd want to take a more complete approach: Right now we have e820_raw[], boot_e820[], and e820[]. We'd want them to follow a uniform naming scheme then (e820_ first or _e820 last), with the other part of the name suitably describing the purpose (which "map" doesn't do). Jan