Commit 9fa76ca7 authored by Arvind Sankar's avatar Arvind Sankar Committed by Ingo Molnar

efi: Fix efi_loaded_image_t::unload type

The ::unload field is a function pointer, so it should be u32 for 32-bit,
u64 for 64-bit. Add a prototype for it in the native efi_loaded_image_t
type. Also change type of parent_handle and device_handle from void * to
efi_handle_t for documentation purposes.

The unload method is not used, so no functional change.
Signed-off-by: default avatarArvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bhupesh Sharma <bhsharma@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: https://lkml.kernel.org/r/20191206165542.31469-6-ardb@kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent ff397be6
...@@ -824,7 +824,7 @@ typedef struct { ...@@ -824,7 +824,7 @@ typedef struct {
__aligned_u64 image_size; __aligned_u64 image_size;
unsigned int image_code_type; unsigned int image_code_type;
unsigned int image_data_type; unsigned int image_data_type;
unsigned long unload; u32 unload;
} efi_loaded_image_32_t; } efi_loaded_image_32_t;
typedef struct { typedef struct {
...@@ -840,14 +840,14 @@ typedef struct { ...@@ -840,14 +840,14 @@ typedef struct {
__aligned_u64 image_size; __aligned_u64 image_size;
unsigned int image_code_type; unsigned int image_code_type;
unsigned int image_data_type; unsigned int image_data_type;
unsigned long unload; u64 unload;
} efi_loaded_image_64_t; } efi_loaded_image_64_t;
typedef struct { typedef struct {
u32 revision; u32 revision;
void *parent_handle; efi_handle_t parent_handle;
efi_system_table_t *system_table; efi_system_table_t *system_table;
void *device_handle; efi_handle_t device_handle;
void *file_path; void *file_path;
void *reserved; void *reserved;
u32 load_options_size; u32 load_options_size;
...@@ -856,7 +856,7 @@ typedef struct { ...@@ -856,7 +856,7 @@ typedef struct {
__aligned_u64 image_size; __aligned_u64 image_size;
unsigned int image_code_type; unsigned int image_code_type;
unsigned int image_data_type; unsigned int image_data_type;
unsigned long unload; efi_status_t (*unload)(efi_handle_t image_handle);
} efi_loaded_image_t; } efi_loaded_image_t;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment