On 12 December 2016 at 10:56, Andrew Jones <drjo...@redhat.com> wrote: > On Fri, Dec 09, 2016 at 04:30:19PM +0000, Peter Maydell wrote: >> Rename all the variables which used to be VirtBoardInfo* >> and are now VirtMachineState* so their names are in line >> with the type being used. >> >> Apart from the removal of the line 'VirtMachineState *vbi = vms;' >> this commit is purely a search-and-replace of 'vbi' with 'vms'. >> >> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> >> --- >> hw/arm/virt.c | 489 >> +++++++++++++++++++++++++++++----------------------------- >> 1 file changed, 244 insertions(+), 245 deletions(-) > > We obviously need this patch, it's just a shame that git history > digging will become a bit harder after it's committed. While we > may be pretty confident we won't need another patch like it > (vms forever!), we could add another patch or two to help prepare. > I see that nearly half the uses of 'vbi' are for 'vbi->fdt'. We could > add local 'fdt = vbi->fdt' aliases in all functions that need > it. We can do the same with 'vbi->memmap/irqmap', which would > eliminate another 57. Finally machvirt_init could easly replace 9 > 'vbi->bootinfo's with a bootinfo alias. That would only leave > about 60 lines (currently, and not including the new local variable > definitions) that would need to be changed on another renaming. > Of those 60, 45 can't be changed, as they're referencing just 'vbi'. > So we'd only leave 15 lines exposed to risk of additional renaming > churn.
Well, we could, but to be honest I don't really see that much benefit from all the extra work... thanks -- PMM