summaryrefslogtreecommitdiff
path: root/lib/efi_selftest/efi_selftest_events.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-10-06 07:28:19 +0200
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-10-06 22:54:58 +0200
commit564e55c7f4a335abb766c921eb2ae1e05ce1253c (patch)
treee09b104237165f7e32c246b9898d00f945cf48ee /lib/efi_selftest/efi_selftest_events.c
parent8f8fe1d458664aaa15fa82de78dfdb0eca74b2ca (diff)
efi_selftest: rename event_notify
A function event_notify() exists. We should not use the same name for and EFI event. Rename events in unit tests. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib/efi_selftest/efi_selftest_events.c')
-rw-r--r--lib/efi_selftest/efi_selftest_events.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/efi_selftest/efi_selftest_events.c b/lib/efi_selftest/efi_selftest_events.c
index 90071536a27..743a6b9154f 100644
--- a/lib/efi_selftest/efi_selftest_events.c
+++ b/lib/efi_selftest/efi_selftest_events.c
@@ -11,7 +11,7 @@
#include <efi_selftest.h>
-static struct efi_event *event_notify;
+static struct efi_event *efi_st_event_notify;
static struct efi_event *event_wait;
static unsigned int timer_ticks;
static struct efi_boot_services *boottime;
@@ -50,7 +50,7 @@ static int setup(const efi_handle_t handle,
ret = boottime->create_event(EVT_TIMER | EVT_NOTIFY_SIGNAL,
TPL_CALLBACK, notify, (void *)&timer_ticks,
- &event_notify);
+ &efi_st_event_notify);
if (ret != EFI_SUCCESS) {
efi_st_error("could not create event\n");
return EFI_ST_FAILURE;
@@ -75,9 +75,9 @@ static int teardown(void)
{
efi_status_t ret;
- if (event_notify) {
- ret = boottime->close_event(event_notify);
- event_notify = NULL;
+ if (efi_st_event_notify) {
+ ret = boottime->close_event(efi_st_event_notify);
+ efi_st_event_notify = NULL;
if (ret != EFI_SUCCESS) {
efi_st_error("could not close event\n");
return EFI_ST_FAILURE;
@@ -112,7 +112,8 @@ static int execute(void)
/* Set 10 ms timer */
timer_ticks = 0;
- ret = boottime->set_timer(event_notify, EFI_TIMER_PERIODIC, 100000);
+ ret = boottime->set_timer(efi_st_event_notify, EFI_TIMER_PERIODIC,
+ 100000);
if (ret != EFI_SUCCESS) {
efi_st_error("Could not set timer\n");
return EFI_ST_FAILURE;
@@ -146,14 +147,15 @@ static int execute(void)
efi_st_error("Incorrect timing of events\n");
return EFI_ST_FAILURE;
}
- ret = boottime->set_timer(event_notify, EFI_TIMER_STOP, 0);
+ ret = boottime->set_timer(efi_st_event_notify, EFI_TIMER_STOP, 0);
if (ret != EFI_SUCCESS) {
efi_st_error("Could not cancel timer\n");
return EFI_ST_FAILURE;
}
/* Set 10 ms timer */
timer_ticks = 0;
- ret = boottime->set_timer(event_notify, EFI_TIMER_RELATIVE, 100000);
+ ret = boottime->set_timer(efi_st_event_notify, EFI_TIMER_RELATIVE,
+ 100000);
if (ret != EFI_SUCCESS) {
efi_st_error("Could not set timer\n");
return EFI_ST_FAILURE;