public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: apw@shadowen.org, linux-kernel@vger.kernel.org
Cc: Timur Tabi <timur@freescale.com>
Subject: [PATCH] checkpatch: add __asm__ to function-space-paren exception list
Date: Tue, 29 Jan 2008 17:17:28 -0600	[thread overview]
Message-ID: <12016486482483-git-send-email-timur@freescale.com> (raw)

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


             reply	other threads:[~2008-01-29 23:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29 23:17 Timur Tabi [this message]
2008-02-04 11:22 ` [PATCH] checkpatch: add __asm__ to function-space-paren exception list Andy Whitcroft
2008-02-04 16:38   ` Timur Tabi

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=12016486482483-git-send-email-timur@freescale.com \
    --to=timur@freescale.com \
    --cc=apw@shadowen.org \
    --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