aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e3c7fc0dca38..36d6851f97d0 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2785,10 +2785,15 @@ sub process {
2785 } 2785 }
2786 2786
2787# check for pointless casting of kmalloc return 2787# check for pointless casting of kmalloc return
2788 if ($line =~ /\*\s*\)\s*k[czm]alloc\b/) { 2788 if ($line =~ /\*\s*\)\s*[kv][czm]alloc(_node){0,1}\b/) {
2789 WARN("unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr); 2789 WARN("unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr);
2790 } 2790 }
2791 2791
2792# check for multiple semicolons
2793 if ($line =~ /;\s*;\s*$/) {
2794 WARN("Statements terminations use 1 semicolon\n" . $herecurr);
2795 }
2796
2792# check for gcc specific __FUNCTION__ 2797# check for gcc specific __FUNCTION__
2793 if ($line =~ /__FUNCTION__/) { 2798 if ($line =~ /__FUNCTION__/) {
2794 WARN("__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr); 2799 WARN("__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr);