On Thu, 3 May 2007, [ISO-8859-1] S�bastien Dugu� wrote:
> On Wed, 2 May 2007 16:28:27 +0200 (CEST) Geert Uytterhoeven <[EMAIL
> PROTECTED]> wrote:
>
>
> > + $warnings += search(qr/__FUNCION__/,
>
>^__FUNCTION__ maybe?
>
> > +
On Wed, 2 May 2007 16:28:27 +0200 (CEST) Geert Uytterhoeven <[EMAIL PROTECTED]>
wrote:
> + $warnings += search(qr/__FUNCION__/,
^__FUNCTION__ maybe?
> + "Should use C99 __func__ instead of GNU
> __FUNCTION__\n");
Sébas
On Wed, 2 May 2007 21:55:16 +0200 (CEST)
Geert Uytterhoeven <[EMAIL PROTECTED]> wrote:
> On Wed, 2 May 2007, Andrew Morton wrote:
> > On Wed, 2 May 2007 17:32:49 +0200 (CEST)
> > Geert Uytterhoeven <[EMAIL PROTECTED]> wrote:
> >
> > > On Wed, 2 May 2007, Christoph Hellwig wrote:
> > > > On Wed, M
On Wed, 2 May 2007, Andrew Morton wrote:
> On Wed, 2 May 2007 17:32:49 +0200 (CEST)
> Geert Uytterhoeven <[EMAIL PROTECTED]> wrote:
>
> > On Wed, 2 May 2007, Christoph Hellwig wrote:
> > > On Wed, May 02, 2007 at 04:28:27PM +0200, Geert Uytterhoeven wrote:
> > > > - Check for GNU extension __FUN
On Wed, 2 May 2007 17:32:49 +0200 (CEST)
Geert Uytterhoeven <[EMAIL PROTECTED]> wrote:
> On Wed, 2 May 2007, Christoph Hellwig wrote:
> > On Wed, May 02, 2007 at 04:28:27PM +0200, Geert Uytterhoeven wrote:
> > > - Check for GNU extension __FUNCTION__
> >
> > __FUNCTION__ is prefered over __fun
On May 2 2007 16:29, Christoph Hellwig wrote:
>On Wed, May 02, 2007 at 04:28:27PM +0200, Geert Uytterhoeven wrote:
>> - Check for GNU extension __FUNCTION__
>
>__FUNCTION__ is prefered over __func__
`info gcc` tells:
`__FUNCTION__' is another name for `__func__'. Older versions of GCC
reco
On May 2 2007 16:28, Geert Uytterhoeven wrote:
> - Check for all of (u)int{8,16,32,64}_t
I strongly disagree. These should be allowed, for they are (I think) C99.
Jan
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Mo
On Wed, 2 May 2007, Christoph Hellwig wrote:
> On Wed, May 02, 2007 at 04:28:27PM +0200, Geert Uytterhoeven wrote:
> > - Check for GNU extension __FUNCTION__
>
> __FUNCTION__ is prefered over __func__
Is there a reason for that?
- __FUNCTION__ is a GNU extension
- __func__ is C99
- __fun
On Wed, May 02, 2007 at 04:28:27PM +0200, Geert Uytterhoeven wrote:
> - Check for GNU extension __FUNCTION__
__FUNCTION__ is prefered over __func__
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at htt
On Fri, 27 Apr 2007, Dave Jones wrote:
> On Wed, Apr 25, 2007 at 08:02:07PM -0700, Andrew Morton wrote:
> > > Yep, I was going to mention your scripts but you beat me to it.
> > >
> > > I'll be glad to help maintain such animals if wanted.
> > >
> > wanted ;)
> >
> > At least, it would be
On Fri, 27 Apr 2007 23:08:05 -0400 Dave Jones wrote:
> On Wed, Apr 25, 2007 at 08:02:07PM -0700, Andrew Morton wrote:
>
> > > Yep, I was going to mention your scripts but you beat me to it.
> > >
> > > I'll be glad to help maintain such animals if wanted.
> > >
> > wanted ;)
> >
> > At
On Sun, Apr 29, 2007 at 05:18:00PM -0700, Randy Dunlap wrote:
> Matt Mackall wrote:
> >On Sun, Apr 29, 2007 at 04:37:01PM -0700, Randy Dunlap wrote:
> >>On Sat, 28 Apr 2007 12:21:54 -0500 Matt Mackall wrote:
> >>
> >>>On Sat, Apr 28, 2007 at 01:11:01PM -0400, Dave Jones wrote:
> On Sat, Apr 28,
On Fri, 27 Apr 2007 22:18:03 -0700 Andrew Morton wrote:
> On Fri, 27 Apr 2007 23:08:05 -0400 Dave Jones <[EMAIL PROTECTED]> wrote:
>
> > You can find the script at http://www.codemonkey.org.uk/projects/checkpatch/
>
> hm.
>
...
> box:/usr/src/25> ~/checkpatch.pl patches/git-powerpc.patch
> Che
On Fri, 27 Apr 2007 20:36:17 -0700 Roland Dreier wrote:
> > http://www.codemonkey.org.uk/projects/checkpatch/example.log shows
> > what fell out of running it on my mbox of lkml from the past month.
> > Some of them are kinda noisy, and perhaps should be moved under --pedantic
> >
> > I'm al
Matt Mackall wrote:
On Sun, Apr 29, 2007 at 04:37:01PM -0700, Randy Dunlap wrote:
On Sat, 28 Apr 2007 12:21:54 -0500 Matt Mackall wrote:
On Sat, Apr 28, 2007 at 01:11:01PM -0400, Dave Jones wrote:
On Sat, Apr 28, 2007 at 11:11:36AM -0500, Matt Mackall wrote:
> > I'm all ears for additional r
On Sun, Apr 29, 2007 at 04:37:01PM -0700, Randy Dunlap wrote:
> On Sat, 28 Apr 2007 12:21:54 -0500 Matt Mackall wrote:
>
> > On Sat, Apr 28, 2007 at 01:11:01PM -0400, Dave Jones wrote:
> > > On Sat, Apr 28, 2007 at 11:11:36AM -0500, Matt Mackall wrote:
> > > > > I'm all ears for additional regexp
On Sat, 28 Apr 2007 12:21:54 -0500 Matt Mackall wrote:
> On Sat, Apr 28, 2007 at 01:11:01PM -0400, Dave Jones wrote:
> > On Sat, Apr 28, 2007 at 11:11:36AM -0500, Matt Mackall wrote:
> > > > I'm all ears for additional regexps, bug reports or other suggestions.
> > >
> > > Neat.
> > >
> > >
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.0 -0700
> >+++ checkpatch.pl2007-04-27 22:54:42.0 -0700
> >@@ -123,7 +123,7 @@
> > $warnings += search(qr/
Dave Jones wrote:
On Sat, Apr 28, 2007 at 03:02:13AM -0700, Andrew Morton wrote:
> This little checking tool should have both "error" and "warning" levels -
> AKA "fix this" and "think about this" levels. BUG_ON would be a warning
> thing.
There's a -pedantic option there just for this. I'
On Sat, Apr 28, 2007 at 01:11:01PM -0400, Dave Jones wrote:
> On Sat, Apr 28, 2007 at 11:11:36AM -0500, Matt Mackall wrote:
> > > I'm all ears for additional regexps, bug reports or other suggestions.
> >
> > Neat.
> >
> > Does it check for:
> >
> > functions marked extern?
> > pulling i
On Sat, Apr 28, 2007 at 11:11:36AM -0500, Matt Mackall wrote:
> > I'm all ears for additional regexps, bug reports or other suggestions.
>
> Neat.
>
> Does it check for:
>
> functions marked extern?
> pulling in external functions or variables without a header file?
> return used as a f
On Sat, Apr 28, 2007 at 03:02:13AM -0700, Andrew Morton wrote:
> This little checking tool should have both "error" and "warning" levels -
> AKA "fix this" and "think about this" levels. BUG_ON would be a warning
> thing.
There's a -pedantic option there just for this. I'll move BUG_ON under
On Fri, Apr 27, 2007 at 11:08:05PM -0400, Dave Jones wrote:
> On Wed, Apr 25, 2007 at 08:02:07PM -0700, Andrew Morton wrote:
>
> > > Yep, I was going to mention your scripts but you beat me to it.
> > >
> > > I'll be glad to help maintain such animals if wanted.
> > >
> > wanted ;)
> >
>
> > At least one way to handle BUG_ON() type situations more cleanly (for
> > some anyway) is to fake a hot-unplug/plug event. Thats something that
>
> That would have a high risk of deadlock on some lost lock.
Well I was assuming you'd code this up in the driver not arbitarily - and
you need to
On Sat, Apr 28, 2007 at 11:15:04AM +0100, Alan Cox wrote:
> > > The warning is bogus imho. How do you write recovery code for internal
> > > broken code logic?
> >
> > Yes, it is marginal. But people do very often reach for BUG_ON() where
> > they could have at least partly recovered in some fas
On Apr 28 2007 01:16, Andrew Morton wrote:
>On Sat, 28 Apr 2007 10:01:00 +0200 (MEST) Jan Engelhardt wrote:
>
>> And since when is uint32_t wrong? What makes u32 or __u32 better?
>
>There's not much to be said in favour of u32, really. Except it's
>shorter and I can never remember where the under
> > The warning is bogus imho. How do you write recovery code for internal
> > broken code logic?
>
> Yes, it is marginal. But people do very often reach for BUG_ON() where
> they could have at least partly recovered in some fashion - enough for the
> info to hit the logs so we have a better cha
On 28 Apr 2007 12:48:55 +0200 Andi Kleen <[EMAIL PROTECTED]> wrote:
> Andrew Morton <[EMAIL PROTECTED]> writes:
>
> > box:/usr/src/25> ~/checkpatch.pl patches/slub-core.patch
> > Checking patches/slub-core.patch: signoffs = 30
> > Use WARN_ON & Recovery code rather than BUG() and BUG_ON(
Roland Dreier <[EMAIL PROTECTED]> writes:
> > Checking patches/git-infiniband.patch: signoffs = 113
> > Use WARN_ON & Recovery code rather than BUG() and BUG_ON()
> > 8143:+ BUG_ON(mlx4_ib_alloc_db_from_pgdir(pgdir, db, order));
> > 12629:+ BUG_ON(cmd->free_head < 0);
> > 16580:+ BU
Andrew Morton <[EMAIL PROTECTED]> writes:
> box:/usr/src/25> ~/checkpatch.pl patches/slub-core.patch
> Checking patches/slub-core.patch: signoffs = 30
> Use WARN_ON & Recovery code rather than BUG() and BUG_ON()
The warning is bogus imho. How do you write recovery code for internal
broke
On Sat, 28 Apr 2007 10:01:00 +0200 (MEST) Jan Engelhardt <[EMAIL PROTECTED]>
wrote:
> And since when is uint32_t wrong? What makes u32 or __u32 better?
There's not much to be said in favour of u32, really. Except it's shorter
and I can never remember where the underscore goes in uint_32t.
If k
On Apr 27 2007 22:58, Roland Dreier wrote:
>
>--- checkpatch.pl.orig 2007-04-27 20:30:34.0 -0700
>+++ checkpatch.pl 2007-04-27 22:54:42.0 -0700
>@@ -123,7 +123,7 @@
> $warnings += search(qr/kernel_thread\(/, "Use kthread abstraction
> instead of kernel_thread()\n");
>
> Use WARN_ON & Recovery code rather than BUG() and BUG_ON()
> 23286:+ BUILD_BUG_ON(BCM43xx_SEC_KEYSIZE < ETH_ALEN);
BTW, I missed this before -- BUILD_BUG_ON() is actually far better
than WARN_ON(), I think.
Maybe something like this? (Although someone who knows perl probably
has a better way
> box:/usr/src/25> ~/checkpatch.pl patches/git-infiniband.patch
Yup, I ran this too.
> Checking patches/git-infiniband.patch: signoffs = 113
> Use WARN_ON & Recovery code rather than BUG() and BUG_ON()
> 8143:+ BUG_ON(mlx4_ib_alloc_db_from_pgdir(pgdir, db, order));
> 12629:+ BUG_ON(cmd->f
On Fri, 27 Apr 2007 23:08:05 -0400 Dave Jones <[EMAIL PROTECTED]> wrote:
> You can find the script at http://www.codemonkey.org.uk/projects/checkpatch/
hm.
box:/usr/src/25> ~/checkpatch.pl patches/slub-core.patch
Checking patches/slub-core.patch: signoffs = 30
Use WARN_ON & Recovery cod
On Fri, Apr 27, 2007 at 08:36:17PM -0700, Roland Dreier wrote:
>...
> Also, it would be nice to be able to do something like
>
> git diff v2.6.20..|perl ~/checkpatch.pl -
>...
perl ~/checkpatch.pl <(git diff v2.6.20..)
> - R.
cu
Adrian
--
"Is there not promise of rain?" Ling Ta
> http://www.codemonkey.org.uk/projects/checkpatch/example.log shows
> what fell out of running it on my mbox of lkml from the past month.
> Some of them are kinda noisy, and perhaps should be moved under --pedantic
>
> I'm all ears for additional regexps, bug reports or other suggestions.
L
On Wed, Apr 25, 2007 at 08:02:07PM -0700, Andrew Morton wrote:
> > Yep, I was going to mention your scripts but you beat me to it.
> >
> > I'll be glad to help maintain such animals if wanted.
> >
> wanted ;)
>
> At least, it would be interesting to investigate the usefulness. I suspect
38 matches
Mail list logo