History

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() ...

Linus Torvalds committed 13 years ago

Commit 7c2db362 parents 8b5628a a47a376165 files · +9671 −1297Browse files

Showing the changes to scripts (3 of 165 files). Show all

Unified · Split

3 files
  1. scripts/checkpatch.pl +24 −2
  2. scripts/get_maintainer.pl +1 −1
  3. scripts/tags.sh +20 −4
scripts/checkpatch.pl+24−2
@@ -1931,6 +1931,12 @@ sub process { · 1930 unmodified lines
19311931 "use the SSYNC() macro in asm/blackfin.h\n" . $herevet);
19321932 }
19331933
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+
19341940 # Check for potential 'bare' types
19351941 my ($stat, $cond, $line_nr_next, $remain_next, $off_next,
19361942 $realline_next);
@@ -2430,6 +2436,15 @@ sub process { · 493 unmodified lines
24302436 "Prefer pr_warn(... to pr_warning(...\n" . $herecurr);
24312437 }
24322438
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+
24332448 # function brace can't be on same line, except for #defines of do while,
24342449 # or if closed on same line
24352450 if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and
@@ -2915,6 +2930,7 @@ sub process { · 479 unmodified lines
29152930 my $var = $1;
29162931 if ($var !~ /$Constant/ &&
29172932 $var =~ /[A-Z]\w*[a-z]|[a-z]\w*[A-Z]/ &&
2933+ $var !~ /^Page[A-Z]/ &&
29182934 !defined $camelcase{$var}) {
29192935 $camelcase{$var} = 1;
29202936 WARN("CAMELCASE",
@@ -3237,9 +3253,9 @@ sub process { · 316 unmodified lines
32373253 }
32383254
32393255 # prefer usleep_range over udelay
3240− if ($line =~ /\budelay\s*\(\s*(\w+)\s*\)/) {
3256+ if ($line =~ /\budelay\s*\(\s*(\d+)\s*\)/) {
32413257 # ignore udelay's < 10, however
3242− if (! (($1 =~ /(\d+)/) && ($1 < 10)) ) {
3258+ if (! ($1 < 10) ) {
32433259 CHK("USLEEP_RANGE",
32443260 "usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $line);
32453261 }
@@ -3460,6 +3476,12 @@ sub process { · 214 unmodified lines
34603476 "unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr);
34613477 }
34623478
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+
34633485 # check for multiple semicolons
34643486 if ($line =~ /;\s*;\s*$/) {
34653487 WARN("ONE_SEMICOLON",
scripts/get_maintainer.pl+1−1
@@ -433,7 +433,7 @@ foreach my $file (@ARGV) { · 432 unmodified lines
433433
434434 while (<$patch>) {
435435 my $patch_line = $_;
436− if (m/^\+\+\+\s+(\S+)/) {
436+ if (m/^\+\+\+\s+(\S+)/ or m/^---\s+(\S+)/) {
437437 my $filename = $1;
438438 $filename =~ s@^[^/]*/@@;
439439 $filename =~ s@\n@@;
scripts/tags.sh+20−4
@@ -149,12 +149,17 @@ dogtags() · 148 unmodified lines
149149 exuberant()
150150 {
151151 all_target_sources | xargs $1 -a \
152− -I __initdata,__exitdata,__acquires,__releases \
153− -I __read_mostly,____cacheline_aligned \
152+ -I __initdata,__exitdata,__initconst,__devinitdata \
153+ -I __devinitconst,__cpuinitdata,__initdata_memblock \
154+ -I __refdata,__attribute \
155+ -I __acquires,__releases,__deprecated \
156+ -I __read_mostly,__aligned,____cacheline_aligned \
154157 -I ____cacheline_aligned_in_smp \
155158 -I ____cacheline_internodealigned_in_smp \
159+ -I __used,__packed,__packed2__,__must_check,__must_hold \
156160 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
157161 -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \
162+ -I static,const \
158163 --extra=+f --c-kinds=+px \
159164 --regex-asm='/^(ENTRY|_GLOBAL)\(([^)]*)\).*/\2/' \
160165 --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' \
@@ -182,8 +187,19 @@ exuberant() · 21 unmodified lines
182187 --regex-c++='/TESTCLEARFLAG_FALSE\(([^,)]*).*/TestClearPage\1/' \
183188 --regex-c++='/__TESTCLEARFLAG_FALSE\(([^,)]*).*/__TestClearPage\1/' \
184189 --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' \
185− --regex-c='/PCI_OP_READ\(([a-z]*[a-z]).*[1-4]\)/pci_bus_read_config_\1/' \
186− --regex-c='/PCI_OP_WRITE\(([a-z]*[a-z]).*[1-4]\)/pci_bus_write_config_\1/'
190+ --regex-c='/PCI_OP_READ\((\w*).*[1-4]\)/pci_bus_read_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/'
187203
188204 all_kconfigs | xargs $1 -a \
189205 --langdef=kconfig --language-force=kconfig \