Hi Prafulla,
On Fri, Oct 7, 2011 at 7:36 PM, Prafulla Wadaskar <[email protected]> wrote:
>
>
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]]
>> On Behalf Of Lei Wen
>> Sent: Thursday, October 06, 2011 8:41 PM
>> To: Marek Vasut
>> Cc: Lei Wen; [email protected]; Andy Fleming
>> Subject: Re: [U-Boot] [PATCH V2 1/2] mmc: change magic number to macro
>> define
>>
>> Hi Marek,
>>
>> On Tue, Oct 4, 2011 at 8:07 PM, Marek Vasut <[email protected]>
>> wrote:
>> >
>> > Hi Lei,
>> > this is better, but what about structure-based access ?
>> >
>> > struct somrthing {
>> > u8 a1;
>> > u8 a2;
>> > ...
>> > };
>> >
>> > Like this.
>> >
>> > Also, CC Andy.
>> >
>>
>> The ext_csd current usage in mmc.c is not too much, here I mean only few
>> of
>> the fields of the ext_csd is used, also fully definition of ext_csd
>> member would seems so huge a structure at its appearence...
>>
>> So macro may looks more concise and could parse from its meaning easily
>> enough.
>>
>> Anyway, more comments on this welcomes. :)
>
> Dear Lei
> Using c-struct is our strategy, may be full definition is huge, you may skip
> them inserting padding in the c-struct.
I personally prefer the complete struct to be defined from day one. This
means you don't have to patch it when you end up needing to use another
member later on and risk fouling up the offsets
Regards,
Graeme
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot