[PATCH] checkpatch: add __asm__ to function-space-paren exception list

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <apw@...>, <linux-kernel@...>
Cc: Timur Tabi <timur@...>
Date: Tuesday, January 29, 2008 - 7:17 pm

checkpatch.pl thinks that __asm__ is a function name, so it complains about
a space between the function name and a parenthesis when it sees
"__asm__ ("mov ax,bx")".

This change will also encourage developers to use '__asm__' instead of 'asm'.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 scripts/checkpatch.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 579f50f..971c822 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1115,7 +1115,7 @@ sub process {
 
 # check for spaces between functions and their parentheses.
 		while ($line =~ /($Ident)\s+\(/g) {
-			if ($1 !~ /^(?:if|for|while|switch|return|volatile|__volatile__|__attribute__|format|__extension__|Copyright|case)$/ &&
+			if ($1 !~ /^(?:if|for|while|switch|return|volatile|__volatile__|__attribute__|format|__extension__|Copyright|case|__asm__)$/ &&
 		            $line !~ /$Type\s+\(/ && $line !~ /^.\#\s*define\b/) {
 				WARN("no space between function name and open parenthesis '('\n" . $herecurr);
 			}
-- 
1.5.2.4

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] checkpatch: add __asm__ to function-space-paren exce..., Timur Tabi, (Tue Jan 29, 7:17 pm)