From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Subject: [PATCH 5/5] efi: silence warning about un-prototyped assembly-called functions
Date: Wed, 16 Oct 2019 09:21:39 +0200 [thread overview]
Message-ID: <20191016072139.2323-5-ahmad@a3f.at> (raw)
In-Reply-To: <20191016072139.2323-1-ahmad@a3f.at>
Both _relocate and efi_main are only called from assembly, but
-Wmissing-prototypes doesn't know that and warns about them.
Pre-declare prototypes to silence the warnings.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
arch/x86/mach-efi/reloc_x86_64.c | 3 +++
common/efi/efi.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/arch/x86/mach-efi/reloc_x86_64.c b/arch/x86/mach-efi/reloc_x86_64.c
index 1db72f5dbc52..e83bacb302ca 100644
--- a/arch/x86/mach-efi/reloc_x86_64.c
+++ b/arch/x86/mach-efi/reloc_x86_64.c
@@ -35,11 +35,14 @@
SUCH DAMAGE.
*/
+#include <linux/linkage.h>
#include <common.h>
#include <efi.h>
#include <elf.h>
+asmlinkage efi_status_t _relocate (long, Elf64_Dyn *, efi_handle_t, efi_system_table_t *);
+
efi_status_t _relocate (long ldbase, Elf64_Dyn *dyn, efi_handle_t image, efi_system_table_t *systab)
{
long relsz = 0, relent = 0;
diff --git a/common/efi/efi.c b/common/efi/efi.c
index a7b25cbbe251..73cea3703695 100644
--- a/common/efi/efi.c
+++ b/common/efi/efi.c
@@ -17,6 +17,7 @@
*
*/
+#include <linux/linkage.h>
#include <common.h>
#include <linux/sizes.h>
#include <memory.h>
@@ -318,6 +319,8 @@ static int efi_init(void)
}
device_initcall(efi_init);
+asmlinkage efi_status_t efi_main(efi_handle_t, efi_system_table_t *);
+
/**
* efi-main - Entry point for EFI images
*/
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-10-16 7:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 7:21 [PATCH 1/5] efi: Fix typo in description string Ahmad Fatoum
2019-10-16 7:21 ` [PATCH 2/5] efi: retire efi_compare_guid in favor of efi_guidcmp Ahmad Fatoum
2019-10-16 7:21 ` [PATCH 3/5] efi: use efi_guidcmp helper where appropriate Ahmad Fatoum
2019-10-16 7:21 ` [PATCH 4/5] x86: include: add asmlinkage 'storage class' Ahmad Fatoum
2019-10-16 7:21 ` Ahmad Fatoum [this message]
2019-10-18 11:56 ` [PATCH 1/5] efi: Fix typo in description string Sascha Hauer
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=20191016072139.2323-5-ahmad@a3f.at \
--to=ahmad@a3f.at \
--cc=barebox@lists.infradead.org \
/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