X-Git-Url: https://bbs.cooldavid.org/git/?a=blobdiff_plain;f=scripts%2Fcheckpatch.pl;h=e3c7fc0dca382492f1714f4879abb37b63cc07f2;hb=b382b191ea9e9ccefc437433d23befe91f4a8925;hp=90b54d4697fd2de9ae1dcecc80fc25cdcab63d21;hpb=9e5fca251f44832cb996961048ea977f80faf6ea;p=net-next-2.6.git diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 90b54d4697f..e3c7fc0dca3 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); }