[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 6 Jun 2017 14:28:03 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Matthias Kaehlcke <mka@...omium.org>
Cc: Arnd Bergmann <arnd@...db.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Christoph Hellwig <hch@....de>, Jens Axboe <axboe@...nel.dk>,
Steven Rostedt <rostedt@...dmis.org>,
David Rientjes <rientjes@...gle.com>,
Douglas Anderson <dianders@...omium.org>,
Guenter Roeck <linux@...ck-us.net>,
Mark Brown <broonie@...nel.org>,
David Miller <davem@...emloft.net>
Subject: Re: [RFC] clang: 'unused-function' warning on static inline functions
On Tue, Jun 6, 2017 at 2:23 PM, Matthias Kaehlcke <mka@...omium.org> wrote:
>
> I tend to disagree, the warning is useful to detect truly unused
> static inline functions, which should be removed, rather than be
> carried around/maintained for often long periods of time.
That may be true in other projects, but we really do have a lot of
code that is conditionally used. The warning is just not useful.
I agree that we could use "__maybe_unused", but at the same time, I
don't really see the point. There's no way in hell we'd ever do that
for inlines that are in header files (*of course* they may be unused),
why would we then haev a magical rule like "let's do it for inlines in
C files".
I applied the patch from David Rientjes to just make "inline"
automatically mean "maybe unused" for clang.
Linus
Powered by blists - more mailing lists