more pcf50606 patches
andy at openmoko.com
Fri Jan 25 20:37:09 CET 2008
-----BEGIN PGP SIGNED MESSAGE-----
Somebody in the thread at some point said:
>> change my patch to make it less clear what is going on. I'm not sure
>> why you're fighting this, the patched version is more clear, is
>> correct, and has absolutely no penalty.
Let me turn it around -- what you're patching with that bit of it isn't
broken... it works and the language C specifies it will always work.
There's no need to cast it except that you feel it makes the fact of
what the compiler must do "clearer" to you personally. Here's what
we're talking about:
+ int32_t res = ((int32_t)(adc_adcin1 - adc_batvolt) * 2400);
The cast does nothing and IMO clarifies nothing. In terms of correctness
+ int32_t a = (int32_t)(int32_t)(int32_t)(int32_t)5;
is "correct" but it's just as pointless.
I'm just helping out reviewing your patch, Werner maintains that code.
I said my comments and I'll sleep well whether that bit goes in or out:
I'm grateful for the rest of your patch anyway and think you did a nice
job identifying the other problems and stepping up to provide fixes :-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the openmoko-kernel