- checkpatch-switch-indent-allow-plain-return.patch removed from -mm tree

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

 



The patch titled
     checkpatch: switch indent allow plain return
has been removed from the -mm tree.  Its filename was
     checkpatch-switch-indent-allow-plain-return.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: checkpatch: switch indent allow plain return
From: Andy Whitcroft <apw@xxxxxxxxxxxx>

It is a common and sane idiom to allow a single return on the end of a
case statement:

	switch (...) {
	case foo:	return bar;
	}

Add an exception for this.

Signed-off-by: Andy Whitcroft <apw@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

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

diff -puN scripts/checkpatch.pl~checkpatch-switch-indent-allow-plain-return scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-switch-indent-allow-plain-return
+++ a/scripts/checkpatch.pl
@@ -1295,7 +1295,11 @@ sub process {
 			}
 		}
 		if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
-		    $line !~ /\G(?:\s*{)?(?:\s*$;*)(?:\s*\\)?\s*$/g) {
+		    $line !~ /\G(?:
+			(?:\s*{)?(?:\s*$;*)(?:\s*\\)?\s*$|
+			\s*return\s+
+		    )/xg)
+		{
 			ERROR("trailing statements should be on next line\n" . $herecurr);
 		}
 
_

Patches currently in -mm which might be from apw@xxxxxxxxxxxx are

origin.patch
mm-hugetlbc-make-functions-static-use-null-rather-than-0.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