werner at openmoko.org
Mon Sep 15 22:01:30 CEST 2008
> Same problem :) *kzalloc*
Yup, assigments in expressions are generally a bad idea.
GCC will warn you if you
if (foo = bar())
and it will also warn you if you
foo == bar()
if ((foo == bar()))
all bets are off. Besides, such "hidden" assignments are easily
Also, a bit more confidence in operator precedence wouldn't be
amiss :-) E.g,
could just be
Extra parentheses where they're obviously not needed just confuse
the reader, because they suggest that there is actually some subtle
reason why they're here, and they also make things harder to read.
led_state = ((led_state >> (2 * ldrx)) & 0x03) ;
Besides this nitpicking, I didn't find anything to complain about :-)
Nice work !
Ah, one thing. It would be good to clearly mark code that's just
for general review/comments and not for inclusion into our tree. How
about using neither [PATCH] in the subject nor Signed-off-by unless
it's ready for inclusion ?
More information about the openmoko-kernel