Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1346791
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] checkpatch: Exclude asm volatile from complex macro check |
| Date | 2016-03-01 18:30 +0100 |
| Message-ID | <r7Whs-3Ha-31@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
asm volatile and all its variants like __asm__ __volatile__ ("<foo>")
are reported as errors with "Macros with with complex values should be
enclosed in parentheses".
Make an exception for these asm volatile macro definitions by converting
the "asm volatile" to "asm_volatile" so it appears as a single function
call and the error isn't reported.
Reported-by: Jeff Merkey <linux.mdb@gmail.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
scripts/checkpatch.pl | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 874132b..aa94e44 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4561,6 +4561,9 @@ sub process {
{
}
+ # Make asm volatile uses seem like a generic function
+ $dstat =~ s/\b_*asm_*\s+_*volatile_*\b/asm_volatile/g;
+
my $exceptions = qr{
$Declare|
module_param_named|
--
2.6.3.368.gf34be46
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] checkpatch: Exclude asm volatile from complex macro check Joe Perches <joe@perches.com> - 2016-03-01 18:30 +0100
csiph-web