[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1402247478.6328.5.camel@joe-AO725>
Date: Sun, 08 Jun 2014 10:11:18 -0700
From: Joe Perches <joe@...ches.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, Choi Gi-yong <yong@...y.org>,
Andy Whitcroft <apw@...onical.com>
Subject: [PATCH] checkpatch: fix complex macro false positive for escaped
constant char
A single escaped constant char is not a complex macro.
Signed-off-by: Joe Perches <joe@...ches.com>
---
On Sun, 2014-06-08 at 23:12 +0900, Choi Gi-yong wrote:
> diff --git a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c
[]
> @@ -35,7 +35,7 @@
[]
> -#define PROCSPEECH '\r'
> +#define PROCSPEECH ('\r')
checkpatch false positive, doesn't need parenthesis
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 010b18e..ba92493 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3757,7 +3757,7 @@ sub process {
$dstat !~ /^(?:$Ident|-?$Constant),$/ && # 10, // foo(),
$dstat !~ /^(?:$Ident|-?$Constant);$/ && # foo();
$dstat !~ /^[!~-]?(?:$Lval|$Constant)$/ && # 10 // foo() // !foo // ~foo // -foo // foo->bar // foo.bar->baz
- $dstat !~ /^'X'$/ && # character constants
+ $dstat !~ /^'X'$/ && $dstat !~ /^'XX'$/ && # character constants
$dstat !~ /$exceptions/ &&
$dstat !~ /^\.$Ident\s*=/ && # .foo =
$dstat !~ /^(?:\#\s*$Ident|\#\s*$Constant)\s*$/ && # stringification #foo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists