From: Joe Perches <joe@perches.com>
To: Greg Donald <gdonald@gmail.com>
Cc: Andy Whitcroft <apw@canonical.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts: checkpatch.pl: Fix existing typedef false positive warning
Date: Sun, 21 Sep 2014 20:49:03 -0700 [thread overview]
Message-ID: <1411357743.2952.25.camel@joe-AO725> (raw)
In-Reply-To: <CAO+WgCb0V1NDwYDmn3dVTGUM6d-D8ptUEeABqe-+7QwxLhMM0w@mail.gmail.com>
On Sun, 2014-09-21 at 22:08 -0500, Greg Donald wrote:
> On Sun, Sep 21, 2014 at 9:31 PM, Joe Perches <joe@perches.com> wrote:
> > On Sun, 2014-09-21 at 20:32 -0500, Greg Donald wrote:
> >> Fixing an "open brace '{' following struct go on the same line" error causes a
> >> false positive warning "do not add new typedefs". Fix existing typedef false
> >> positive warning.
> >
> > This doesn't work.
> > The matching deleted line can be any number of lines above.
>
> But this fixes the most common case:
>
> -typedef struct ksock_proto
> -{
> +typedef struct ksock_proto {
Meh. I think people are smart enough to work
out that this is not a new typedef.
> If you're wanting to check more than just $rawlines[$linenr - 3], how
> far above does it make sense to go? From what I'm seeing the '{' is
> usually on the next line.
It's not the most common case working, it's the
generic case working.
It's in a large block being changed, it doesn't work.
If it's checking a file, there are no "-" lines.
prev parent reply other threads:[~2014-09-22 3:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 1:32 [PATCH] scripts: checkpatch.pl: Fix existing typedef false positive warning Greg Donald
2014-09-22 2:31 ` Joe Perches
2014-09-22 3:08 ` Greg Donald
2014-09-22 3:49 ` Joe Perches [this message]
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=1411357743.2952.25.camel@joe-AO725 \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=gdonald@gmail.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