X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=scripts%2Fcheckpatch.pl;h=e3c7fc0dca382492f1714f4879abb37b63cc07f2;hp=90b54d4697fd2de9ae1dcecc80fc25cdcab63d21;hb=4882720b267b7b1d1b0ce08334b205f0329d4615;hpb=e430426654c6a99fb1977bae71d4844e876c4a52 diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 90b54d4697fd..e3c7fc0dca38 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2794,12 +2794,8 @@ sub process { WARN("__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr); } -# check for semaphores used as mutexes - if ($line =~ /^.\s*(DECLARE_MUTEX|init_MUTEX)\s*\(/) { - WARN("mutexes are preferred for single holder semaphores\n" . $herecurr); - } -# check for semaphores used as mutexes - if ($line =~ /^.\s*init_MUTEX_LOCKED\s*\(/) { +# check for semaphores initialized locked + if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) { WARN("consider using a completion\n" . $herecurr); }