Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-31 Thread Matthias Kaehlcke
El Wed, May 31, 2017 at 03:31:26PM -0700 Doug Anderson ha dit: > Hi, > > On Wed, May 31, 2017 at 2:45 PM, David Rientjes wrote: > > On Wed, 31 May 2017, Doug Anderson wrote: > > > >> > Again, I defer to maintainers like Andrew and Ingo who have to deal with > >> > an

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-31 Thread Matthias Kaehlcke
El Wed, May 31, 2017 at 03:31:26PM -0700 Doug Anderson ha dit: > Hi, > > On Wed, May 31, 2017 at 2:45 PM, David Rientjes wrote: > > On Wed, 31 May 2017, Doug Anderson wrote: > > > >> > Again, I defer to maintainers like Andrew and Ingo who have to deal with > >> > an enormous amount of patches

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-31 Thread Doug Anderson
Hi, On Wed, May 31, 2017 at 2:45 PM, David Rientjes wrote: > On Wed, 31 May 2017, Doug Anderson wrote: > >> > Again, I defer to maintainers like Andrew and Ingo who have to deal with >> > an enormous amount of patches on how they would like to handle it; I don't >> > think

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-31 Thread Doug Anderson
Hi, On Wed, May 31, 2017 at 2:45 PM, David Rientjes wrote: > On Wed, 31 May 2017, Doug Anderson wrote: > >> > Again, I defer to maintainers like Andrew and Ingo who have to deal with >> > an enormous amount of patches on how they would like to handle it; I don't >> > think myself or anybody else

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-31 Thread David Rientjes
On Wed, 31 May 2017, Doug Anderson wrote: > > Again, I defer to maintainers like Andrew and Ingo who have to deal with > > an enormous amount of patches on how they would like to handle it; I don't > > think myself or anybody else who doesn't deal with a large number of > > patches should be

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-31 Thread David Rientjes
On Wed, 31 May 2017, Doug Anderson wrote: > > Again, I defer to maintainers like Andrew and Ingo who have to deal with > > an enormous amount of patches on how they would like to handle it; I don't > > think myself or anybody else who doesn't deal with a large number of > > patches should be

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-31 Thread Mark Brown
On Wed, May 31, 2017 at 08:53:40AM -0700, Doug Anderson wrote: > It is certainly possible that something like this could be done (I > think Coverity works something like this), but I'm not sure there are > any volunteers. Doing this would require a person to setup and > monitor a clang builder

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-31 Thread Mark Brown
On Wed, May 31, 2017 at 08:53:40AM -0700, Doug Anderson wrote: > It is certainly possible that something like this could be done (I > think Coverity works something like this), but I'm not sure there are > any volunteers. Doing this would require a person to setup and > monitor a clang builder

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-31 Thread Doug Anderson
Hi, On Tue, May 30, 2017 at 5:10 PM, David Rientjes wrote: > On Wed, 24 May 2017, Doug Anderson wrote: > >> * Matthias has been sending out individual patches that take each >> particular case into account to try to remove the warnings. In some >> cases this removes totally

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-31 Thread Doug Anderson
Hi, On Tue, May 30, 2017 at 5:10 PM, David Rientjes wrote: > On Wed, 24 May 2017, Doug Anderson wrote: > >> * Matthias has been sending out individual patches that take each >> particular case into account to try to remove the warnings. In some >> cases this removes totally dead code. In other

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-30 Thread Matthias Kaehlcke
El Tue, May 30, 2017 at 05:10:10PM -0700 David Rientjes ha dit: > On Wed, 24 May 2017, Doug Anderson wrote: > > > * Matthias has been sending out individual patches that take each > > particular case into account to try to remove the warnings. In some > > cases this removes totally dead code.

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-30 Thread Matthias Kaehlcke
El Tue, May 30, 2017 at 05:10:10PM -0700 David Rientjes ha dit: > On Wed, 24 May 2017, Doug Anderson wrote: > > > * Matthias has been sending out individual patches that take each > > particular case into account to try to remove the warnings. In some > > cases this removes totally dead code.

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-30 Thread David Rientjes
On Wed, 24 May 2017, Doug Anderson wrote: > * Matthias has been sending out individual patches that take each > particular case into account to try to remove the warnings. In some > cases this removes totally dead code. In other cases this adds > __maybe_unused. ...and as a last resort it uses

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-30 Thread David Rientjes
On Wed, 24 May 2017, Doug Anderson wrote: > * Matthias has been sending out individual patches that take each > particular case into account to try to remove the warnings. In some > cases this removes totally dead code. In other cases this adds > __maybe_unused. ...and as a last resort it uses

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-25 Thread Matthias Kaehlcke
Hi Joe, El Thu, May 25, 2017 at 09:48:53AM -0700 Joe Perches ha dit: > On Thu, 2017-05-25 at 09:14 -0700, Matthias Kaehlcke wrote: > > clang doesn't raise > > warnings about unused static inline functions in headers. > > Is any "#include" file a "header" to clang or only "*.h" files? > > For

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-25 Thread Matthias Kaehlcke
Hi Joe, El Thu, May 25, 2017 at 09:48:53AM -0700 Joe Perches ha dit: > On Thu, 2017-05-25 at 09:14 -0700, Matthias Kaehlcke wrote: > > clang doesn't raise > > warnings about unused static inline functions in headers. > > Is any "#include" file a "header" to clang or only "*.h" files? > > For

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-25 Thread Joe Perches
On Thu, 2017-05-25 at 09:14 -0700, Matthias Kaehlcke wrote: > clang doesn't raise > warnings about unused static inline functions in headers. Is any "#include" file a "header" to clang or only "*.h" files? For instance: The kernel has ~500 .c files that other .c files #include. Are unused

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-25 Thread Joe Perches
On Thu, 2017-05-25 at 09:14 -0700, Matthias Kaehlcke wrote: > clang doesn't raise > warnings about unused static inline functions in headers. Is any "#include" file a "header" to clang or only "*.h" files? For instance: The kernel has ~500 .c files that other .c files #include. Are unused

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-25 Thread Matthias Kaehlcke
El Thu, May 25, 2017 at 07:52:07AM +0200 Ingo Molnar ha dit: > > * Matthias Kaehlcke wrote: > > > El Wed, May 24, 2017 at 02:01:15PM -0700 David Rientjes ha dit: > > > > > GCC explicitly does not warn for unused static inline functions for > > > -Wunused-function. The

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-25 Thread Matthias Kaehlcke
El Thu, May 25, 2017 at 07:52:07AM +0200 Ingo Molnar ha dit: > > * Matthias Kaehlcke wrote: > > > El Wed, May 24, 2017 at 02:01:15PM -0700 David Rientjes ha dit: > > > > > GCC explicitly does not warn for unused static inline functions for > > > -Wunused-function. The manual states: > > > >

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-24 Thread Ingo Molnar
* Matthias Kaehlcke wrote: > El Wed, May 24, 2017 at 02:01:15PM -0700 David Rientjes ha dit: > > > GCC explicitly does not warn for unused static inline functions for > > -Wunused-function. The manual states: > > > > Warn whenever a static function is declared but not

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-24 Thread Ingo Molnar
* Matthias Kaehlcke wrote: > El Wed, May 24, 2017 at 02:01:15PM -0700 David Rientjes ha dit: > > > GCC explicitly does not warn for unused static inline functions for > > -Wunused-function. The manual states: > > > > Warn whenever a static function is declared but not defined or > >

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-24 Thread Doug Anderson
Hi, On Wed, May 24, 2017 at 2:32 PM, Andrew Morton wrote: > On Wed, 24 May 2017 14:22:29 -0700 Matthias Kaehlcke > wrote: > >> I'm not a kernel maintainer, so it's not my decision whether this >> warning should be silenced, my personal opinion is

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-24 Thread Doug Anderson
Hi, On Wed, May 24, 2017 at 2:32 PM, Andrew Morton wrote: > On Wed, 24 May 2017 14:22:29 -0700 Matthias Kaehlcke > wrote: > >> I'm not a kernel maintainer, so it's not my decision whether this >> warning should be silenced, my personal opinion is that it's benfits >> outweigh the

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-24 Thread Andrew Morton
On Wed, 24 May 2017 14:22:29 -0700 Matthias Kaehlcke wrote: > I'm not a kernel maintainer, so it's not my decision whether this > warning should be silenced, my personal opinion is that it's benfits > outweigh the inconveniences of dealing with half-false positives, >

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-24 Thread Andrew Morton
On Wed, 24 May 2017 14:22:29 -0700 Matthias Kaehlcke wrote: > I'm not a kernel maintainer, so it's not my decision whether this > warning should be silenced, my personal opinion is that it's benfits > outweigh the inconveniences of dealing with half-false positives, > generally caused by the

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-24 Thread Matthias Kaehlcke
El Wed, May 24, 2017 at 02:01:15PM -0700 David Rientjes ha dit: > GCC explicitly does not warn for unused static inline functions for > -Wunused-function. The manual states: > > Warn whenever a static function is declared but not defined or > a non-inline static function is unused.

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-24 Thread Matthias Kaehlcke
El Wed, May 24, 2017 at 02:01:15PM -0700 David Rientjes ha dit: > GCC explicitly does not warn for unused static inline functions for > -Wunused-function. The manual states: > > Warn whenever a static function is declared but not defined or > a non-inline static function is unused.

[patch] compiler, clang: suppress warning for unused static inline functions

2017-05-24 Thread David Rientjes
GCC explicitly does not warn for unused static inline functions for -Wunused-function. The manual states: Warn whenever a static function is declared but not defined or a non-inline static function is unused. Clang does warn for static inline functions that are unused. It turns

[patch] compiler, clang: suppress warning for unused static inline functions

2017-05-24 Thread David Rientjes
GCC explicitly does not warn for unused static inline functions for -Wunused-function. The manual states: Warn whenever a static function is declared but not defined or a non-inline static function is unused. Clang does warn for static inline functions that are unused. It turns