Commit e275458c2f011a7e66ac01e6558f15f4cf4972f9
Committed by
Alexander Graf
1 parent
a0b49bc334
Exists in
v2017.01-smarct4x
and in
25 other branches
efi: Fix missing EFIAPI specifiers
These are missing in some functions. Add them to keep things consistent. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Showing 5 changed files with 18 additions and 13 deletions Side-by-side Diff
cmd/bootefi.c
... | ... | @@ -15,6 +15,8 @@ |
15 | 15 | #include <libfdt_env.h> |
16 | 16 | #include <memalign.h> |
17 | 17 | #include <asm/global_data.h> |
18 | +#include <asm-generic/sections.h> | |
19 | +#include <linux/linkage.h> | |
18 | 20 | |
19 | 21 | DECLARE_GLOBAL_DATA_PTR; |
20 | 22 | |
... | ... | @@ -52,7 +54,7 @@ |
52 | 54 | } |
53 | 55 | }; |
54 | 56 | |
55 | -static efi_status_t bootefi_open_dp(void *handle, efi_guid_t *protocol, | |
57 | +static efi_status_t EFIAPI bootefi_open_dp(void *handle, efi_guid_t *protocol, | |
56 | 58 | void **protocol_interface, void *agent_handle, |
57 | 59 | void *controller_handle, uint32_t attributes) |
58 | 60 | { |
... | ... | @@ -145,7 +147,8 @@ |
145 | 147 | */ |
146 | 148 | static unsigned long do_bootefi_exec(void *efi, void *fdt) |
147 | 149 | { |
148 | - ulong (*entry)(void *image_handle, struct efi_system_table *st); | |
150 | + ulong (*entry)(void *image_handle, struct efi_system_table *st) | |
151 | + asmlinkage; | |
149 | 152 | ulong fdt_pages, fdt_size, fdt_start, fdt_end; |
150 | 153 | bootm_headers_t img = { 0 }; |
151 | 154 |
include/efi_loader.h
... | ... | @@ -95,7 +95,7 @@ |
95 | 95 | * Stub implementation for a protocol opener that just returns the handle as |
96 | 96 | * interface |
97 | 97 | */ |
98 | -efi_status_t efi_return_handle(void *handle, | |
98 | +efi_status_t EFIAPI efi_return_handle(void *handle, | |
99 | 99 | efi_guid_t *protocol, void **protocol_interface, |
100 | 100 | void *agent_handle, void *controller_handle, |
101 | 101 | uint32_t attributes); |
lib/efi_loader/efi_boottime.c
... | ... | @@ -160,7 +160,7 @@ |
160 | 160 | u32 trigger_time; |
161 | 161 | u64 trigger_next; |
162 | 162 | unsigned long notify_tpl; |
163 | - void (*notify_function) (void *event, void *context); | |
163 | + void (EFIAPI *notify_function) (void *event, void *context); | |
164 | 164 | void *notify_context; |
165 | 165 | } efi_event = { |
166 | 166 | /* Disable timers on bootup */ |
... | ... | @@ -169,7 +169,8 @@ |
169 | 169 | |
170 | 170 | static efi_status_t EFIAPI efi_create_event( |
171 | 171 | enum efi_event_type type, ulong notify_tpl, |
172 | - void (*notify_function) (void *event, void *context), | |
172 | + void (EFIAPI *notify_function) (void *event, | |
173 | + void *context), | |
173 | 174 | void *notify_context, void **event) |
174 | 175 | { |
175 | 176 | EFI_ENTRY("%d, 0x%lx, %p, %p", type, notify_tpl, notify_function, |
lib/efi_loader/efi_disk.c
... | ... | @@ -35,9 +35,10 @@ |
35 | 35 | const struct blk_desc *desc; |
36 | 36 | }; |
37 | 37 | |
38 | -static efi_status_t efi_disk_open_block(void *handle, efi_guid_t *protocol, | |
39 | - void **protocol_interface, void *agent_handle, | |
40 | - void *controller_handle, uint32_t attributes) | |
38 | +static efi_status_t EFIAPI efi_disk_open_block(void *handle, | |
39 | + efi_guid_t *protocol, void **protocol_interface, | |
40 | + void *agent_handle, void *controller_handle, | |
41 | + uint32_t attributes) | |
41 | 42 | { |
42 | 43 | struct efi_disk_obj *diskobj = handle; |
43 | 44 | |
... | ... | @@ -46,7 +47,7 @@ |
46 | 47 | return EFI_SUCCESS; |
47 | 48 | } |
48 | 49 | |
49 | -static efi_status_t efi_disk_open_dp(void *handle, efi_guid_t *protocol, | |
50 | +static efi_status_t EFIAPI efi_disk_open_dp(void *handle, efi_guid_t *protocol, | |
50 | 51 | void **protocol_interface, void *agent_handle, |
51 | 52 | void *controller_handle, uint32_t attributes) |
52 | 53 | { |
... | ... | @@ -108,7 +109,7 @@ |
108 | 109 | return EFI_EXIT(EFI_SUCCESS); |
109 | 110 | } |
110 | 111 | |
111 | -static efi_status_t efi_disk_read_blocks(struct efi_block_io *this, | |
112 | +static efi_status_t EFIAPI efi_disk_read_blocks(struct efi_block_io *this, | |
112 | 113 | u32 media_id, u64 lba, unsigned long buffer_size, |
113 | 114 | void *buffer) |
114 | 115 | { |
... | ... | @@ -143,7 +144,7 @@ |
143 | 144 | return EFI_EXIT(r); |
144 | 145 | } |
145 | 146 | |
146 | -static efi_status_t efi_disk_write_blocks(struct efi_block_io *this, | |
147 | +static efi_status_t EFIAPI efi_disk_write_blocks(struct efi_block_io *this, | |
147 | 148 | u32 media_id, u64 lba, unsigned long buffer_size, |
148 | 149 | void *buffer) |
149 | 150 | { |
lib/efi_loader/efi_net.c
... | ... | @@ -198,7 +198,7 @@ |
198 | 198 | return EFI_EXIT(EFI_SUCCESS); |
199 | 199 | } |
200 | 200 | |
201 | -static efi_status_t efi_net_open_dp(void *handle, efi_guid_t *protocol, | |
201 | +static efi_status_t EFIAPI efi_net_open_dp(void *handle, efi_guid_t *protocol, | |
202 | 202 | void **protocol_interface, void *agent_handle, |
203 | 203 | void *controller_handle, uint32_t attributes) |
204 | 204 | { |
... | ... | @@ -210,7 +210,7 @@ |
210 | 210 | return EFI_SUCCESS; |
211 | 211 | } |
212 | 212 | |
213 | -static efi_status_t efi_net_open_pxe(void *handle, efi_guid_t *protocol, | |
213 | +static efi_status_t EFIAPI efi_net_open_pxe(void *handle, efi_guid_t *protocol, | |
214 | 214 | void **protocol_interface, void *agent_handle, |
215 | 215 | void *controller_handle, uint32_t attributes) |
216 | 216 | { |