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: Joe Perches <joe@perches.com>,
	linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>
Subject: [PATCH 2/5] checkpatch: allow simple character constants in #defines
Date: Thu,  1 Mar 2012 12:44:07 +0000	[thread overview]
Message-ID: <1330605850-7873-3-git-send-email-apw@canonical.com> (raw)
In-Reply-To: <1330605850-7873-1-git-send-email-apw@canonical.com>

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

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d91a86c..ff8a84f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2845,6 +2845,7 @@ sub process {
 			    $dstat !~ /^(?:$Ident|-?$Constant),$/ &&			# 10, // foo(),
 			    $dstat !~ /^(?:$Ident|-?$Constant);$/ &&			# foo();
 			    $dstat !~ /^(?:$Ident|-?$Constant)$/ &&			# 10 // foo()
+			    $dstat !~ /^'X'$/ &&					# character constants
 			    $dstat !~ /$exceptions/ &&
 			    $dstat !~ /^\.$Ident\s*=/ &&				# .foo =
 			    $dstat !~ /^do\s*$Constant\s*while\s*$Constant;?$/ &&	# do {...} while (...); // do {...} while (...)
-- 
1.7.9


  parent reply	other threads:[~2012-03-01 12:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 12:44 [PATCH 0/5] checkpatch update Andy Whitcroft
2012-03-01 12:44 ` [PATCH 1/5] checkpatch: catch [ ... ] usage when not at the beginning of defination Andy Whitcroft
2012-03-01 12:44 ` Andy Whitcroft [this message]
2012-03-01 12:44 ` [PATCH 3/5] checkpatch: handle string concatenation in simple #defines Andy Whitcroft
2012-03-01 12:44 ` [PATCH 4/5] checkpatch: high precidence operators do not require additional parentheses in #defines Andy Whitcroft
2012-03-01 12:44 ` [PATCH 5/5] checkpatch: add [] to type extensions 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=1330605850-7873-3-git-send-email-apw@canonical.com \
    --to=apw@canonical.com \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®