On 12/28/2011 05:26 PM, Peter Maydell wrote:
On 28 December 2011 12:08, Mitsyanko Igor<i.mitsya...@samsung.com>  wrote:
We couldn't properly implement save/restore functionality of SD host controllers
states without SD card's state VMStateDescription implementation. This patch
updates SD card emulation to support save/load of card's state. Update requires
changing of data type of several variables in SDState. Variables order 
rearranged
to ensure proper data alignment in SDState structure.
For consistency, because several variables now have bool datatype, API was 
modified
to use bool as well, 0 was changed to 'false' and 1 was changed to 'true' in 
those
places where it was appropriate.

If you're going to switch things to bool, can you break those out
into separate patches for the individual things you're changing,
please? Otherwise this patch is trying to do too many things
at once.

Sure, I'll split this patch into a few smaller ones, thanks.

Also, why should we care particularly about the order of
fields in SDState? There will be at most a handful of copies
of this struct in qemu, costing a handful of bytes in extra
padding. ("ensure proper data alignment" is wrong -- the compiler
does this for us.) If you feel you must rearrange things, again,
please put it in a separate patch so it's easier to read.

Why not, it wouldn't hurt anyone.

--
Mitsyanko Igor
ASWG, Moscow R&D center, Samsung Electronics
email: i.mitsya...@samsung.com

Reply via email to