diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 22 | ||||
-rwxr-xr-x | scripts/faddr2line | 8 |
2 files changed, 4 insertions, 26 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 040aa79e1d9d..31031f10fe56 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -6233,28 +6233,6 @@ sub process { | |||
6233 | } | 6233 | } |
6234 | } | 6234 | } |
6235 | 6235 | ||
6236 | # whine about ACCESS_ONCE | ||
6237 | if ($^V && $^V ge 5.10.0 && | ||
6238 | $line =~ /\bACCESS_ONCE\s*$balanced_parens\s*(=(?!=))?\s*($FuncArg)?/) { | ||
6239 | my $par = $1; | ||
6240 | my $eq = $2; | ||
6241 | my $fun = $3; | ||
6242 | $par =~ s/^\(\s*(.*)\s*\)$/$1/; | ||
6243 | if (defined($eq)) { | ||
6244 | if (WARN("PREFER_WRITE_ONCE", | ||
6245 | "Prefer WRITE_ONCE(<FOO>, <BAR>) over ACCESS_ONCE(<FOO>) = <BAR>\n" . $herecurr) && | ||
6246 | $fix) { | ||
6247 | $fixed[$fixlinenr] =~ s/\bACCESS_ONCE\s*\(\s*\Q$par\E\s*\)\s*$eq\s*\Q$fun\E/WRITE_ONCE($par, $fun)/; | ||
6248 | } | ||
6249 | } else { | ||
6250 | if (WARN("PREFER_READ_ONCE", | ||
6251 | "Prefer READ_ONCE(<FOO>) over ACCESS_ONCE(<FOO>)\n" . $herecurr) && | ||
6252 | $fix) { | ||
6253 | $fixed[$fixlinenr] =~ s/\bACCESS_ONCE\s*\(\s*\Q$par\E\s*\)/READ_ONCE($par)/; | ||
6254 | } | ||
6255 | } | ||
6256 | } | ||
6257 | |||
6258 | # check for mutex_trylock_recursive usage | 6236 | # check for mutex_trylock_recursive usage |
6259 | if ($line =~ /mutex_trylock_recursive/) { | 6237 | if ($line =~ /mutex_trylock_recursive/) { |
6260 | ERROR("LOCKING", | 6238 | ERROR("LOCKING", |
diff --git a/scripts/faddr2line b/scripts/faddr2line index 39e07d8574dd..7721d5b2b0c0 100755 --- a/scripts/faddr2line +++ b/scripts/faddr2line | |||
@@ -44,10 +44,10 @@ | |||
44 | set -o errexit | 44 | set -o errexit |
45 | set -o nounset | 45 | set -o nounset |
46 | 46 | ||
47 | READELF="${CROSS_COMPILE}readelf" | 47 | READELF="${CROSS_COMPILE:-}readelf" |
48 | ADDR2LINE="${CROSS_COMPILE}addr2line" | 48 | ADDR2LINE="${CROSS_COMPILE:-}addr2line" |
49 | SIZE="${CROSS_COMPILE}size" | 49 | SIZE="${CROSS_COMPILE:-}size" |
50 | NM="${CROSS_COMPILE}nm" | 50 | NM="${CROSS_COMPILE:-}nm" |
51 | 51 | ||
52 | command -v awk >/dev/null 2>&1 || die "awk isn't installed" | 52 | command -v awk >/dev/null 2>&1 || die "awk isn't installed" |
53 | command -v ${READELF} >/dev/null 2>&1 || die "readelf isn't installed" | 53 | command -v ${READELF} >/dev/null 2>&1 || die "readelf isn't installed" |