]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: add missing const classifier for event service
authorMasahisa Kojima <masahisa.kojima@linaro.org>
Fri, 10 Nov 2023 04:25:38 +0000 (13:25 +0900)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Sat, 18 Nov 2023 08:08:09 +0000 (10:08 +0200)
const classifier is missing in EventGroup parameter of
CreateEventEx(). Fix it to remove the compiler warning.

NotifyContext parameter of CreateEventEx() is also defined
with const in UEFI specification, but NotifyContext parameter
of CreateEvent() is defined without const.
Since current implementation calls the common efi_create_event()
function from both CreateEventEx() and CreateEvent() services,
NotifyContext parameter leaves as is.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
include/efi_api.h
include/efi_loader.h
lib/efi_loader/efi_boottime.c

index 8f5ef5f680f302b0396ce65f013191e0b7535b01..c2d69644679c27c72018442b3a6f1c514d5c8966 100644 (file)
@@ -192,7 +192,7 @@ struct efi_boot_services {
                                        struct efi_event *event,
                                        void *context),
                                void *notify_context,
-                               efi_guid_t *event_group,
+                               const efi_guid_t *event_group,
                                struct efi_event **event);
 };
 
index 247be060e1c028b102b84fb2341d826a7b56fe09..1fd7b0b73c9541b337382bf324d0488640526410 100644 (file)
@@ -684,7 +684,7 @@ efi_status_t efi_create_event(uint32_t type, efi_uintn_t notify_tpl,
                              void (EFIAPI *notify_function) (
                                        struct efi_event *event,
                                        void *context),
-                             void *notify_context, efi_guid_t *group,
+                             void *notify_context, const efi_guid_t *group,
                              struct efi_event **event);
 /* Call this to set a timer */
 efi_status_t efi_set_timer(struct efi_event *event, enum efi_timer_delay type,
index 0b7579cb5af1698f648ada6aee2cd26823198531..f9b10a9763b849502d15d4ac53bdf5a71782c846 100644 (file)
@@ -712,7 +712,7 @@ efi_status_t efi_create_event(uint32_t type, efi_uintn_t notify_tpl,
                              void (EFIAPI *notify_function) (
                                        struct efi_event *event,
                                        void *context),
-                             void *notify_context, efi_guid_t *group,
+                             void *notify_context, const efi_guid_t *group,
                              struct efi_event **event)
 {
        struct efi_event *evt;
@@ -790,7 +790,7 @@ efi_status_t EFIAPI efi_create_event_ex(uint32_t type, efi_uintn_t notify_tpl,
                                                        struct efi_event *event,
                                                        void *context),
                                        void *notify_context,
-                                       efi_guid_t *event_group,
+                                       const efi_guid_t *event_group,
                                        struct efi_event **event)
 {
        efi_status_t ret;