checkpatch: check for incorrect permissions
checkpatch: check for incorrect permissions

Throw an error when a source file has been given execute permissions using
the mode change line present in git diffs.  Also alow the filename
matching to use the "diff" line in addition to the "+++" line, since the
mode change lines appear before any "+++" lines.

[b4658fdd7fbd645c2859b0e39d71018f32058d12@canonical.com: simplified filename logic slightly, added tests]
Cc: Andy Whitcroft <b4658fdd7fbd645c2859b0e39d71018f32058d12@canonical.com>
Acked-by: Linus Walleij <9cd9d802d23c0ed5e224beabf4ae4a5c478746ef@stericsson.com>
Signed-off-by: Rabin Vincent <b8c38523cce7640aaeed4045bf245272d3b467e3@stericsson.com>
Signed-off-by: Andy Whitcroft <b4658fdd7fbd645c2859b0e39d71018f32058d12@canonical.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs