]> git.baikalelectronics.ru Git - kernel.git/commit
Compiler Attributes: remove unneeded tests
authorMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Thu, 30 Aug 2018 17:45:01 +0000 (19:45 +0200)
committerMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Sun, 30 Sep 2018 18:14:03 +0000 (20:14 +0200)
commit99b514fb0fff439d56508e874f88b0b8d6a870dc
tree186e2ed378aacc4142e41535c4dc5670defed3a9
parent2d2b2712ba97b330d2d933ec25853fa263f199a8
Compiler Attributes: remove unneeded tests

Attributes const and always_inline have tests around them
which are unneeded, since they are supported by gcc >= 4.6,
clang >= 3 and icc >= 13. https://godbolt.org/z/DFPq37

In the case of gnu_inline, we do not need to test for
__GNUC_STDC_INLINE__ because, regardless of the current
inlining behavior, we can simply always force the old
GCC inlining behavior by using the attribute in all cases.

Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # on top of v4.19-rc5, clang 7
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
include/linux/compiler_types.h