diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/checkpatch.pl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9d761c95eca2..955183ada37a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -1661,6 +1661,20 @@ sub process { | |||
| 1661 | #print "is_end<$is_end> length<$length>\n"; | 1661 | #print "is_end<$is_end> length<$length>\n"; |
| 1662 | } | 1662 | } |
| 1663 | 1663 | ||
| 1664 | if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) && | ||
| 1665 | ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) { | ||
| 1666 | my $flag = $1; | ||
| 1667 | my $replacement = { | ||
| 1668 | 'EXTRA_AFLAGS' => 'asflags-y', | ||
| 1669 | 'EXTRA_CFLAGS' => 'ccflags-y', | ||
| 1670 | 'EXTRA_CPPFLAGS' => 'cppflags-y', | ||
| 1671 | 'EXTRA_LDFLAGS' => 'ldflags-y', | ||
| 1672 | }; | ||
| 1673 | |||
| 1674 | WARN("DEPRECATED_VARIABLE", | ||
| 1675 | "Use of $flag is deprecated, please use \`$replacement->{$flag} instead.\n" . $herecurr) if ($replacement->{$flag}); | ||
| 1676 | } | ||
| 1677 | |||
| 1664 | # check we are in a valid source file if not then ignore this hunk | 1678 | # check we are in a valid source file if not then ignore this hunk |
| 1665 | next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/); | 1679 | next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/); |
| 1666 | 1680 | ||
