Re: [Qemu-devel] [PATCH 1/6] hw/sd.c: convert wp_groups in SDState to bitfield

2012-04-02 Thread Igor Mitsyanko
On 02.04.2012 5:42 PM, Peter Maydell wrote: On 2 April 2012 15:28, Igor Mitsyanko wrote: Representing each group write protection flag with only one bit instead of int variable significantly reduces memory consumption. Can we use the bitmap.h functions here rather than doing things by hand? (

Re: [Qemu-devel] [PATCH 1/6] hw/sd.c: convert wp_groups in SDState to bitfield

2012-04-02 Thread Peter Maydell
On 2 April 2012 15:28, Igor Mitsyanko wrote: > Representing each group write protection flag with only one bit instead of int > variable significantly reduces memory consumption. Can we use the bitmap.h functions here rather than doing things by hand? (scattered examples below, you get the idea)

[Qemu-devel] [PATCH 1/6] hw/sd.c: convert wp_groups in SDState to bitfield

2012-04-02 Thread Igor Mitsyanko
Representing each group write protection flag with only one bit instead of int variable significantly reduces memory consumption. Signed-off-by: Igor Mitsyanko --- hw/sd.c | 36 ++-- 1 files changed, 22 insertions(+), 14 deletions(-) diff --git a/hw/sd.c b/hw/s