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@xxxxxxxxx> 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