From: Joe Perches Date: Tue, 26 Mar 2013 23:25:06 +0000 (+1100) Subject: checkpatch: Complain about executable files X-Git-Tag: next-20130404~3^2~295 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9aae7354a0f222c4fd08347456d52d2b91a79261;p=karo-tx-linux.git checkpatch: Complain about executable files Complain about files with an executable bit set that are not in a scripts/ directory and are not type .pl, .py, .awk, or .sh Based on an initial patch from Stephen. Signed-off-by: Joe Perches Acked-by: Stephen Boyd Signed-off-by: Andrew Morton --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3540bcf1cd22..3fb6d8674b2a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1583,7 +1583,8 @@ sub process { # Check for incorrect file permissions if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) { my $permhere = $here . "FILE: $realfile\n"; - if ($realfile =~ /(Makefile|Kconfig|\.c|\.h|\.S|\.tmpl)$/) { + if ($realfile !~ m@scripts/@ && + $realfile !~ /\.(py|pl|awk|sh)$/) { ERROR("EXECUTE_PERMISSIONS", "do not set execute permissions for source files\n" . $permhere); }