From: Arnd Bergmann <arnd@arndb.de>
To: Ard Biesheuvel <ardb@kernel.org>, Ingo Molnar <mingo@kernel.org>,
Jerry Snitselaar <jsnitsel@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Ben Dooks <ben.dooks@codethink.co.uk>,
Dave Young <dyoung@redhat.com>,
Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
Lukas Wunner <lukas@wunner.de>, Lyude Paul <lyude@redhat.com>,
Matthew Garrett <mjg59@google.com>,
Octavian Purdila <octavian.purdila@intel.com>,
Peter Jones <pjones@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Scott Talbert <swt@techie.net>,
Thomas Gleixner <tglx@linutronix.de>,
linux-efi@vger.kernel.org, linux-integrity@vger.kernel.org,
stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] efi/tpm: fix section mismatch warning
Date: Wed, 29 Apr 2020 21:01:08 +0200 [thread overview]
Message-ID: <20200429190119.43595-1-arnd@arndb.de> (raw)
Building with gcc-10 causes a harmless warning about a section mismatch:
WARNING: modpost: vmlinux.o(.text.unlikely+0x5e191): Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap()
The function tpm2_calc_event_log_size() references
the function __init early_memunmap().
This is often because tpm2_calc_event_log_size lacks a __init
annotation or the annotation of early_memunmap is wrong.
Add the missing annotation.
Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/firmware/efi/tpm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.26.0
next reply other threads:[~2020-04-29 19:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 19:01 Arnd Bergmann [this message]
2020-04-29 19:15 ` [PATCH] efi/tpm: fix section mismatch warning Jason Gunthorpe
2020-04-29 19:15 ` Ard Biesheuvel
2020-04-30 4:00 ` Jarkko Sakkinen
2020-04-30 21:15 ` Jerry Snitselaar
2020-04-30 21:21 ` Arnd Bergmann
2020-04-30 21:25 ` Ard Biesheuvel
2020-04-30 21:32 ` Jerry Snitselaar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200429190119.43595-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=ard.biesheuvel@linaro.org \
--cc=ardb@kernel.org \
--cc=ben.dooks@codethink.co.uk \
--cc=dyoung@redhat.com \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=jsnitsel@redhat.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=lyude@redhat.com \
--cc=mingo@kernel.org \
--cc=mjg59@google.com \
--cc=octavian.purdila@intel.com \
--cc=peterz@infradead.org \
--cc=pjones@redhat.com \
--cc=stable@vger.kernel.org \
--cc=swt@techie.net \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).