mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@canonical.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>
Subject: [PATCH 13/16] checkpatch: clean up structure definition macro handline
Date: Wed, 18 Aug 2010 16:46:46 +0100	[thread overview]
Message-ID: <1282146409-30544-14-git-send-email-apw@canonical.com> (raw)
In-Reply-To: <1282146409-30544-1-git-send-email-apw@canonical.com>

Handle definitions such as the following correctly, it is not
a complex statement:

    #define PREALLOC(NAME, START, END, FLAGS) {     \
		    .name = (NAME),                 \
		    .start = (START),               \
		    .end = (END),                   \
		    .flags = (FLAGS)                \
	    },

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 scripts/checkpatch.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 53b2eae..d5361e4 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2476,8 +2476,8 @@ sub process {
 				\.$Ident\s*=\s*|
 				^\"|\"$
 			}x;
-			#print "REST<$rest> dstat<$dstat>\n";
-			if ($rest ne '') {
+			#print "REST<$rest> dstat<$dstat> ctx<$ctx>\n";
+			if ($rest ne '' && $rest ne ',') {
 				if ($rest !~ /while\s*\(/ &&
 				    $dstat !~ /$exceptions/)
 				{
-- 
1.7.0.4


  parent reply	other threads:[~2010-08-18 15:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18 15:46 [PATCH 00/16] update checkpatch to v0.31 Andy Whitcroft
2010-08-18 15:46 ` [PATCH 01/16] checkpatch: fix regressions in "fix handling of leading spaces" Andy Whitcroft
2010-08-18 15:46 ` [PATCH 02/16] checkpatch: types may sit on a line on their own Andy Whitcroft
2010-08-18 15:46 ` [PATCH 03/16] checkpatch: suggest cleanpatch and cleanfile when appropriate Andy Whitcroft
2010-08-18 15:46 ` [PATCH 04/16] checkpatch: ensure we do not collapse bracketed sections into constants Andy Whitcroft
2010-08-18 15:46 ` [PATCH 05/16] checkpatch: handle casts better fixing false categorisation of : as binary Andy Whitcroft
2010-08-18 15:46 ` [PATCH 06/16] checkpatch: returning errno typically should be negative Andy Whitcroft
2010-08-18 15:46 ` [PATCH 07/16] checkpatch: add check for space after struct, union, and enum Andy Whitcroft
2010-08-18 15:46 ` [PATCH 08/16] checkpatch: simplify and consolidate "missing space after" checks Andy Whitcroft
2010-08-18 15:46 ` [PATCH 09/16] checkpatch: ensure kconfig help checks only apply when we are adding help Andy Whitcroft
2010-08-18 15:46 ` [PATCH 10/16] checkpatch: check for incorrect permissions Andy Whitcroft
2010-08-18 15:46 ` [PATCH 11/16] checkpatch: Add additional attribute #defines Andy Whitcroft
2010-08-18 15:46 ` [PATCH 12/16] checkpatch: update copyright dates Andy Whitcroft
2010-08-18 15:46 ` Andy Whitcroft [this message]
2010-08-18 15:46 ` [PATCH 14/16] checkpatch: handle EXPORT_SYMBOL for DEVICE_ATTR and similar Andy Whitcroft
2010-08-18 15:46 ` [PATCH 15/16] checkpatch: statement/block context analyser should look at sanitised lines Andy Whitcroft
2010-08-18 15:46 ` [PATCH 16/16] checkpatch: version 0.31 Andy Whitcroft

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1282146409-30544-14-git-send-email-apw@canonical.com \
    --to=apw@canonical.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®