Just a side note: Try to convert to regular coding style when yo do
functional or merely formatting changes. One thing that sticks out is
the comment style, e.g.
or
Don't use // comments, except perhaps in hacks that will go away in
another iteration before review requests, let alone merge requests.
Instead use the styles
/*
* canonical multiline
* comment style
*/
/* single line comment */
#if 0
temporarily_disabled_code;
even_more_disabled_code;
#endif
/**
* kerneldoc comment of subsystem API elements
*/
linux/scripts/checkpatch.pl will also reveal a few other formatting nits
in your patch. ;-)
Hmm, wouldn't plain and simple u8 instead of __u8 be appropriate here?
But more importantly, these most certainly should not be bitfields. From
what I have been told, bitfields aren't as strictly specified in the C
language spec as required for on-the-wire data (and for userspace ABIs
for example).
I.e. ctype/cts and suid/sutyp in the above example would need to be
collapsed into a single struct member. If there are several places in
the code accessing these bifields, then you could supply inline
functions (or second choice: preprocessor macros) as accessors.
Somebody correct me if I confused something here.
[...]
[...]
These definitions need to be replaced eventually. Nowadays we typically
define such data structures in the endianess of the hardware (I suppose
big endian), with sparse-annotated types if available, and use accessors
like cpu_to_beXX and so on to write and read such data.
I'm not saying that /you/ should do all these cleanups; but you
definitely should for example clean up comment style at places where you
cleaned up 80 column line lengths and the likes.
Thanks for keeping the ball rolling,
--
Stefan Richter
-=====-==--- =--- ----=
http://arcgraph.de/sr/
_______________________________________________
devel mailing list
devel@linuxdriverproject.orghttp://driverdev.linuxdriverproject.org/mailman/listinfo/devel