[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070429163532.2d52e4e2.randy.dunlap@oracle.com>
Date: Sun, 29 Apr 2007 16:35:32 -0700
From: Randy Dunlap <randy.dunlap@...cle.com>
To: Jan Engelhardt <jengelh@...ux01.gwdg.de>
Cc: Roland Dreier <rdreier@...co.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Dave Jones <davej@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: checkpatch, a patch checking script.
On Sat, 28 Apr 2007 10:01:00 +0200 (MEST) Jan Engelhardt wrote:
>
> On Apr 27 2007 22:58, Roland Dreier wrote:
> >
> >--- checkpatch.pl.orig 2007-04-27 20:30:34.000000000 -0700
> >+++ checkpatch.pl 2007-04-27 22:54:42.000000000 -0700
> >@@ -123,7 +123,7 @@
> > $warnings += search(qr/kernel_thread\(/, "Use kthread abstraction instead of kernel_thread()\n");
> > $warnings += search(qr/typedef/, "Do not add new typedefs.\n");
> > $warnings += search(qr/uint32_t/, "Incorrect type usage for kernel code. Use __u32 etc.\n");
> >- $warnings += search(qr/BUG(_ON)\(/, "Use WARN_ON & Recovery code rather than BUG() and BUG_ON()\n");
> >+ $warnings += search(qr/(?<!BUILD_)BUG(_ON)\(/, "Use WARN_ON & Recovery code rather than BUG() and BUG_ON()\n");
>
> I wonder what the capture is for?
> (?<!BUILD_)BUG(?:_ON) if you ask me :)
> But you could also use...
> qr/\bBUG_ON\(/
> which rules out a BUILD_BUG_ON, because _ does not constitute a word
> boundary, since _ is in \w.
Ack, I added \b. Thanks.
> And since when is uint32_t wrong? What makes u32 or __u32 better?
> We have sprintf, (k)asprintf, abs(), etc. etc. etc. tons of functions
> named similar to their ISO C counterparts, but when it comes to types,
> we make an exception?
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists