more pcf50606 patches

Werner Almesberger werner at
Sun Feb 10 22:19:48 CET 2008

Andrew Paulsen wrote:
> I don't know if you guys look at the OpenMoko bugzilla or not,

openmoko-kernel is much better than bugzilla. I'm subscribed to the
buglog list, but it's very easy to miss anything showing up there.

> I put two more patches for the pcf50606 in there to fix charge current
> measurement (1182)

Applied in revision 4041, minus the controversial cast. Reason:

ANSI C guarantees promotion to "int" (K&R 2nd Ed., A6.1), and while
ANSI C only guarantees "int" to be at least 16 bits wide (K&R 2nd Ed.,
B11.), we assume ints to be at least 32 bits all over the kernel.

Thus, the cast is redundant, and redundant casts generally make code
harder to read (as do trivially redundant parentheses) and may mask
real errors.

Thanks !

- Werner

More information about the openmoko-kernel mailing list