linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Silence even more W=2 warnings
@ 2014-09-19 15:29 Jeff Kirsher
  2014-09-19 15:29 ` [PATCH 1/7] compiler: Add diagnostic control macros Jeff Kirsher
                   ` (7 more replies)
  0 siblings, 8 replies; 63+ messages in thread
From: Jeff Kirsher @ 2014-09-19 15:29 UTC (permalink / raw)
  To: sparse; +Cc: Jeff Kirsher, linux-sparse, linux-kernel, Mark Rustad

The following patches silence over 100,000 warnings in a W=2
kernel build. This series does most of it by using the compilers
diagnostic controls. The first patch in the series adds macros to
invoke the pragmas for those controls. Macros are provided for GCC
and clang. Although they are highly compatible in this area, macros
are provided for compiler-specific controls, and there is one
example that uses a clang-specific control (look for DIAG_CLANG_IGNORE).

Some missing-field-initializers warnings were resolved using
the diagnostic control macros simply because so many lines
would have had to have been changed. At this stage Mark thought 
about avoiding possible merge issues. If the maintainer would 
rather resolve them by using designated initialization, just 
say so.

The combined effect of this patch series and his other patches
that did not use these diagnostic control macros was to reduce 
the number of W=2 warnings from 127,164 to 1,345!

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Mark Rustad (7):
  compiler: Add diagnostic control macros
  x86: Silence initializer-overrides warnings
  atomic: Silence nested-externs warnings
  bitops: Silence nested-externs warnings
  signal: Silence nested-externs warnings
  mm: Silence nested-externs warnings
  sched: Silence nested-externs warnings

 arch/x86/ia32/syscall_ia32.c   |  2 ++
 include/linux/atomic.h         |  2 ++
 include/linux/bitops.h         |  2 ++
 include/linux/compiler-clang.h | 26 ++++++++++++++++++++++++++
 include/linux/compiler-gcc4.h  | 31 +++++++++++++++++++++++++++++++
 include/linux/compiler.h       | 20 ++++++++++++++++++++
 include/linux/mm.h             |  2 ++
 include/linux/sched.h          |  2 ++
 include/linux/signal.h         |  6 ++++++
 9 files changed, 93 insertions(+)

-- 
1.9.3


^ permalink raw reply	[flat|nested] 63+ messages in thread

end of thread, other threads:[~2014-09-26 21:07 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-19 15:29 [PATCH 0/7] Silence even more W=2 warnings Jeff Kirsher
2014-09-19 15:29 ` [PATCH 1/7] compiler: Add diagnostic control macros Jeff Kirsher
2014-09-19 15:29 ` [PATCH 2/7] x86: Silence initializer-overrides warnings Jeff Kirsher
2014-09-19 15:29 ` [PATCH 3/7] atomic: Silence nested-externs warnings Jeff Kirsher
2014-09-19 20:43   ` Peter Zijlstra
2014-09-19 20:53     ` Jeff Kirsher
2014-09-19 15:29 ` [PATCH 4/7] bitops: " Jeff Kirsher
2014-09-19 15:29 ` [PATCH 5/7] signal: " Jeff Kirsher
2014-09-19 15:35   ` Richard Weinberger
2014-09-19 15:37     ` Jeff Kirsher
2014-09-19 15:39       ` Richard Weinberger
2014-09-19 17:20         ` Oleg Nesterov
2014-09-19 21:21           ` Josh Triplett
2014-09-19 21:26             ` Rustad, Mark D
2014-09-21 16:42             ` [PATCH 0/1] signal: use BUILD_BUG() instead of _NSIG_WORDS_is_unsupported_size() Oleg Nesterov
2014-09-21 16:43               ` [PATCH 1/1] " Oleg Nesterov
2014-09-22 17:26                 ` Josh Triplett
2014-09-19 15:29 ` [PATCH 6/7] mm: Silence nested-externs warnings Jeff Kirsher
2014-09-19 15:29 ` [PATCH 7/7] sched: " Jeff Kirsher
2014-09-19 19:34   ` Richard Weinberger
2014-09-19 20:34     ` Rustad, Mark D
2014-09-19 20:41       ` Richard Weinberger
2014-09-19 20:49         ` Rustad, Mark D
2014-09-22 17:55     ` [PATCH] sched: Remove nested extern Mark D Rustad
2014-09-22 18:25       ` Josh Triplett
2014-09-22 19:01       ` Peter Zijlstra
2014-09-22 19:32         ` Rustad, Mark D
2014-09-22 20:05           ` Peter Zijlstra
2014-09-22 20:59             ` Rustad, Mark D
2014-09-22 21:21               ` Peter Zijlstra
2014-09-22 21:50                 ` Rustad, Mark D
2014-09-24  7:41                   ` Ingo Molnar
2014-09-24  7:52                     ` Peter Zijlstra
2014-09-24  7:58                       ` Ingo Molnar
2014-09-19 22:54   ` [PATCH 7/7] sched: Silence nested-externs warnings Peter Zijlstra
2014-09-19 23:26     ` Rustad, Mark D
2014-09-22 15:33 ` [PATCH 0/7] Silence even more W=2 warnings Borislav Petkov
2014-09-22 17:06   ` Rustad, Mark D
2014-09-22 18:40     ` Borislav Petkov
2014-09-22 18:59       ` Rustad, Mark D
2014-09-22 19:21         ` Borislav Petkov
2014-09-22 19:44           ` Jeff Kirsher
2014-09-22 19:57             ` Borislav Petkov
2014-09-22 20:09               ` Jeff Kirsher
2014-09-22 20:33                 ` Borislav Petkov
2014-09-22 21:21                   ` Jeff Kirsher
2014-09-23  8:01                     ` Borislav Petkov
2014-09-23 14:49                       ` Josh Triplett
2014-09-23 16:08                         ` Borislav Petkov
2014-09-23 16:29                         ` Rustad, Mark D
2014-09-25  7:45                     ` Geert Uytterhoeven
2014-09-25 16:44                       ` Borislav Petkov
2014-09-26 19:37                       ` Rustad, Mark D
2014-09-26 19:58                         ` josh
2014-09-26 21:07                           ` Rustad, Mark D
2014-09-22 21:50                   ` Rustad, Mark D
2014-09-23  8:22                     ` Borislav Petkov
2014-09-23 17:24                       ` Rustad, Mark D
2014-09-23 18:44                         ` Borislav Petkov
2014-09-23 19:04                           ` Joe Perches
2014-09-23 20:43                           ` Rustad, Mark D
2014-09-25  8:27                             ` Borislav Petkov
2014-09-25  0:17                           ` Rustad, Mark D

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).