From: Josh Triplett <josh@joshtriplett.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
Sparse Mailing-list <linux-sparse@vger.kernel.org>,
Lance Richardson <lrichard@redhat.com>,
Ramsay Jones <ramsay@ramsayjones.plus.com>,
Randy Dunlap <rdunlap@infradead.org>,
Rui Teng <rui.teng@linux.vnet.ibm.com>,
Christopher Li <sparse@chrisli.org>
Subject: Re: [RFC PATCH 0/2] drop the concept of 'known-but-ignored' attributes
Date: Thu, 15 Feb 2018 09:54:02 -0800 [thread overview]
Message-ID: <20180215175402.GA6236@localhost> (raw)
In-Reply-To: <CA+55aFyWiRtNu+KK3h15hsy7Wt6VXK9ex3+gtJWbcqJ3WtyDrg@mail.gmail.com>
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@joshtriplett.org> 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.
next prev parent reply other threads:[~2018-02-15 17:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 23:21 [RFC PATCH 0/2] drop the concept of 'known-but-ignored' attributes Luc Van Oostenryck
2018-02-13 23:21 ` [RFC PATCH 1/2] By default disable the warning flag '-Wunknown-attribute' Luc Van Oostenryck
2018-02-13 23:21 ` [RFC PATCH 2/2] drop the concept of 'known-but-ignored' attributes Luc Van Oostenryck
2018-02-15 15:57 ` [RFC PATCH 0/2] " Josh Triplett
2018-02-15 17:33 ` Linus Torvalds
2018-02-15 17:54 ` Josh Triplett [this message]
2018-02-15 20:03 ` Luc Van Oostenryck
2018-02-15 19:53 ` Luc Van Oostenryck
2018-02-15 20:06 ` Christopher Li
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=20180215175402.GA6236@localhost \
--to=josh@joshtriplett.org \
--cc=linux-sparse@vger.kernel.org \
--cc=lrichard@redhat.com \
--cc=luc.vanoostenryck@gmail.com \
--cc=ramsay@ramsayjones.plus.com \
--cc=rdunlap@infradead.org \
--cc=rui.teng@linux.vnet.ibm.com \
--cc=sparse@chrisli.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).