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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andy Whitcroft <apw@...>
Cc: Andrew Morton <akpm@...>, Randy Dunlap <rdunlap@...>, Joel Schopp <jschopp@...>, Linus Torvalds <torvalds@...>, <linux-kernel@...>
Date: Friday, October 5, 2007 - 1:56 am

here is an update wrt. the latest checkpatch.pl-next version 
(v11-to-be), about kernel/sched.c warnings:


    35948  checkpatch.pl.v11pre   11

so things are heading in the right direction :)

of those 11 warnings, 6 are correct warnings (4 will be solved via 
KERN_CONT, 1 will be solved via a proper include file, and 1 is an 
overlength line), 4 are borderline warnings (easily fixed) and only one 
is a false positive! So v11-to-be gets the "best checkpatch.pl ever" 
badge from me :)

The false positive is:

  ERROR: need consistent spacing around '*' (ctx:WxV)
  #5322: 
  +static ctl_table *sd_alloc_ctl_cpu_table(int cpu)
                    ^

i think checkpatch.pl mistook this function definition as an arithmetic 
expression?

But, there's a cleanliness bug underlying this false positive: 
'ctl_table' is a typedef, and it would be cleaner to use 'struct 
ctl_table' thoughout the kernel. When running checkpatch.pl over 
include/linux/sysctl.h, it warns about the typedef:

  WARNING: do not add new typedefs
  #944: 
  +typedef struct ctl_table ctl_table;

(but mistaking that function for an arithmetic expression is still a bug 
i think.)

nice work Andy!

	Ingo
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Wed Sep 12, 11:00 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Sep 28, 4:40 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 5:52 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andrew Morton, (Fri Sep 28, 5:01 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Sep 28, 5:44 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 5:22 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Sep 28, 5:39 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 6:00 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Sam Ravnborg, (Fri Sep 28, 12:51 pm)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Sep 28, 6:49 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Oct 5, 1:56 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 9:21 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andrew Morton, (Fri Sep 28, 1:46 pm)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Sat Sep 29, 5:22 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Randy Dunlap, (Fri Sep 28, 1:26 pm)
Re: [PATCH] update checkpatch.pl to version 0.10, Joel Schopp, (Fri Sep 28, 11:50 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Pekka Enberg, (Fri Sep 28, 9:37 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 10:02 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Christian Borntraeger, (Fri Sep 28, 6:46 am)
Re: [PATCH] update checkpatch.pl to version 0.10, WANG Cong, (Fri Sep 28, 7:03 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Jan Engelhardt, (Fri Sep 28, 10:19 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Randy Dunlap, (Fri Sep 28, 12:57 pm)