summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-03-04 19:59:51 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-03-05 16:28:06 +0100
commit069bf5f7dd0f5cf7287700a12afed098a7901535 (patch)
tree9bdef722dc0ebc9892680d65ace4e5cb5410c21a
parent5e418b7cf5553ef8a37722a852ea3cd85a5d819c (diff)
downloadbarebox-069bf5f7dd0f.tar.gz
barebox-069bf5f7dd0f.tar.xz
efi: use efi_handle_t where appropriate
efi_handle_t is a typedef for a void pointer. We use either void * directly or unsigned long at places, where a handle would be the more descriptive type. Fix this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240304190038.3486881-67-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/serial/efi-stdio.c2
-rw-r--r--include/efi.h10
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/serial/efi-stdio.c b/drivers/serial/efi-stdio.c
index b3b696d8fb..a0994168f0 100644
--- a/drivers/serial/efi-stdio.c
+++ b/drivers/serial/efi-stdio.c
@@ -430,7 +430,7 @@ static int efi_console_probe(struct device *dev)
if (!priv->inputbuffer)
return -ENOMEM;
- efiret = BS->open_protocol((void *)efi_sys_table->con_in_handle,
+ efiret = BS->open_protocol(efi_sys_table->con_in_handle,
&inex_guid,
(void **)&inex,
efi_parent_image,
diff --git a/include/efi.h b/include/efi.h
index ec4c2a522d..18583bf625 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -601,11 +601,11 @@ struct efi_system_table {
struct efi_table_hdr hdr;
unsigned long fw_vendor; /* physical addr of CHAR16 vendor string */
u32 fw_revision;
- unsigned long con_in_handle;
+ efi_handle_t con_in_handle;
struct efi_simple_input_interface *con_in;
- unsigned long con_out_handle;
+ efi_handle_t con_out_handle;
struct efi_simple_text_output_protocol *con_out;
- unsigned long stderr_handle;
+ efi_handle_t stderr_handle;
unsigned long std_err;
struct efi_runtime_services *runtime;
struct efi_boot_services *boottime;
@@ -615,9 +615,9 @@ struct efi_system_table {
struct efi_loaded_image {
u32 revision;
- void *parent_handle;
+ efi_handle_t parent_handle;
struct efi_system_table *system_table;
- void *device_handle;
+ efi_handle_t device_handle;
void *file_path;
void *reserved;
u32 load_options_size;