On Thu, Feb 15, 2018 at 09:54:02AM -0800, Josh Triplett wrote: > On Thu, Feb 15, 2018 at 09:33:14AM -0800, Linus Torvalds wrote: > > On Thu, Feb 15, 2018 at 7:57 AM, Josh Triplett <josh@xxxxxxxxxxxxxxxx> wrote: > > > > > > I absolutely agree that these have been annoying. However, they've also > > > been useful in the past to identify new flags used in the kernel and > > > other projects that we may need to actually act on, rather than just > > > ignore. > > > > I think the issue is that the warning is useful for _sparse_ > > developers, but not to actual users. > > Unless they're debugging why Sparse doesn't fully understand their code, > yes. > > > So I do think the warning itself should be off by default - but maybe > > the "known but ignored" table should exist so that sparse people can > > say "is there a new attribute that I need to look at"? > > Agreed on both counts. > > I also wonder if it might make sense to make "unknown attribute" a > warning that automatically gets displayed *if* displaying other warnings > at the same time, to help with debugging the other warnings. That way, > if you run Sparse on a file that would otherwise produce no warnings, an > unknown attribute doesn't create noise; however, if you run Sparse on a > file that would give warnings anyway, you get the unknown attribute > warning as well, which might make it obvious why the other warnings > arise. > > For instance, if you see Sparse warn about an unknown attribute on a > type, followed by a pile of type mismatches involving that type, perhaps > you'd want to investigate that attribute and its use. Yes, that would be an idea. It's a bit annoying to implement though, unknown attributes is something detected at parsing time, while type errors are done later. OTOH, there are other situations where postponing a warning would also be something useful, so ... -- Luc -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html