Merge third patchbomb from Andrew Morton: - various misc things - a couple of lib/ optimisations - provide DIV_ROUND_CLOSEST_ULL() - checkpatch updates - rtc tree - befs, nilfs2, hfs, hfsplus, fatfs, adfs, affs, bfs - ptrace fixes - fork() fixes - seccomp cleanups - more mmap_sem hold time reductions from Davidlohr * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (138 commits) proc: show locks in /proc/pid/fdinfo/X docs: add missing and new /proc/PID/status file entries, fix typos drivers/rtc/rtc-at91rm9200.c: make IO endian agnostic Documentation/spi/spidev_test.c: fix warning drivers/rtc/rtc-s5m.c: allow usage on device type different than main MFD type .gitignore: ignore *.tar MAINTAINERS: add Mediatek SoC mailing list tomoyo: reduce mmap_sem hold for mm->exe_file powerpc/oprofile: reduce mmap_sem hold for exe_file oprofile: reduce mmap_sem hold for mm->exe_file mips: ip32: add platform data hooks to use DS1685 driver lib/Kconfig: fix up HAVE_ARCH_BITREVERSE help text x86: switch to using asm-generic for seccomp.h sparc: switch to using asm-generic for seccomp.h powerpc: switch to using asm-generic for seccomp.h parisc: switch to using asm-generic for seccomp.h mips: switch to using asm-generic for seccomp.h microblaze: use asm-generic for seccomp.h arm: use asm-generic for seccomp.h seccomp: allow COMPAT sigreturn overrides ...
Showing the changes to scripts (3 of 158 files). Show all
Unified · Split
| @@ -13,12 +13,16 @@ CFLAGS_KASAN := $(call cc-option, -fsanitize=kernel-address \ · 12 unmodified lines | ||
| 13 | 13 | --param asan-instrumentation-with-call-threshold=$(call_threshold)) |
| 14 | 14 | |
| 15 | 15 | ifeq ($(call cc-option, $(CFLAGS_KASAN_MINIMAL) -Werror),) |
| 16 | + ifneq ($(CONFIG_COMPILE_TEST),y) | |
| 16 | 17 | $(warning Cannot use CONFIG_KASAN: \ |
| 17 | 18 | -fsanitize=kernel-address is not supported by compiler) |
| 19 | + endif | |
| 18 | 20 | else |
| 19 | 21 | ifeq ($(CFLAGS_KASAN),) |
| 20 | − $(warning CONFIG_KASAN: compiler does not support all options.\ | |
| 21 | − Trying minimal configuration) | |
| 22 | + ifneq ($(CONFIG_COMPILE_TEST),y) | |
| 23 | + $(warning CONFIG_KASAN: compiler does not support all options.\ | |
| 24 | + Trying minimal configuration) | |
| 25 | + endif | |
| 22 | 26 | CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL) |
| 23 | 27 | endif |
| 24 | 28 | endif |
| @@ -47,6 +47,8 @@ my $ignore_perl_version = 0; · 46 unmodified lines | ||
| 47 | 47 | my $minimum_perl_version = 5.10.0; |
| 48 | 48 | my $min_conf_desc_length = 4; |
| 49 | 49 | my $spelling_file = "$D/spelling.txt"; |
| 50 | +my $codespell = 0; | |
| 51 | +my $codespellfile = "/usr/local/share/codespell/dictionary.txt"; | |
| 50 | 52 | |
| 51 | 53 | sub help { |
| 52 | 54 | my ($exitcode) = @_; |
| @@ -88,6 +90,9 @@ Options: · 35 unmodified lines | ||
| 88 | 90 | file. It's your fault if there's no backup or git |
| 89 | 91 | --ignore-perl-version override checking of perl version. expect |
| 90 | 92 | runtime errors. |
| 93 | + --codespell Use the codespell dictionary for spelling/typos | |
| 94 | + (default:/usr/local/share/codespell/dictionary.txt) | |
| 95 | + --codespellfile Use this codespell dictionary | |
| 91 | 96 | -h, --help, --version display this help and exit |
| 92 | 97 | |
| 93 | 98 | When FILE is - read standard input. |
| @@ -146,6 +151,8 @@ GetOptions( · 52 unmodified lines | ||
| 146 | 151 | 'ignore-perl-version!' => \$ignore_perl_version, |
| 147 | 152 | 'debug=s' => \%debug, |
| 148 | 153 | 'test-only=s' => \$tst_only, |
| 154 | + 'codespell!' => \$codespell, | |
| 155 | + 'codespellfile=s' => \$codespellfile, | |
| 149 | 156 | 'h|help' => \$help, |
| 150 | 157 | 'version' => \$help |
| 151 | 158 | ) or help(1); |
| @@ -316,6 +323,7 @@ our $Operators = qr{ · 164 unmodified lines | ||
| 316 | 323 | |
| 317 | 324 | our $c90_Keywords = qr{do|for|while|if|else|return|goto|continue|switch|default|case|break}x; |
| 318 | 325 | |
| 326 | +our $BasicType; | |
| 319 | 327 | our $NonptrType; |
| 320 | 328 | our $NonptrTypeMisordered; |
| 321 | 329 | our $NonptrTypeWithAttr; |
| @@ -436,6 +444,14 @@ foreach my $entry (@mode_permission_funcs) { · 114 unmodified lines | ||
| 436 | 444 | $mode_perms_search .= $entry->[0]; |
| 437 | 445 | } |
| 438 | 446 | |
| 447 | +our $mode_perms_world_writable = qr{ | |
| 448 | + S_IWUGO | | |
| 449 | + S_IWOTH | | |
| 450 | + S_IRWXUGO | | |
| 451 | + S_IALLUGO | | |
| 452 | + 0[0-7][0-7][2367] | |
| 453 | +}x; | |
| 454 | + | |
| 439 | 455 | our $allowed_asm_includes = qr{(?x: |
| 440 | 456 | irq| |
| 441 | 457 | memory| |
| @@ -449,7 +465,6 @@ my $misspellings; · 7 unmodified lines | ||
| 449 | 465 | my %spelling_fix; |
| 450 | 466 | |
| 451 | 467 | if (open(my $spelling, '<', $spelling_file)) { |
| 452 | − my @spelling_list; | |
| 453 | 468 | while (<$spelling>) { |
| 454 | 469 | my $line = $_; |
| 455 | 470 | |
| @@ -461,21 +476,50 @@ if (open(my $spelling, '<', $spelling_file)) { · 5 unmodified lines | ||
| 461 | 476 | |
| 462 | 477 | my ($suspect, $fix) = split(/\|\|/, $line); |
| 463 | 478 | |
| 464 | − push(@spelling_list, $suspect); | |
| 465 | 479 | $spelling_fix{$suspect} = $fix; |
| 466 | 480 | } |
| 467 | 481 | close($spelling); |
| 468 | − $misspellings = join("|", @spelling_list); | |
| 469 | 482 | } else { |
| 470 | 483 | warn "No typos will be found - file '$spelling_file': $!\n"; |
| 471 | 484 | } |
| 472 | 485 | |
| 486 | +if ($codespell) { | |
| 487 | + if (open(my $spelling, '<', $codespellfile)) { | |
| 488 | + while (<$spelling>) { | |
| 489 | + my $line = $_; | |
| 490 | + | |
| 491 | + $line =~ s/\s*\n?$//g; | |
| 492 | + $line =~ s/^\s*//g; | |
| 493 | + | |
| 494 | + next if ($line =~ m/^\s*#/); | |
| 495 | + next if ($line =~ m/^\s*$/); | |
| 496 | + next if ($line =~ m/, disabled/i); | |
| 497 | + | |
| 498 | + $line =~ s/,.*$//; | |
| 499 | + | |
| 500 | + my ($suspect, $fix) = split(/->/, $line); | |
| 501 | + | |
| 502 | + $spelling_fix{$suspect} = $fix; | |
| 503 | + } | |
| 504 | + close($spelling); | |
| 505 | + } else { | |
| 506 | + warn "No codespell typos will be found - file '$codespellfile': $!\n"; | |
| 507 | + } | |
| 508 | +} | |
| 509 | + | |
| 510 | +$misspellings = join("|", sort keys %spelling_fix) if keys %spelling_fix; | |
| 511 | + | |
| 473 | 512 | sub build_types { |
| 474 | 513 | my $mods = "(?x: \n" . join("|\n ", @modifierList) . "\n)"; |
| 475 | 514 | my $all = "(?x: \n" . join("|\n ", @typeList) . "\n)"; |
| 476 | 515 | my $Misordered = "(?x: \n" . join("|\n ", @typeListMisordered) . "\n)"; |
| 477 | 516 | my $allWithAttr = "(?x: \n" . join("|\n ", @typeListWithAttr) . "\n)"; |
| 478 | 517 | $Modifier = qr{(?:$Attribute|$Sparse|$mods)}; |
| 518 | + $BasicType = qr{ | |
| 519 | + (?:$typeOtherOSTypedefs\b)| | |
| 520 | + (?:$typeTypedefs\b)| | |
| 521 | + (?:${all}\b) | |
| 522 | + }x; | |
| 479 | 523 | $NonptrType = qr{ |
| 480 | 524 | (?:$Modifier\s+|const\s+)* |
| 481 | 525 | (?: |
| @@ -1646,7 +1690,7 @@ sub fix_inserted_deleted_lines { · 1164 unmodified lines | ||
| 1646 | 1690 | foreach my $old_line (@{$linesRef}) { |
| 1647 | 1691 | my $save_line = 1; |
| 1648 | 1692 | my $line = $old_line; #don't modify the array |
| 1649 | − if ($line =~ /^(?:\+\+\+\|\-\-\-)\s+\S+/) { #new filename | |
| 1693 | + if ($line =~ /^(?:\+\+\+|\-\-\-)\s+\S+/) { #new filename | |
| 1650 | 1694 | $delta_offset = 0; |
| 1651 | 1695 | } elsif ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@/) { #new hunk |
| 1652 | 1696 | $range_last_linenr = $new_linenr; |
| @@ -1854,6 +1898,7 @@ sub process { · 201 unmodified lines | ||
| 1854 | 1898 | |
| 1855 | 1899 | my $in_header_lines = $file ? 0 : 1; |
| 1856 | 1900 | my $in_commit_log = 0; #Scanning lines before patch |
| 1901 | + my $commit_log_long_line = 0; | |
| 1857 | 1902 | my $reported_maintainer_file = 0; |
| 1858 | 1903 | my $non_utf8_charset = 0; |
| 1859 | 1904 | |
| @@ -2189,6 +2234,14 @@ sub process { · 329 unmodified lines | ||
| 2189 | 2234 | "Remove Gerrit Change-Id's before submitting upstream.\n" . $herecurr); |
| 2190 | 2235 | } |
| 2191 | 2236 | |
| 2237 | +# Check for line lengths > 75 in commit log, warn once | |
| 2238 | + if ($in_commit_log && !$commit_log_long_line && | |
| 2239 | + length($line) > 75) { | |
| 2240 | + WARN("COMMIT_LOG_LONG_LINE", | |
| 2241 | + "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr); | |
| 2242 | + $commit_log_long_line = 1; | |
| 2243 | + } | |
| 2244 | + | |
| 2192 | 2245 | # Check for git id commit length and improperly formed commit descriptions |
| 2193 | 2246 | if ($in_commit_log && $line =~ /\b(c)ommit\s+([0-9a-f]{5,})/i) { |
| 2194 | 2247 | my $init_char = $1; |
| @@ -2303,8 +2356,9 @@ sub process { · 108 unmodified lines | ||
| 2303 | 2356 | } |
| 2304 | 2357 | |
| 2305 | 2358 | # Check for various typo / spelling mistakes |
| 2306 | − if (defined($misspellings) && ($in_commit_log || $line =~ /^\+/)) { | |
| 2307 | − while ($rawline =~ /(?:^|[^a-z@])($misspellings)(?:$|[^a-z@])/gi) { | |
| 2359 | + if (defined($misspellings) && | |
| 2360 | + ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) { | |
| 2361 | + while ($rawline =~ /(?:^|[^a-z@])($misspellings)(?:\b|$|[^a-z@])/gi) { | |
| 2308 | 2362 | my $typo = $1; |
| 2309 | 2363 | my $typo_fix = $spelling_fix{lc($typo)}; |
| 2310 | 2364 | $typo_fix = ucfirst($typo_fix) if ($typo =~ /^[A-Z]/); |
| @@ -2459,8 +2513,9 @@ sub process { · 148 unmodified lines | ||
| 2459 | 2513 | #line length limit |
| 2460 | 2514 | if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ && |
| 2461 | 2515 | $rawline !~ /^.\s*\*\s*\@$Ident\s/ && |
| 2462 | − !($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:|,|\)\s*;)\s*$/ || | |
| 2463 | − $line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) && | |
| 2516 | + !($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?$String\s*(?:|,|\)\s*;)\s*$/ || | |
| 2517 | + $line =~ /^\+\s*$String\s*(?:\s*|,|\)\s*;)\s*$/ || | |
| 2518 | + $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) && | |
| 2464 | 2519 | $length > $max_line_length) |
| 2465 | 2520 | { |
| 2466 | 2521 | WARN("LONG_LINE", |
| @@ -2552,8 +2607,15 @@ sub process { · 85 unmodified lines | ||
| 2552 | 2607 | } |
| 2553 | 2608 | } |
| 2554 | 2609 | |
| 2555 | − if ($line =~ /^\+.*(\w+\s*)?\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic|[,;:\?\(\{\}\[\<\>]|&&|\|\||\\$)/ && | |
| 2556 | − (!defined($1) || $1 !~ /sizeof\s*/)) { | |
| 2610 | +# check for space after cast like "(int) foo" or "(struct foo) bar" | |
| 2611 | +# avoid checking a few false positives: | |
| 2612 | +# "sizeof(<type>)" or "__alignof__(<type>)" | |
| 2613 | +# function pointer declarations like "(*foo)(int) = bar;" | |
| 2614 | +# structure definitions like "(struct foo) { 0 };" | |
| 2615 | +# multiline macros that define functions | |
| 2616 | +# known attributes or the __attribute__ keyword | |
| 2617 | + if ($line =~ /^\+(.*)\(\s*$Type\s*\)([ \t]++)((?![={]|\\$|$Attribute|__attribute__))/ && | |
| 2618 | + (!defined($1) || $1 !~ /\b(?:sizeof|__alignof__)\s*$/)) { | |
| 2557 | 2619 | if (CHK("SPACING", |
| 2558 | 2620 | "No space is necessary after a cast\n" . $herecurr) && |
| 2559 | 2621 | $fix) { |
| @@ -3146,6 +3208,18 @@ sub process { · 586 unmodified lines | ||
| 3146 | 3208 | $herecurr); |
| 3147 | 3209 | } |
| 3148 | 3210 | |
| 3211 | +# check for const <foo> const where <foo> is not a pointer or array type | |
| 3212 | + if ($sline =~ /\bconst\s+($BasicType)\s+const\b/) { | |
| 3213 | + my $found = $1; | |
| 3214 | + if ($sline =~ /\bconst\s+\Q$found\E\s+const\b\s*\*/) { | |
| 3215 | + WARN("CONST_CONST", | |
| 3216 | + "'const $found const *' should probably be 'const $found * const'\n" . $herecurr); | |
| 3217 | + } elsif ($sline !~ /\bconst\s+\Q$found\E\s+const\s+\w+\s*\[/) { | |
| 3218 | + WARN("CONST_CONST", | |
| 3219 | + "'const $found const' should probably be 'const $found'\n" . $herecurr); | |
| 3220 | + } | |
| 3221 | + } | |
| 3222 | + | |
| 3149 | 3223 | # check for non-global char *foo[] = {"bar", ...} declarations. |
| 3150 | 3224 | if ($line =~ /^.\s+(?:static\s+|const\s+)?char\s+\*\s*\w+\s*\[\s*\]\s*=\s*\{/) { |
| 3151 | 3225 | WARN("STATIC_CONST_CHAR_ARRAY", |
| @@ -3153,6 +3227,19 @@ sub process { · 1 unmodified line | ||
| 3153 | 3227 | $herecurr); |
| 3154 | 3228 | } |
| 3155 | 3229 | |
| 3230 | +# check for sizeof(foo)/sizeof(foo[0]) that could be ARRAY_SIZE(foo) | |
| 3231 | + if ($line =~ m@\bsizeof\s*\(\s*($Lval)\s*\)@) { | |
| 3232 | + my $array = $1; | |
| 3233 | + if ($line =~ m@\b(sizeof\s*\(\s*\Q$array\E\s*\)\s*/\s*sizeof\s*\(\s*\Q$array\E\s*\[\s*0\s*\]\s*\))@) { | |
| 3234 | + my $array_div = $1; | |
| 3235 | + if (WARN("ARRAY_SIZE", | |
| 3236 | + "Prefer ARRAY_SIZE($array)\n" . $herecurr) && | |
| 3237 | + $fix) { | |
| 3238 | + $fixed[$fixlinenr] =~ s/\Q$array_div\E/ARRAY_SIZE($array)/; | |
| 3239 | + } | |
| 3240 | + } | |
| 3241 | + } | |
| 3242 | + | |
| 3156 | 3243 | # check for function declarations without arguments like "int foo()" |
| 3157 | 3244 | if ($line =~ /(\b$Type\s+$Ident)\s*\(\s*\)/) { |
| 3158 | 3245 | if (ERROR("FUNCTION_WITHOUT_ARGS", |
| @@ -3309,6 +3396,14 @@ sub process { · 150 unmodified lines | ||
| 3309 | 3396 | "Prefer dev_$level(... to dev_printk(KERN_$orig, ...\n" . $herecurr); |
| 3310 | 3397 | } |
| 3311 | 3398 | |
| 3399 | +# ENOSYS means "bad syscall nr" and nothing else. This will have a small | |
| 3400 | +# number of false positives, but assembly files are not checked, so at | |
| 3401 | +# least the arch entry code will not trigger this warning. | |
| 3402 | + if ($line =~ /\bENOSYS\b/) { | |
| 3403 | + WARN("ENOSYS", | |
| 3404 | + "ENOSYS means 'invalid syscall nr' and nothing else\n" . $herecurr); | |
| 3405 | + } | |
| 3406 | + | |
| 3312 | 3407 | # function brace can't be on same line, except for #defines of do while, |
| 3313 | 3408 | # or if closed on same line |
| 3314 | 3409 | if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and |
| @@ -3565,7 +3660,7 @@ sub process { · 250 unmodified lines | ||
| 3565 | 3660 | |
| 3566 | 3661 | # Ignore operators passed as parameters. |
| 3567 | 3662 | if ($op_type ne 'V' && |
| 3568 | − $ca =~ /\s$/ && $cc =~ /^\s*,/) { | |
| 3663 | + $ca =~ /\s$/ && $cc =~ /^\s*[,\)]/) { | |
| 3569 | 3664 | |
| 3570 | 3665 | # # Ignore comments |
| 3571 | 3666 | # } elsif ($op =~ /^$;+$/) { |
| @@ -3750,6 +3845,14 @@ sub process { · 178 unmodified lines | ||
| 3750 | 3845 | $ok = 1; |
| 3751 | 3846 | } |
| 3752 | 3847 | |
| 3848 | + # for asm volatile statements | |
| 3849 | + # ignore a colon with another | |
| 3850 | + # colon immediately before or after | |
| 3851 | + if (($op eq ':') && | |
| 3852 | + ($ca =~ /:$/ || $cc =~ /^:/)) { | |
| 3853 | + $ok = 1; | |
| 3854 | + } | |
| 3855 | + | |
| 3753 | 3856 | # messages are ERROR, but ?: are CHK |
| 3754 | 3857 | if ($ok == 0) { |
| 3755 | 3858 | my $msg_type = \&ERROR; |
| @@ -3963,12 +4066,12 @@ sub process { · 207 unmodified lines | ||
| 3963 | 4066 | } |
| 3964 | 4067 | } |
| 3965 | 4068 | |
| 3966 | −# Return of what appears to be an errno should normally be -'ve | |
| 3967 | − if ($line =~ /^.\s*return\s*(E[A-Z]*)\s*;/) { | |
| 4069 | +# Return of what appears to be an errno should normally be negative | |
| 4070 | + if ($sline =~ /\breturn(?:\s*\(+\s*|\s+)(E[A-Z]+)(?:\s*\)+\s*|\s*)[;:,]/) { | |
| 3968 | 4071 | my $name = $1; |
| 3969 | 4072 | if ($name ne 'EOF' && $name ne 'ERROR') { |
| 3970 | 4073 | WARN("USE_NEGATIVE_ERRNO", |
| 3971 | − "return of an errno should typically be -ve (return -$1)\n" . $herecurr); | |
| 4074 | + "return of an errno should typically be negative (ie: return -$1)\n" . $herecurr); | |
| 3972 | 4075 | } |
| 3973 | 4076 | } |
| 3974 | 4077 | |
| @@ -4178,7 +4281,8 @@ sub process { · 203 unmodified lines | ||
| 4178 | 4281 | } |
| 4179 | 4282 | } |
| 4180 | 4283 | |
| 4181 | −#warn if <asm/foo.h> is #included and <linux/foo.h> is available (uses RAW line) | |
| 4284 | +# warn if <asm/foo.h> is #included and <linux/foo.h> is available and includes | |
| 4285 | +# itself <asm/foo.h> (uses RAW line) | |
| 4182 | 4286 | if ($tree && $rawline =~ m{^.\s*\#\s*include\s*\<asm\/(.*)\.h\>}) { |
| 4183 | 4287 | my $file = "$1.h"; |
| 4184 | 4288 | my $checkfile = "include/linux/$file"; |
| @@ -4186,12 +4290,15 @@ sub process { · 1 unmodified line | ||
| 4186 | 4290 | $realfile ne $checkfile && |
| 4187 | 4291 | $1 !~ /$allowed_asm_includes/) |
| 4188 | 4292 | { |
| 4189 | − if ($realfile =~ m{^arch/}) { | |
| 4190 | − CHK("ARCH_INCLUDE_LINUX", | |
| 4191 | − "Consider using #include <linux/$file> instead of <asm/$file>\n" . $herecurr); | |
| 4192 | − } else { | |
| 4193 | − WARN("INCLUDE_LINUX", | |
| 4194 | − "Use #include <linux/$file> instead of <asm/$file>\n" . $herecurr); | |
| 4293 | + my $asminclude = `grep -Ec "#include\\s+<asm/$file>" $root/$checkfile`; | |
| 4294 | + if ($asminclude > 0) { | |
| 4295 | + if ($realfile =~ m{^arch/}) { | |
| 4296 | + CHK("ARCH_INCLUDE_LINUX", | |
| 4297 | + "Consider using #include <linux/$file> instead of <asm/$file>\n" . $herecurr); | |
| 4298 | + } else { | |
| 4299 | + WARN("INCLUDE_LINUX", | |
| 4300 | + "Use #include <linux/$file> instead of <asm/$file>\n" . $herecurr); | |
| 4301 | + } | |
| 4195 | 4302 | } |
| 4196 | 4303 | } |
| 4197 | 4304 | } |
| @@ -4700,6 +4807,16 @@ sub process { · 502 unmodified lines | ||
| 4700 | 4807 | } |
| 4701 | 4808 | } |
| 4702 | 4809 | |
| 4810 | +# check for __read_mostly with const non-pointer (should just be const) | |
| 4811 | + if ($line =~ /\b__read_mostly\b/ && | |
| 4812 | + $line =~ /($Type)\s*$Ident/ && $1 !~ /\*\s*$/ && $1 =~ /\bconst\b/) { | |
| 4813 | + if (ERROR("CONST_READ_MOSTLY", | |
| 4814 | + "Invalid use of __read_mostly with const type\n" . $herecurr) && | |
| 4815 | + $fix) { | |
| 4816 | + $fixed[$fixlinenr] =~ s/\s+__read_mostly\b//; | |
| 4817 | + } | |
| 4818 | + } | |
| 4819 | + | |
| 4703 | 4820 | # don't use __constant_<foo> functions outside of include/uapi/ |
| 4704 | 4821 | if ($realfile !~ m@^include/uapi/@ && |
| 4705 | 4822 | $line =~ /(__constant_(?:htons|ntohs|[bl]e(?:16|32|64)_to_cpu|cpu_to_[bl]e(?:16|32|64)))\s*\(/) { |
| @@ -5261,6 +5378,7 @@ sub process { · 555 unmodified lines | ||
| 5261 | 5378 | stacktrace_ops| |
| 5262 | 5379 | sysfs_ops| |
| 5263 | 5380 | tty_operations| |
| 5381 | + uart_ops| | |
| 5264 | 5382 | usb_mon_operations| |
| 5265 | 5383 | wd_ops}x; |
| 5266 | 5384 | if ($line !~ /\bconst\b/ && |
| @@ -5318,8 +5436,8 @@ sub process { · 51 unmodified lines | ||
| 5318 | 5436 | } |
| 5319 | 5437 | } |
| 5320 | 5438 | |
| 5321 | − if ($line =~ /debugfs_create_file.*S_IWUGO/ || | |
| 5322 | − $line =~ /DEVICE_ATTR.*S_IWUGO/ ) { | |
| 5439 | + if ($line =~ /debugfs_create_\w+.*\b$mode_perms_world_writable\b/ || | |
| 5440 | + $line =~ /DEVICE_ATTR.*\b$mode_perms_world_writable\b/) { | |
| 5323 | 5441 | WARN("EXPORTED_WORLD_WRITABLE", |
| 5324 | 5442 | "Exporting world writable files is usually an error. Consider more restrictive permissions.\n" . $herecurr); |
| 5325 | 5443 | } |
| @@ -825,6 +825,7 @@ retreived||retrieved · 824 unmodified lines | ||
| 825 | 825 | retreive||retrieve |
| 826 | 826 | retrive||retrieve |
| 827 | 827 | retuned||returned |
| 828 | +reudce||reduce | |
| 828 | 829 | reuest||request |
| 829 | 830 | reuqest||request |
| 830 | 831 | reutnred||returned |