On Tue, Jan 12, 2010 at 2:56 PM, Matthias Fuchs <[email protected]> wrote:
> On Monday 11 January 2010 21:10, Wolfgang Grandegger wrote:
>> We are close, just a few more issues.
> Uff :-)
>
>> > +struct header_msg {
>> > +   __u8 len; /* len is always the total message length in 32bit words */
>> > +   __u8 cmd;
>> > +   __u8 rsvd[2];
>> > +};
>>
>> Please use just one type set. Either u8 or __u8 but not both. The same
>> for __u32, __le32, etc.
> Good point. Marc invented some versions before to use __le32 instead of
> u32 in these device structures.
> As far as I understand this should signal that these are some kind
> of exchange types (typically with userspace programs or in this case
> a device).
> I am using __ types for all structures that are exchanged with the hardware.
> All other datatypes stay in the kernel.
>
> So what's correct?
As far as I understood the CodingStyle [1] document recommends you
should use __ types
when data is exchanged between kernel / userspace and for the rest you
should use u8/u16 etc.
Also from the CodingStyle document I understand that is recommended to
use uint8_t over u8.
Does anyone have another suggestion?

thanks,
Daniel

[1]http://lxr.linux.no/#linux+v2.6.32/Documentation/CodingStyle#L317
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to