mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jian Peng <jipeng@broadcom.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: two false alarms from checkpatch.pl
Date: Mon, 13 Jun 2011 16:23:56 -0700	[thread overview]
Message-ID: <1308007436.26699.57.camel@Joe-Laptop> (raw)
In-Reply-To: <E18F441196CA634DB8E1F1C56A50A874572DE7E95F@IRVEXCHCCR01.corp.ad.broadcom.com>

On Mon, 2011-06-13 at 16:18 -0700, Jian Peng wrote:
> After running "./scripts/checkpatch.pl -F arch/mips/kernel/syscall.c", I got some errors reported on valid lines
> 
> ERROR: space prohibited before open square bracket '['
> #451: FILE: mips/kernel/syscall.c:451:
> +		: [addr] "r" (addr),
> 
> This line is valid, and if I remove the space in between, it will report a different error
> 
> ERROR: spaces required around that ':' (ctx:ExV)
> #448: FILE: mips/kernel/syscall.c:448:
> +		:[old] "=&r" (old),
>  		^
> In another case, it reported

Known defect.  checkpatch doesn't correctly parse asm.
checkpatch output isn't dicta.
You should just ignore it.

> ERROR: trailing statements should be on next line
> #515: FILE: mips/kernel/syscall.c:515:
> +	while (1);
> 
> This is also valid line.

That's really not a kernel style conformant line.

It really should be written as something like:

	while (1) {
		;		/* Never exit */
	}


  reply	other threads:[~2011-06-13 23:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-13 23:18 Jian Peng
2011-06-13 23:23 ` Joe Perches [this message]
2011-06-13 23:28   ` Jian Peng
2011-06-13 23:36     ` 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=1308007436.26699.57.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=jipeng@broadcom.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

all inboxes | Powered by JetHome®