All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] checkpatch-fix-return-is-not-a-function-square-bracket-handling.patch removed from -mm tree
@ 2012-01-11 21:31 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2012-01-11 21:31 UTC (permalink / raw)
  To: apw, joe, mm-commits


The patch titled
     Subject: checkpatch: fix 'return is not a function' square bracket handling
has been removed from the -mm tree.  Its filename was
     checkpatch-fix-return-is-not-a-function-square-bracket-handling.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/

------------------------------------------------------
From: Andy Whitcroft <apw@canonical.com>
Subject: checkpatch: fix 'return is not a function' square bracket handling

We are incorrectly matching square brackets '[' and ']' leading to false
positives on more complex functions as below:

    return (dt3155_fbuffer[m]->ready_head -
	dt3155_fbuffer[m]->ready_len +
	dt3155_fbuffer[m]->nbuffers)%
	(dt3155_fbuffer[m]->nbuffers);

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/checkpatch.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN scripts/checkpatch.pl~checkpatch-fix-return-is-not-a-function-square-bracket-handling scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-fix-return-is-not-a-function-square-bracket-handling
+++ a/scripts/checkpatch.pl
@@ -2609,7 +2609,7 @@ sub process {
 			# Flatten any parentheses
 			$value =~ s/\(/ \(/g;
 			$value =~ s/\)/\) /g;
-			while ($value =~ s/\[[^\{\}]*\]/1/ ||
+			while ($value =~ s/\[[^\[\]]*\]/1/ ||
 			       $value !~ /(?:$Ident|-?$Constant)\s*
 					     $Compare\s*
 					     (?:$Ident|-?$Constant)/x &&
_

Patches currently in -mm which might be from apw@canonical.com are

origin.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-11 21:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-11 21:31 [merged] checkpatch-fix-return-is-not-a-function-square-bracket-handling.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.