[PATCH 09/10] fix-pcf50633-migrate-gta02-peripherals-out.patch

Andy Green andy at openmoko.com
Thu Jun 19 10:05:00 CEST 2008


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

Somebody in the thread at some point said:
| Andy Green wrote:
|> pcf50633.c shouldn't know GTAxx at all.
|
| Yeah, glad to see that mess go ! ;-)
|
| One nitpick:
|
|> +int pcf50633_wait_for_ready(struct pcf50633_data *pcf, int timeout_ms,
|> +								char *name)
|> +{
|> +	/* so we always go once */
|> +	timeout_ms += 5;
|> +
|> +	while ((timeout_ms >= 5) && (pcf50633_ready(pcf))) {
|> +		timeout_ms -= 5; /* well, it isn't very accurate, but OK */
|> +		msleep(5);
|> +	}
|> +
|> +	if (timeout_ms < 5) {
|
| That seems a bit contorted. Why not just make the whole thing
| zero-based ? BTW, not even Pascal makes you put parentheses around
| functions returning a boolean ;-)

Fair enough, but actually the use I had in mind for that went away, we
can nuke that whole function I think.

- -Andy

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

iEYEARECAAYFAkhaEywACgkQOjLpvpq7dMoMLACfRLrZzpiem8QBQWMPNuOTYf3J
4XEAoJYrrOsw65hj1otfZ1JOj3EkjnYk
=DmkZ
-----END PGP SIGNATURE-----




More information about the openmoko-kernel mailing list