linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH] warnings: ensure the source filename is shown at least once
Date: Sun, 19 Jul 2020 01:36:58 +0200	[thread overview]
Message-ID: <20200718233658.nf7ry2nbw4mrviry@ltop.local> (raw)
In-Reply-To: <CAHk-=wjAe_XCz9O2z_FRAOw4iA1+zF9Mcvi3Mp17tpH9y+cLkQ@mail.gmail.com>

On Sat, Jul 18, 2020 at 01:21:35PM -0700, Linus Torvalds wrote:
> On Sat, Jul 18, 2020 at 11:40 AM Luc Van Oostenryck
> <luc.vanoostenryck@gmail.com> wrote:
> >
> > When checking a series of files, if some warnings or errors
> > are issued but only coming from some includes, it's not possible
> > to identify which source file is responsible since its filename
> > is not displayed.
> >
> > So, if the first warning is from a file other than the source
> > file, display first a note coming from the source file itself.
> 
> This really isn't enough when the include chain is deeper and more complex.

Yes, my use case was much more limited.
 
> How about something a bit more complex? This is only lightly tested,
> but I don't have time for anything more right now..
> 
> It results in things like

I like it a lot and it works nicely.
 
> That stream chaining information might perhaps be useful for other cases too?

For sparse itself, I don't know, but for some other tools that would
analyze the code/#include structure, yes surely.
 
> Would it be better to save the whole 'pos' for the chain, so that
> you'd get line numbers etc for the chain? Probably. As mentioned, this
> is a quick "how about something like this".

I added this in a following patch.
 
> If you extend it and do more testing, you can have my sign-off, or
> just take ownership of the patch entirely with my ack..

I only removed a repetition in an initialization, so I added your s-o-b.

> Now off for more kernel stuff after a quick sparse excursion...

Yes, sure!
Thanks a lot because it's, I think, a really nice improvement.
-- Luc

      reply	other threads:[~2020-07-18 23:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-18 18:39 [PATCH] warnings: ensure the source filename is shown at least once Luc Van Oostenryck
2020-07-18 20:21 ` Linus Torvalds
2020-07-18 23:36   ` Luc Van Oostenryck [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=20200718233658.nf7ry2nbw4mrviry@ltop.local \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).