[PATCH 2/5] efi: capitalize enumeration constants
Ahmad Fatoum
a.fatoum at pengutronix.de
Sun Oct 9 23:08:39 PDT 2022
Linux coding style is using all caps for constants. Follow this for
enum efi_locate_search_type as well. No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/efi/efi-device.c | 10 +++++-----
include/efi.h | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/efi/efi-device.c b/drivers/efi/efi-device.c
index af5406afa682..6b903723524e 100644
--- a/drivers/efi/efi-device.c
+++ b/drivers/efi/efi-device.c
@@ -91,7 +91,7 @@ static efi_handle_t *efi_find_parent(efi_handle_t *handle)
struct efi_open_protocol_information_entry *entry_buffer;
unsigned long entry_count;
- ret = efi_locate_handle(by_protocol, &efi_device_path_protocol_guid,
+ ret = efi_locate_handle(BY_PROTOCOL, &efi_device_path_protocol_guid,
NULL, &handle_count, &handles);
if (ret)
return NULL;
@@ -245,7 +245,7 @@ void efi_register_devices(void)
struct efi_device **efidevs;
int registered;
- ret = efi_locate_handle(by_protocol, &efi_device_path_protocol_guid,
+ ret = efi_locate_handle(BY_PROTOCOL, &efi_device_path_protocol_guid,
NULL, &handle_count, &handles);
if (ret)
return;
@@ -290,7 +290,7 @@ int efi_connect_all(void)
efi_handle_t *handle_buffer;
int i;
- efiret = BS->locate_handle_buffer(all_handles, NULL, NULL, &handle_count,
+ efiret = BS->locate_handle_buffer(ALL_HANDLES, NULL, NULL, &handle_count,
&handle_buffer);
if (EFI_ERROR(efiret))
return -efi_errno(efiret);
@@ -637,7 +637,7 @@ static int do_efi_protocol_dump(int argc, char **argv)
printf("Searching for:\n");
printf(" %pUl: %s\n", &guid, efi_guid_string(&guid));
- ret = efi_locate_handle(by_protocol, &guid, NULL, &handle_count, &handles);
+ ret = efi_locate_handle(BY_PROTOCOL, &guid, NULL, &handle_count, &handles);
if (!ret)
efi_dump(handles, handle_count);
@@ -653,7 +653,7 @@ static int do_efi_handle_dump(int argc, char *argv[])
if (argc > 1)
return do_efi_protocol_dump(--argc, ++argv);
- ret = efi_locate_handle(all_handles, NULL, NULL, &handle_count, &handles);
+ ret = efi_locate_handle(ALL_HANDLES, NULL, NULL, &handle_count, &handles);
if (!ret)
efi_dump(handles, handle_count);
diff --git a/include/efi.h b/include/efi.h
index 691e3d5493fc..864158259c53 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -175,9 +175,9 @@ typedef struct {
} efi_time_cap_t;
enum efi_locate_search_type {
- all_handles,
- by_register_notify,
- by_protocol
+ ALL_HANDLES,
+ BY_REGISTER_NOTIFY,
+ BY_PROTOCOL
};
struct efi_open_protocol_information_entry {
--
2.30.2
More information about the barebox
mailing list