From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rfu5C-0004nI-FI for qemu-devel@nongnu.org; Wed, 28 Dec 2011 09:02:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rfu5A-0005az-J9 for qemu-devel@nongnu.org; Wed, 28 Dec 2011 09:02:18 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:44112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rfu5A-0005ai-Bl for qemu-devel@nongnu.org; Wed, 28 Dec 2011 09:02:16 -0500 Received: from euspt2 (mailout2.w1.samsung.com [210.118.77.12]) by mailout2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0LWX00E122ZO6D@mailout2.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 28 Dec 2011 14:02:12 +0000 (GMT) Received: from [106.109.8.52] by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LWX0014C2ZM61@spt2.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 28 Dec 2011 14:02:12 +0000 (GMT) Date: Wed, 28 Dec 2011 18:02:10 +0400 From: Mitsyanko Igor In-reply-to: Message-id: <4EFB2162.1090702@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7BIT References: <1324893824-13558-1-git-send-email-i.mitsyanko@samsung.com> <1325074125-13146-1-git-send-email-i.mitsyanko@samsung.com> <1325074125-13146-3-git-send-email-i.mitsyanko@samsung.com> Subject: Re: [Qemu-devel] [PATCH V2 2/3] hw/sd.c: add SD card save/load support Reply-To: i.mitsyanko@samsung.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , e.voevodin@samsung.com, quintela@redhat.com, kyungmin.park@samsung.com, d.solodkiy@samsung.com, m.kozlov@samsung.com, jehyung.lee@samsung.com, afaerber@suse.de On 12/28/2011 05:26 PM, Peter Maydell wrote: > On 28 December 2011 12:08, Mitsyanko Igor 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.mitsyanko@samsung.com