diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-05-09 17:50:03 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-20 08:20:29 +0200 |
| commit | 6cbb91bdd3a28e13ae6034ebd400b56201fd42f5 (patch) | |
| tree | 62d543b78ba1413c0f52a696d60cafd9a32ef1c6 /drivers/firmware | |
| parent | 7955081a3a6520ec08d309b8f401f581542e08c5 (diff) | |
| download | linux-6cbb91bdd3a28e13ae6034ebd400b56201fd42f5.tar.gz linux-6cbb91bdd3a28e13ae6034ebd400b56201fd42f5.tar.bz2 linux-6cbb91bdd3a28e13ae6034ebd400b56201fd42f5.zip | |
gcc-10: mark more functions __init to avoid section mismatch warnings
commit e99332e7b4cda6e60f5b5916cf9943a79dbef902 upstream.
It seems that for whatever reason, gcc-10 ends up not inlining a couple
of functions that used to be inlined before. Even if they only have one
single callsite - it looks like gcc may have decided that the code was
unlikely, and not worth inlining.
The code generation difference is harmless, but caused a few new section
mismatch errors, since the (now no longer inlined) function wasn't in
the __init section, but called other init functions:
Section mismatch in reference from the function kexec_free_initrd() to the function .init.text:free_initrd_mem()
Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memremap()
Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap()
So add the appropriate __init annotation to make modpost not complain.
In both cases there were trivially just a single callsite from another
__init function.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/firmware')
| -rw-r--r-- | drivers/firmware/efi/tpm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c index 31f9f0e369b9..55b031d2c989 100644 --- a/drivers/firmware/efi/tpm.c +++ b/drivers/firmware/efi/tpm.c @@ -16,7 +16,7 @@ int efi_tpm_final_log_size; EXPORT_SYMBOL(efi_tpm_final_log_size); -static int tpm2_calc_event_log_size(void *data, int count, void *size_info) +static int __init tpm2_calc_event_log_size(void *data, int count, void *size_info) { struct tcg_pcr_event2_head *header; int event_size, size = 0; |
