diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:38:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:38:49 -0500 |
commit | 7c2db36e730ee4facd341679ecb21ee73ba92831 (patch) | |
tree | 75016fba72aaf0581b9263f7fa4c565e6e634f3c /scripts | |
parent | 8b5628ab83b671f96ac9f174c1bd51c92589fc82 (diff) | |
parent | a47a376f1c025e23e836c0376813c0424de665c2 (diff) |
Merge branch 'akpm' (incoming from Andrew)
Merge misc patches from Andrew Morton:
- Florian has vanished so I appear to have become fbdev maintainer
again :(
- Joel and Mark are distracted to welcome to the new OCFS2 maintainer
- The backlight queue
- Small core kernel changes
- lib/ updates
- The rtc queue
- Various random bits
* akpm: (164 commits)
rtc: rtc-davinci: use devm_*() functions
rtc: rtc-max8997: use devm_request_threaded_irq()
rtc: rtc-max8907: use devm_request_threaded_irq()
rtc: rtc-da9052: use devm_request_threaded_irq()
rtc: rtc-wm831x: use devm_request_threaded_irq()
rtc: rtc-tps80031: use devm_request_threaded_irq()
rtc: rtc-lp8788: use devm_request_threaded_irq()
rtc: rtc-coh901331: use devm_clk_get()
rtc: rtc-vt8500: use devm_*() functions
rtc: rtc-tps6586x: use devm_request_threaded_irq()
rtc: rtc-imxdi: use devm_clk_get()
rtc: rtc-cmos: use dev_warn()/dev_dbg() instead of printk()/pr_debug()
rtc: rtc-pcf8583: use dev_warn() instead of printk()
rtc: rtc-sun4v: use pr_warn() instead of printk()
rtc: rtc-vr41xx: use dev_info() instead of printk()
rtc: rtc-rs5c313: use pr_err() instead of printk()
rtc: rtc-at91rm9200: use dev_dbg()/dev_err() instead of printk()/pr_debug()
rtc: rtc-rs5c372: use dev_dbg()/dev_warn() instead of printk()/pr_debug()
rtc: rtc-ds2404: use dev_err() instead of printk()
rtc: rtc-efi: use dev_err()/dev_warn()/pr_err() instead of printk()
...
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 26 | ||||
-rwxr-xr-x | scripts/get_maintainer.pl | 2 | ||||
-rwxr-xr-x | scripts/tags.sh | 24 |
3 files changed, 45 insertions, 7 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 2bb08a962ce3..747bcd768da0 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -1931,6 +1931,12 @@ sub process { | |||
1931 | "use the SSYNC() macro in asm/blackfin.h\n" . $herevet); | 1931 | "use the SSYNC() macro in asm/blackfin.h\n" . $herevet); |
1932 | } | 1932 | } |
1933 | 1933 | ||
1934 | # check for old HOTPLUG __dev<foo> section markings | ||
1935 | if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) { | ||
1936 | WARN("HOTPLUG_SECTION", | ||
1937 | "Using $1 is unnecessary\n" . $herecurr); | ||
1938 | } | ||
1939 | |||
1934 | # Check for potential 'bare' types | 1940 | # Check for potential 'bare' types |
1935 | my ($stat, $cond, $line_nr_next, $remain_next, $off_next, | 1941 | my ($stat, $cond, $line_nr_next, $remain_next, $off_next, |
1936 | $realline_next); | 1942 | $realline_next); |
@@ -2430,6 +2436,15 @@ sub process { | |||
2430 | "Prefer pr_warn(... to pr_warning(...\n" . $herecurr); | 2436 | "Prefer pr_warn(... to pr_warning(...\n" . $herecurr); |
2431 | } | 2437 | } |
2432 | 2438 | ||
2439 | if ($line =~ /\bdev_printk\s*\(\s*KERN_([A-Z]+)/) { | ||
2440 | my $orig = $1; | ||
2441 | my $level = lc($orig); | ||
2442 | $level = "warn" if ($level eq "warning"); | ||
2443 | $level = "dbg" if ($level eq "debug"); | ||
2444 | WARN("PREFER_DEV_LEVEL", | ||
2445 | "Prefer dev_$level(... to dev_printk(KERN_$orig, ...\n" . $herecurr); | ||
2446 | } | ||
2447 | |||
2433 | # function brace can't be on same line, except for #defines of do while, | 2448 | # function brace can't be on same line, except for #defines of do while, |
2434 | # or if closed on same line | 2449 | # or if closed on same line |
2435 | if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and | 2450 | if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and |
@@ -2915,6 +2930,7 @@ sub process { | |||
2915 | my $var = $1; | 2930 | my $var = $1; |
2916 | if ($var !~ /$Constant/ && | 2931 | if ($var !~ /$Constant/ && |
2917 | $var =~ /[A-Z]\w*[a-z]|[a-z]\w*[A-Z]/ && | 2932 | $var =~ /[A-Z]\w*[a-z]|[a-z]\w*[A-Z]/ && |
2933 | $var !~ /^Page[A-Z]/ && | ||
2918 | !defined $camelcase{$var}) { | 2934 | !defined $camelcase{$var}) { |
2919 | $camelcase{$var} = 1; | 2935 | $camelcase{$var} = 1; |
2920 | WARN("CAMELCASE", | 2936 | WARN("CAMELCASE", |
@@ -3237,9 +3253,9 @@ sub process { | |||
3237 | } | 3253 | } |
3238 | 3254 | ||
3239 | # prefer usleep_range over udelay | 3255 | # prefer usleep_range over udelay |
3240 | if ($line =~ /\budelay\s*\(\s*(\w+)\s*\)/) { | 3256 | if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) { |
3241 | # ignore udelay's < 10, however | 3257 | # ignore udelay's < 10, however |
3242 | if (! (($1 =~ /(\d+)/) && ($1 < 10)) ) { | 3258 | if (! ($1 < 10) ) { |
3243 | CHK("USLEEP_RANGE", | 3259 | CHK("USLEEP_RANGE", |
3244 | "usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $line); | 3260 | "usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $line); |
3245 | } | 3261 | } |
@@ -3460,6 +3476,12 @@ sub process { | |||
3460 | "unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr); | 3476 | "unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr); |
3461 | } | 3477 | } |
3462 | 3478 | ||
3479 | # check for alloc argument mismatch | ||
3480 | if ($line =~ /\b(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) { | ||
3481 | WARN("ALLOC_ARRAY_ARGS", | ||
3482 | "$1 uses number as first arg, sizeof is generally wrong\n" . $herecurr); | ||
3483 | } | ||
3484 | |||
3463 | # check for multiple semicolons | 3485 | # check for multiple semicolons |
3464 | if ($line =~ /;\s*;\s*$/) { | 3486 | if ($line =~ /;\s*;\s*$/) { |
3465 | WARN("ONE_SEMICOLON", | 3487 | WARN("ONE_SEMICOLON", |
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 8b673dd4627f..18d4ab55606b 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
@@ -433,7 +433,7 @@ foreach my $file (@ARGV) { | |||
433 | 433 | ||
434 | while (<$patch>) { | 434 | while (<$patch>) { |
435 | my $patch_line = $_; | 435 | my $patch_line = $_; |
436 | if (m/^\+\+\+\s+(\S+)/) { | 436 | if (m/^\+\+\+\s+(\S+)/ or m/^---\s+(\S+)/) { |
437 | my $filename = $1; | 437 | my $filename = $1; |
438 | $filename =~ s@^[^/]*/@@; | 438 | $filename =~ s@^[^/]*/@@; |
439 | $filename =~ s@\n@@; | 439 | $filename =~ s@\n@@; |
diff --git a/scripts/tags.sh b/scripts/tags.sh index 08f06c00745e..65f9595acea9 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh | |||
@@ -149,12 +149,17 @@ dogtags() | |||
149 | exuberant() | 149 | exuberant() |
150 | { | 150 | { |
151 | all_target_sources | xargs $1 -a \ | 151 | all_target_sources | xargs $1 -a \ |
152 | -I __initdata,__exitdata,__acquires,__releases \ | 152 | -I __initdata,__exitdata,__initconst,__devinitdata \ |
153 | -I __read_mostly,____cacheline_aligned \ | 153 | -I __devinitconst,__cpuinitdata,__initdata_memblock \ |
154 | -I __refdata,__attribute \ | ||
155 | -I __acquires,__releases,__deprecated \ | ||
156 | -I __read_mostly,__aligned,____cacheline_aligned \ | ||
154 | -I ____cacheline_aligned_in_smp \ | 157 | -I ____cacheline_aligned_in_smp \ |
155 | -I ____cacheline_internodealigned_in_smp \ | 158 | -I ____cacheline_internodealigned_in_smp \ |
159 | -I __used,__packed,__packed2__,__must_check,__must_hold \ | ||
156 | -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ | 160 | -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ |
157 | -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \ | 161 | -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \ |
162 | -I static,const \ | ||
158 | --extra=+f --c-kinds=+px \ | 163 | --extra=+f --c-kinds=+px \ |
159 | --regex-asm='/^(ENTRY|_GLOBAL)\(([^)]*)\).*/\2/' \ | 164 | --regex-asm='/^(ENTRY|_GLOBAL)\(([^)]*)\).*/\2/' \ |
160 | --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' \ | 165 | --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' \ |
@@ -182,8 +187,19 @@ exuberant() | |||
182 | --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ | 187 | --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \ |
183 | --regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \ | 188 | --regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \ |
184 | --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \ | 189 | --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \ |
185 | --regex-c='/PCI_OP_READ\(([a-z]*[a-z]).*[1-4]\)/pci_bus_read_config_\1/' \ | 190 | --regex-c='/PCI_OP_READ\((\w*).*[1-4]\)/pci_bus_read_config_\1/' \ |
186 | --regex-c='/PCI_OP_WRITE\(([a-z]*[a-z]).*[1-4]\)/pci_bus_write_config_\1/' | 191 | --regex-c='/PCI_OP_WRITE\((\w*).*[1-4]\)/pci_bus_write_config_\1/' \ |
192 | --regex-c='/DEFINE_(MUTEX|SEMAPHORE|SPINLOCK)\((\w*)/\2/v/' \ | ||
193 | --regex-c='/DEFINE_(RAW_SPINLOCK|RWLOCK|SEQLOCK)\((\w*)/\2/v/' \ | ||
194 | --regex-c='/DECLARE_(RWSEM|COMPLETION)\((\w*)/\2/v/' \ | ||
195 | --regex-c='/DECLARE_BITMAP\((\w*)/\1/v/' \ | ||
196 | --regex-c='/(^|\s)(|L|H)LIST_HEAD\((\w*)/\3/v/' \ | ||
197 | --regex-c='/(^|\s)RADIX_TREE\((\w*)/\2/v/' \ | ||
198 | --regex-c='/DEFINE_PER_CPU\(([^,]*,\s*)(\w*).*\)/\2/v/' \ | ||
199 | --regex-c='/DEFINE_PER_CPU_SHARED_ALIGNED\(([^,]*,\s*)(\w*).*\)/\2/v/' \ | ||
200 | --regex-c='/DECLARE_WAIT_QUEUE_HEAD\((\w*)/\1/v/' \ | ||
201 | --regex-c='/DECLARE_(TASKLET|WORK|DELAYED_WORK)\((\w*)/\2/v/' \ | ||
202 | --regex-c='/DEFINE_PCI_DEVICE_TABLE\((\w*)/\1/v/' | ||
187 | 203 | ||
188 | all_kconfigs | xargs $1 -a \ | 204 | all_kconfigs | xargs $1 -a \ |
189 | --langdef=kconfig --language-force=kconfig \ | 205 | --langdef=kconfig --language-force=kconfig \ |