linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Clean the new GCC 9 -Wmissing-attributes warnings
@ 2019-02-09  0:08 Miguel Ojeda
  2019-02-09  0:08 ` [PATCH 1/3] lib/crc32.c: mark crc32_le_base/__crc32c_le_base aliases as __pure Miguel Ojeda
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Miguel Ojeda @ 2019-02-09  0:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Miguel Ojeda, Laura Abbott, Arnd Bergmann, Martin Sebor,
	Herbert Xu, Ard Biesheuvel, Krzysztof Kozlowski, Catalin Marinas,
	Nick Desaulniers, Luc Van Oostenryck, Andrey Konovalov,
	Kees Cook, Sean Christopherson, Jessica Yu, Masahiro Yamada,
	James Morris, Mathieu Desnoyers, Borislav Petkov, Matt Mullins,
	Vincent Whitchurch, WANG Chao

The upcoming GCC 9 release extends the -Wmissing-attributes warnings
(enabled by -Wall) to C and aliases: it warns when particular function
attributes are missing in the aliases but not in their target, e.g.:

    void __cold f(void) {}
    void __alias("f") g(void);

diagnoses:

    warning: 'g' specifies less restrictive attribute than
    its target 'f': 'cold' [-Wmissing-attributes]

These patch series clean these new warnings. Most of them are caused
by the module_init/exit macros.

The first patch has been in -next for a long time already, and an alternative
solution (only __cold) for module.h as well. However, since we decided
to go with the new __copy attribute, I will leave the series for a few days
again and send the PR for -rc7.

Link: https://lore.kernel.org/lkml/20190125104353.2791-1-labbott@redhat.com/

Miguel Ojeda (3):
  lib/crc32.c: mark crc32_le_base/__crc32c_le_base aliases as __pure
  Compiler Attributes: add support for __copy (gcc >= 9)
  include/linux/module.h: copy __init/__exit attrs to
    init/cleanup_module

 include/linux/compiler_attributes.h | 14 ++++++++++++++
 include/linux/module.h              |  4 ++--
 lib/crc32.c                         |  4 ++--
 3 files changed, 18 insertions(+), 4 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2019-02-13 17:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-09  0:08 [PATCH 0/3] Clean the new GCC 9 -Wmissing-attributes warnings Miguel Ojeda
2019-02-09  0:08 ` [PATCH 1/3] lib/crc32.c: mark crc32_le_base/__crc32c_le_base aliases as __pure Miguel Ojeda
2019-02-09  0:08 ` [PATCH 2/3] Compiler Attributes: add support for __copy (gcc >= 9) Miguel Ojeda
2019-02-09  0:41   ` Nick Desaulniers
2019-02-09 12:36     ` Miguel Ojeda
2019-02-09  0:08 ` [PATCH 3/3] include/linux/module.h: copy __init/__exit attrs to init/cleanup_module Miguel Ojeda
2019-02-11 15:01   ` Jessica Yu
2019-02-09 10:44 ` [PATCH 0/3] Clean the new GCC 9 -Wmissing-attributes warnings Ard Biesheuvel
2019-02-09 11:19   ` Miguel Ojeda
2019-02-09 11:25     ` Ard Biesheuvel
2019-02-09 12:31       ` Miguel Ojeda
2019-02-11 16:21         ` Martin Sebor
2019-02-11 18:20           ` Ard Biesheuvel
2019-02-09 20:32 ` Laura Abbott
2019-02-13 17:30   ` Miguel Ojeda

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