public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@canonical.com>
To: David Howells <dhowells@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: checkpatch problem
Date: Tue, 7 Sep 2010 19:00:25 +0100	[thread overview]
Message-ID: <20100907180025.GD2662@shadowen.org> (raw)
In-Reply-To: <23323.1283864982@redhat.com>

On Tue, Sep 07, 2010 at 02:09:42PM +0100, David Howells wrote:
> 
> Hi,
> 
> Checkpatch generates the following messages for inline asm strings:
> 
> WARNING: unnecessary whitespace before a quoted newline
> #49: FILE: arch/m32r/include/asm/irqflags.h:31:
> +               "ld24   %0, #0  ; Use 32-bit insn.                      \n\t"
> 
> however, inline asm is more readable if I can tabulate things, including the
> newline markers:
> 
> 	asm volatile (
> 		"ld24	%0, #0	; Use 32-bit insn.			\n\t"
> 		"mvfc	%1, psw	; No interrupt can be accepted here.	\n\t"
> 		"mvtc	%0, psw						\n\t"
> 		"and3	%0, %1, #0xffbf					\n\t"
> 		"mvtc	%0, psw						\n\t"
> 		: "=&r" (tmpreg0), "=&r" (tmpreg1)
> 		:
> 		: "cbit", "memory");
> 
> Can you please fix it, even if it's only to permit multiple TAB chars before
> '\n'.
> 
> Whilst this check is probaly fine for strings to be displayed in some way, this
> doesn't necessarily apply to inline asm strings.  Furthermore, the extra white
> space does not impact the resulting binary.

A tricky one to know how to detect it as different.  Often we do not
have the asm markers to hint us to change style.  This affects us often
as gcc abuses the meaning of almost every character and has different
spacing for them too.

Will think on it.

-apw

  reply	other threads:[~2010-09-07 18:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-07 13:09 checkpatch problem David Howells
2010-09-07 18:00 ` Andy Whitcroft [this message]
2010-09-07 19:41   ` Joe Perches
2010-09-22 15:33     ` David Howells
2010-09-22 17:43       ` David Howells
2010-09-23 18:15         ` David Howells
2010-09-23 18:27           ` Joe Perches
2010-09-23 18:54             ` David Howells
2010-09-23 20:31               ` Joe Perches

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=20100907180025.GD2662@shadowen.org \
    --to=apw@canonical.com \
    --cc=dhowells@redhat.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