From: Joe Perches Date: Mon, 29 Apr 2013 23:18:14 +0000 (-0700) Subject: checkpatch: complain about executable files X-Git-Tag: upstream/snapshot3+hdmi~5276^2~221 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=04db4d25d9eaa58140520f976994d1a601129c00;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.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 Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b8b03aa..9cdd147 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); }