aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a3b9782441f9..89d24b3ea438 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3123,6 +3123,12 @@ sub process {
3123 "__printf(string-index, first-to-check) is preferred over __attribute__((format(printf, string-index, first-to-check)))\n" . $herecurr); 3123 "__printf(string-index, first-to-check) is preferred over __attribute__((format(printf, string-index, first-to-check)))\n" . $herecurr);
3124 } 3124 }
3125 3125
3126# Check for __attribute__ format(scanf, prefer __scanf
3127 if ($line =~ /\b__attribute__\s*\(\s*\(\s*format\s*\(\s*scanf\b/) {
3128 WARN("PREFER_SCANF",
3129 "__scanf(string-index, first-to-check) is preferred over __attribute__((format(scanf, string-index, first-to-check)))\n" . $herecurr);
3130 }
3131
3126# check for sizeof(&) 3132# check for sizeof(&)
3127 if ($line =~ /\bsizeof\s*\(\s*\&/) { 3133 if ($line =~ /\bsizeof\s*\(\s*\&/) {
3128 WARN("SIZEOF_ADDRESS", 3134 WARN("SIZEOF_ADDRESS",