[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V2 2/3] hw/sd.c: add SD card save/load support

From: Mitsyanko Igor
Subject: Re: [Qemu-devel] [PATCH V2 2/3] hw/sd.c: add SD card save/load support
Date: Wed, 28 Dec 2011 18:02:10 +0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20111109 Thunderbird/3.1.16

On 12/28/2011 05:26 PM, Peter Maydell wrote:
On 28 December 2011 12:08, Mitsyanko Igor<address@hidden>  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 
to ensure proper data alignment in SDState structure.
For consistency, because several variables now have bool datatype, API was 
to use bool as well, 0 was changed to 'false' and 1 was changed to 'true' in 
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: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]