+ checkpatch-change-camelcase-test-and-make-it-strict.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + checkpatch-change-camelcase-test-and-make-it-strict.patch added to -mm tree
To: joe@xxxxxxxxxxx,apw@xxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Wed, 22 May 2013 15:27:43 -0700


The patch titled
     Subject: checkpatch: change CamelCase test and make it --strict
has been added to the -mm tree.  Its filename is
     checkpatch-change-camelcase-test-and-make-it-strict.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Joe Perches <joe@xxxxxxxxxxx>
Subject: checkpatch: change CamelCase test and make it --strict

Do not bleat a message on nominally acceptable CamelCase uses that are
separated by an _ like drm_core_has_MTRR.

CamelCase tests are also a bit noisy against certain types of code
acceptable to some kernel developers.

Make the test applicable only with --strict.

Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
Cc: Andy Whitcroft <apw@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 scripts/checkpatch.pl |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff -puN scripts/checkpatch.pl~checkpatch-change-camelcase-test-and-make-it-strict scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-change-camelcase-test-and-make-it-strict
+++ a/scripts/checkpatch.pl
@@ -2938,12 +2938,12 @@ sub process {
 		while ($line =~ m{($Constant|$Lval)}g) {
 			my $var = $1;
 			if ($var !~ /$Constant/ &&
-			    $var =~ /[A-Z]\w*[a-z]|[a-z]\w*[A-Z]/ &&
+			    $var =~ /[A-Z][a-z]|[a-z][A-Z]/ &&
 			    $var !~ /"^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ &&
 			    !defined $camelcase{$var}) {
 				$camelcase{$var} = 1;
-				WARN("CAMELCASE",
-				     "Avoid CamelCase: <$var>\n" . $herecurr);
+				CHK("CAMELCASE",
+				    "Avoid CamelCase: <$var>\n" . $herecurr);
 			}
 		}
 
_

Patches currently in -mm which might be from joe@xxxxxxxxxxx are

linux-next.patch
lib-bitmapc-speed-up-bitmap_find_free_region.patch
lib-bitmapc-speed-up-bitmap_find_free_region-fix.patch
checkpatch-change-camelcase-test-and-make-it-strict.patch
checkpatch-warn-when-using-gccs-binary-constant-extension.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux