[PATCH] pcf50606: Fix wrong indexing in show_chgstate

Andy Green andy at openmoko.com
Fri Jan 25 15:33:26 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somebody in the thread at some point said:

>> It's much less of a problem that what you're fixing here, but the "real"
>> problem is that the shifted constants are used in that array.  It's
>> wasting like 80+ bytes like that in the sparsely populated array of
>> pointers to names.
> 
> Yeah, you're right but I choose to get things working first and then
> fixing that memory waste in a later (not yet written) patch as there are
> other places in that driver suffering from the same "bug". See
> chgmode_names for instance.

That one's less bad than the powers-of-two indexing method but still
that last entry in there from 0x20 -> 0x40 casually blows 256 bytes away.

Anyway it doesn't detract from your patch actually solving problems and
getting an ACK from my side.

- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHmfM2OjLpvpq7dMoRAoi/AJ0XIubtAd5FLB1TnV0Jn9Bvx2HgRgCdGuMO
FlDLVi+l6u+Cvp58QotJ8UU=
=LaG+
-----END PGP SIGNATURE-----




More information about the openmoko-kernel mailing list