[PATCH 1/2] introduce-fiq-hdq.patch

Andy Green andy at openmoko.com
Fri Feb 15 13:10:38 CET 2008


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

Somebody in the thread at some point said:
> Andy Green wrote:
>> But the space after casts is super over-pedantic, the kernel is
>> absolutely chock full of the style I used there and CodingStyle is
>> silent about it, so I will keep that.
> 
> CodingStyle doesn't have all the rules, but K&R is generally a very
> good guide (okay, don't look at page 62 ;-) Alas, there's a lot of
> code in the kernel that doesn't play by the rules :-(

It plays by the CodingStyle rules, if it bothered upstream they would
add something about it considering the vast majority (all?) of casts in
the tree use the no-space method I used.

>> and only improves readability, I will keep this (but I will think about
>> it from now on in case I am being a stick-in-the-mud).
> 
> Good ;-) I'm not so sure parentheses improve readability - to me,
> they usually suggest "I did something that _needs_ parentheses",
> so I stop and give the expression a closer look.

Its a matter of personal style about *how* you read it, where I used
them it was because they made something clearer to me at the time, I
don't find it hard to believe for you it gets in the way, but in the end
the characters are there to form the code being written, it's not much
of a price if occasionally that means some extra brackets and I didn't
make a bug.

>>> where reasonably possible. (Rationale, as far as I remember it: on
>>> some platforms, testing for equality is more efficient than testing
>>> for order. Also, a test for equality is less likely to mask errors
>> I find this rationale very hard to believe :-)  But changed.
> 
> Thanks ! For the masked errors, one example would be this:

Point taken, it was the bit about hardware where less is more expensive
than equality I don't believe, considering this is almost totally
synchronous hardware that runs Linux rather than raw gates.

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

iD8DBQFHtYE+OjLpvpq7dMoRAkSCAJ9TQd87xO/VOdBXThgoVUQQwCAX9wCdEVXO
Z83DU5pibM2mxn0cZejAkYU=
=E5zz
-----END PGP SIGNATURE-----




More information about the openmoko-kernel mailing list