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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Thursday, October 4, 2007 - 10:56 pm

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, 8:00 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Sep 28, 1:40 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andrew Morton, (Fri Sep 28, 2:01 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 2:22 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Sep 28, 2:39 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Sep 28, 2:44 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 2:52 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 3:00 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Christian Borntraeger, (Fri Sep 28, 3:46 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Sep 28, 3:49 am)
Re: [PATCH] update checkpatch.pl to version 0.10, WANG Cong, (Fri Sep 28, 4:03 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 6:21 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Pekka Enberg, (Fri Sep 28, 6:37 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 7:02 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Jan Engelhardt, (Fri Sep 28, 7:19 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Joel Schopp, (Fri Sep 28, 8:50 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Sam Ravnborg, (Fri Sep 28, 9:51 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Randy Dunlap, (Fri Sep 28, 9:57 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Randy Dunlap, (Fri Sep 28, 10:26 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andrew Morton, (Fri Sep 28, 10:46 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Sat Sep 29, 2:22 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Thu Oct 4, 10:56 pm)