Re: [PATCH 2.6.23] ibmebus: Prevent bus_id collisions

2007-08-29 Thread jschopp
+ len = strlen(dn->full_name + 1); + bus_len = min(len, BUS_ID_SIZE - 1); + memcpy(dev->ofdev.dev.bus_id, dn->full_name + 1 + + (len - bus_len), bus_len); + for (i = 0; i < bus_len; i++) + if (dev->ofdev.dev.bus_id[i] == '/') +

Re: Make checkpatch warn about pointless casting of kalloc returns.

2007-08-08 Thread jschopp
> > +WARN("No need to cast return value.\n"); > > Could the warning be more descriptive? This describes what, but it should also describe > why; after all if somebody made this error they may not know they why. I'm open to suggestions.. How about WARN("No need to ca

Re: Make checkpatch warn about pointless casting of kalloc returns.

2007-08-08 Thread jschopp
+# check for pointless casting of kmalloc return + if ($rawline =~ /\*\)[ ]k[czm]alloc/) { It looks to me like this will catch foo = (char *) kmalloc(512); but not for = (char* )kmalloc(512); I haven't tried it but how about something like: if($rawline =~/\(.*\)\s*k[czm]alloc/

Re: [PATCH] update checkpatch.pl to version 0.08

2007-07-24 Thread jschopp
So, no we shouldn't separate out CodingStyle because Better CodingStyle == less bugs and Better CodingStyle == more throughput for maintainers To some extent yes. But extreme codingstyling won't gain you anything. Except for long and fruitless discussions. If a tool says anything would be

Re: [PATCH] update checkpatch.pl to version 0.08

2007-07-24 Thread jschopp
Yep I think the consensus is we need a "--i-don't-agree-just-check-things-which-will-get-me-rejected-out-of-hand" option of some sort which will restrict output to the real errors. No, the default should be to show only the real errors. CodingStyle violations are real errors. If we have agre

Re: [PATCH] update checkpatch.pl to version 0.08

2007-07-24 Thread jschopp
> checkpatch has been quite useful for catching obviously broken things, and now it seems like it's just overreaching. Perhaps this functionality can be split in to a lite checkpatch for catching show-stoppers for application and then something more akin to a CodingStyle validator for the folks

Re: [PATCH] update checkpatch.pl to version 0.08

2007-07-24 Thread jschopp
within the last 3 weeks, this script went from *really usable* to *a big noise maker*. As we (mostly Andy of late) add more checks (good) there is bound to be some code we just didn't forsee that generates false positives (bad). You can see a consistent history of cleaning these up as quickly

Re: checkpatch.pl: should be executable

2007-06-07 Thread jschopp
Andy Whitcroft wrote: scripts/checkpatch.pl should be executable, make it so. Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl old mode 100644 new mode 100755 Acked-by: Joel Schopp <[EMAIL PROTECTED]> - To unsubscribe from this l

Re: [PATCH] update checkpatch.pl to version 0.03

2007-06-04 Thread jschopp
The original suggestion was to count them and only complain if there were "lots". I had thought though that the general consensus was that #ifdef in C files was pretty much frowned upon. I must admit to working to the "you must be able to justify all winges in the output" rather than expecting t

Re: [PATCH] update checkpatch.pl to version 0.03

2007-06-04 Thread jschopp
This version brings a host of changes to cure false positives and bugs detected on patches submitted to lkml and -mm. It also brings a number of new tests in response to reviews, of particular note: - catch use of volatile - allow deprecated functions to be listed in feature-removal-schedule

Re: patch style checks

2007-04-27 Thread jschopp
Methinks it should do `exit 1' if anything was detected. [Joel in case you'd not spotted this discussion, your patchstylecheckemail script was found ... Also this has produced a little patch series improving the tool. Where would you like that sent?] Heh. It's pretty crude but I've found i