On Sun, Apr 27, 2014 at 10:26:30AM +0200, Paolo Bonzini wrote: > Il 22/04/2014 13:39, Dr. David Alan Gilbert ha scritto: > >>> > >>> I agree. In many cases, _TEST is a huge review warning sign that > >>> subsections should have been used instead. > >I can see how the subsections should be used in some cases, but I've > >come across at least one case where _TEST was used to avoid the need > >for a version change. > > > >Mst's 9e047b (hw/acpi/piix4.c) replaces an existing field, if a property > >on the device is set, but if the property is as-before then the structure > >stays exactly as it was. > >I can see how that probably should have used a subsection for the new > >version of the data, but I don't see how it could have otherwise kept > >it's compatibility. > > Was there really any need to remove the existing field? Could you > simply have its contents (probably all zeroes) streamed anyway? > > (Reminds me of "#define union struct /* Wastes some memory */" :)). > > Paolo
Sure, we could do this, I just didn't see the advantage of that and it seemed cleaner. -- MST