On Fri, 15 Dec 2006 22:59:12 +0100, Jan Engelhardt said: > I take it that people will automatically DTRT for obscure cases like > shown before. Well, and if they don't, hopefully some reviewer catches > things like 3*i + l<<2. So I hacked up a few very ugly 'find|egrep' to look for some cases of that, and found: ./include/asm-arm/arch-ebsa110/hardware.h:18: * Region 0 (addr = 0xf0000000 + io << 2) Only one odd-looking use of +-*/ and <</>> - and it's in a comment. And that's using a pattern like '\+[^,()=]*<<' (basically, any plus sign that has a << after it, but no comma parens or equals to force grouping in between), and then using /bin/eyeball to filter the resulting several hundred lines. I admit I didn't try to catch expressions split over multiple lines, and something of the form "foo * bar + (a-b) << 2" would have snuck by (but I suspect if somebody bothered doing the (a-b), they would have another pair). So either that sort of thing isn't really an error we make often, or the reviewers are very good at catching it, or I'm a lot worse at finding them than I thought I was... :)
Attachment:
pgpdhOwKMKCJM.pgp
Description: PGP signature
- References:
- [PATCH/v2] CodingStyle updates
- From: Randy Dunlap <[email protected]>
- Re: [PATCH/v2] CodingStyle updates
- From: Pavel Machek <[email protected]>
- Re: [PATCH/v2] CodingStyle updates
- From: Stefan Richter <[email protected]>
- Re: [PATCH/v2] CodingStyle updates
- From: Pavel Machek <[email protected]>
- Re: [PATCH/v2] CodingStyle updates
- From: "Scott Preece" <[email protected]>
- Re: [PATCH/v2] CodingStyle updates
- From: Pavel Machek <[email protected]>
- Re: [PATCH/v2] CodingStyle updates
- From: Randy Dunlap <[email protected]>
- Re: [PATCH/v2] CodingStyle updates
- From: Jörn Engel <[email protected]>
- Re: [PATCH/v2] CodingStyle updates
- From: "Dmitry Torokhov" <[email protected]>
- Re: [PATCH/v2] CodingStyle updates
- From: Jan Engelhardt <[email protected]>
- Re: [PATCH/v2] CodingStyle updates
- From: Jörn Engel <[email protected]>
- Re: [PATCH/v2] CodingStyle updates
- From: Jan Engelhardt <[email protected]>
- [PATCH/v2] CodingStyle updates
- Prev by Date: Processes stuck on I/O (2.6.20-rc1+git)
- Next by Date: Re: BUG: NMI Watchdog detected LOCKUP (was: 2.6.20-rc1-mm1)
- Previous by thread: Re: [PATCH/v2] CodingStyle updates
- Next by thread: Re: [PATCH/v2] CodingStyle updates
- Index(es):