[PATCH] pcf50606: Fix wrong indexing in show_chgstate
andy at openmoko.com
Fri Jan 25 15:10:44 CET 2008
-----BEGIN PGP SIGNED MESSAGE-----
Somebody in the thread at some point said:
> [ This patch was sent some time ago to Harald but I forgot to CC: the
> list. ]
> The chgstate_names array is indexed by power of two and not
> by bit number. Unfortunately, show_chgstate() is using bit numbers. This
> results in wrong output when looking at the chgstate sysfs file.
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.
Still your patch only makes it better, as in, actually work :-) and not
blow a NULL exception I guess.
-----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