[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180920172301.21868-1-miguel.ojeda.sandonis@gmail.com>
Date: Thu, 20 Sep 2018 19:22:46 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org,
Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Andreas Dilger <adilger.kernel@...ger.ca>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>,
Steven Rostedt <rostedt@...dmis.org>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
Olof Johansson <olof@...m.net>,
Konstantin Ryabitsev <konstantin@...uxfoundation.org>,
"David S . Miller" <davem@...emloft.net>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Kees Cook <keescook@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
Paul Lawrence <paullawrence@...gle.com>,
Sandipan Das <sandipan@...ux.vnet.ibm.com>,
Andrey Konovalov <andreyknvl@...gle.com>,
David Woodhouse <dwmw2@...radead.org>,
Will Deacon <will.deacon@....com>,
Philippe Ombredanne <pombredanne@...b.com>,
Paul Burton <paul.burton@...s.com>,
David Rientjes <rientjes@...gle.com>, Willy Tarreau <w@....eu>,
Martin Sebor <msebor@...il.com>,
Christopher Li <sparse@...isli.org>,
Jonathan Corbet <corbet@....net>,
Theodore Ts'o <tytso@....edu>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Joe Perches <joe@...ches.com>, Arnd Bergmann <arnd@...db.de>,
Dominique Martinet <asmadeus@...ewreck.org>,
Stefan Agner <stefan@...er.ch>,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-doc@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-sparse@...r.kernel.org, linux-kbuild@...r.kernel.org
Subject: [PATCH v5 00/15] Compiler Attributes
The Compiler Attributes series is an effort to disentangle
the include/linux/compiler*.h headers and bring them up to date.
The main idea behind the series is to use feature checking macros
(i.e. __has_attribute) instead of compiler version checks (e.g. GCC_VERSION),
which are compiler-agnostic (so they can be shared, reducing the size
of compiler-specific headers) and version-agnostic.
Other related improvements have been performed in the headers as well,
which on top of the use of __has_attribute it has amounted to a significant
simplification of these headers (e.g. GCC_VERSION is now only guarding 4
non-attribute macros).
This series should also help the efforts to support compiling the kernel
with clang and icc. A fair amount of documentation and comments have also
been added, clarified or removed; and the headers are now more readable,
which should help kernel developers in general.
The series was triggered due to the move to gcc >= 4.6. In turn, this series
has also triggered Sparse to gain the ability to recognize __has_attribute
on its own.
Finally, the nonstring variable attribute series has been applied on top
of this one.
You can also fetch it from:
https://github.com/ojeda/linux/tree/compiler-attributes-v5
Enjoy!
Cheers,
Miguel
Cc: Andreas Dilger <adilger.kernel@...ger.ca>
Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: Michal Marek <michal.lkml@...kovi.net>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Mauro Carvalho Chehab <mchehab+samsung@...nel.org>
Cc: Olof Johansson <olof@...m.net>
Cc: Konstantin Ryabitsev <konstantin@...uxfoundation.org>
Cc: David S. Miller <davem@...emloft.net>
Cc: Andrey Ryabinin <aryabinin@...tuozzo.com>
Cc: Kees Cook <keescook@...omium.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Paul Lawrence <paullawrence@...gle.com>
Cc: Sandipan Das <sandipan@...ux.vnet.ibm.com>
Cc: Andrey Konovalov <andreyknvl@...gle.com>
Cc: David Woodhouse <dwmw2@...radead.org>
Cc: Will Deacon <will.deacon@....com>
Cc: Philippe Ombredanne <pombredanne@...b.com>
Cc: Paul Burton <paul.burton@...s.com>
Cc: David Rientjes <rientjes@...gle.com>
Cc: Willy Tarreau <w@....eu>
Cc: Martin Sebor <msebor@...il.com>
Cc: Christopher Li <sparse@...isli.org>
Cc: Jonathan Corbet <corbet@....net>
Cc: Theodore Ts'o <tytso@....edu>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: Joe Perches <joe@...ches.com>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Dominique Martinet <asmadeus@...ewreck.org>
Cc: Stefan Agner <stefan@...er.ch>
Cc: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-doc@...r.kernel.org
Cc: linux-ext4@...r.kernel.org
Cc: linux-sparse@...r.kernel.org
Cc: linux-kbuild@...r.kernel.org
v4 -> v5
* Removed the 2 __naked patches, since Greg just applied them to master;
and rebased on top of that. The only change in the range-diff is in
"Compiler Attributes: always use the extra-underscores syntax" due
to the move of __naked to compiler_types.h.
* Applied the nonstring series on top of this one (last 4 patches).
Rationale:
- the nonstring series would anyway be modified again by this one
(so it has been rebased after the general cleanup).
- ext4's "local" nonstring was merged
- easier to manage (and easier to see the end result)
The first 2 patches of the last 4 add the warning back at W=1 and
add the __nonstring attribute. The other two serve as an example
of usage and as a cleanup.
* Cc lists removed from each commit; using a single list in the cover letter;
and a new, revised list of Cc (wider audience).
Miguel Ojeda (15):
Compiler Attributes: remove unused attributes
Compiler Attributes: always use the extra-underscores syntax
Compiler Attributes: remove unneeded tests
Compiler Attributes: homogenize __must_be_array
Compiler Attributes: remove unneeded sparse (__CHECKER__) tests
Compiler Attributes: add missing SPDX ID in compiler_types.h
Compiler Attributes: use feature checks instead of version checks
Compiler Attributes: KENTRY used twice the "used" attribute
Compiler Attributes: remove uses of __attribute__ from compiler.h
Compiler Attributes: add Doc/process/programming-language.rst
Compiler Attributes: add MAINTAINERS entry
Compiler Attributes: add support for __nonstring (gcc >= 8)
Compiler Attributes: enable -Wstringop-truncation on W=1 (gcc >= 8)
Compiler Attributes: auxdisplay: panel: use __nonstring
Compiler Attributes: ext4: remove local __nonstring definition
Documentation/process/index.rst | 1 +
.../process/programming-language.rst | 45 +++
MAINTAINERS | 5 +
drivers/auxdisplay/panel.c | 7 +-
fs/ext4/ext4.h | 9 -
include/linux/compiler-clang.h | 5 -
include/linux/compiler-gcc.h | 70 +----
include/linux/compiler-intel.h | 9 -
include/linux/compiler.h | 19 +-
include/linux/compiler_attributes.h | 258 ++++++++++++++++++
include/linux/compiler_types.h | 101 +------
scripts/Makefile.extrawarn | 1 +
12 files changed, 341 insertions(+), 189 deletions(-)
create mode 100644 Documentation/process/programming-language.rst
create mode 100644 include/linux/compiler_attributes.h
--
2.17.1
Powered by blists - more mailing lists