Skip to content

Commit

Permalink
efi: Fix efi_loaded_image_t::unload type
Browse files Browse the repository at this point in the history
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: Arvind Sankar <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Bhupesh Sharma <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Masayoshi Mizuma <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
nivedita76 authored and Ingo Molnar committed Dec 8, 2019
1 parent ff397be commit 9fa76ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/linux/efi.h
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ typedef struct {
__aligned_u64 image_size;
unsigned int image_code_type;
unsigned int image_data_type;
unsigned long unload;
u32 unload;
} efi_loaded_image_32_t;

typedef struct {
Expand All @@ -840,14 +840,14 @@ typedef struct {
__aligned_u64 image_size;
unsigned int image_code_type;
unsigned int image_data_type;
unsigned long unload;
u64 unload;
} efi_loaded_image_64_t;

typedef struct {
u32 revision;
void *parent_handle;
efi_handle_t parent_handle;
efi_system_table_t *system_table;
void *device_handle;
efi_handle_t device_handle;
void *file_path;
void *reserved;
u32 load_options_size;
Expand All @@ -856,7 +856,7 @@ typedef struct {
__aligned_u64 image_size;
unsigned int image_code_type;
unsigned int image_data_type;
unsigned long unload;
efi_status_t (*unload)(efi_handle_t image_handle);
} efi_loaded_image_t;


Expand Down

0 comments on commit 9fa76ca

Please sign in to comment.