public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@fifo99.com>
To: Greg KH <greg@kroah.com>
Cc: Andy Whitcroft <apw@canonical.com>, linux-kernel@vger.kernel.org
Subject: Re: checkpatch.pl is getting too slow
Date: Sun, 01 Feb 2009 06:33:14 -0800	[thread overview]
Message-ID: <1233498794.5903.68.camel@desktop> (raw)
In-Reply-To: <20090201044614.GA8589@kroah.com>

On Sat, 2009-01-31 at 20:46 -0800, Greg KH wrote:

> But defines do cross a line, and we should be able to check them
> properly, isn't that what the original version of this was doing?

The current version isn't able to detect the end of a define, single
line or multi-line .. I think it only see's a semi-colon as a block
ending, or "}".

so if you had,

#define block_one (1)
#define block_two (2)
... [100 more single line defines] ...
int i = block_one + block_two;

The processing starts at "block_one" and that block ends at "int i =
block_one + block_two;" , since that's the only line with a semi-colon.
Then the processing moves to the next line "block_two" and that block
also ends at "int i = block_one + block_two;" , and that happens 100
times for each define moving down.

However, each define should really be seen as a block of only one line,
or when there's a multi-line define that should all be one block.

Daniel




  reply	other threads:[~2009-02-01 14:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-31 18:55 checkpatch.pl is getting too slow Greg KH
2009-01-31 21:02 ` Andy Whitcroft
2009-01-31 21:35   ` Daniel Walker
2009-01-31 22:10     ` Daniel Walker
2009-02-01  0:57   ` Daniel Walker
2009-02-01  4:46     ` Greg KH
2009-02-01 14:33       ` Daniel Walker [this message]
2009-02-01 17:47       ` Daniel Walker
2009-02-03  5:16         ` Greg KH
2009-02-09  8:41           ` Andy Whitcroft
2009-02-09  8:58         ` Andy Whitcroft

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=1233498794.5903.68.camel@desktop \
    --to=dwalker@fifo99.com \
    --cc=apw@canonical.com \
    --cc=greg@kroah.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