diff mbox series

[U-Boot,v2,04/17] efi_loader: wrong type in wait_for_event

Message ID 20171005143607.25955-5-xypron.glpk@gmx.de
State Accepted
Delegated to: Alexander Graf
Headers show
Series efi_loader: Simple Network Protocol | expand

Commit Message

Heinrich Schuchardt Oct. 5, 2017, 2:35 p.m. UTC
The UEFI spec defines parameter index of WaitForEvent as UINTN*.
So we should use size_t here.

I deliberately do not use UINTN because I hold a following patch
that will eliminate UINTN because uppercase types to not match
the U-Boot coding style.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
v2
	no change
---
 include/efi_api.h                      | 2 +-
 lib/efi_loader/efi_boottime.c          | 2 +-
 lib/efi_selftest/efi_selftest_events.c | 2 +-
 lib/efi_selftest/efi_selftest_tpl.c    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

Comments

Simon Glass Oct. 9, 2017, 4:43 a.m. UTC | #1
On 5 October 2017 at 08:35, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> The UEFI spec defines parameter index of WaitForEvent as UINTN*.
> So we should use size_t here.
>
> I deliberately do not use UINTN because I hold a following patch
> that will eliminate UINTN because uppercase types to not match
> the U-Boot coding style.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> v2
>         no change
> ---
>  include/efi_api.h                      | 2 +-
>  lib/efi_loader/efi_boottime.c          | 2 +-
>  lib/efi_selftest/efi_selftest_events.c | 2 +-
>  lib/efi_selftest/efi_selftest_tpl.c    | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/include/efi_api.h b/include/efi_api.h
index aa4306aac9..c44dc9d0cb 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -71,7 +71,7 @@  struct efi_boot_services {
 					 enum efi_timer_delay type,
 					 uint64_t trigger_time);
 	efi_status_t (EFIAPI *wait_for_event)(unsigned long number_of_events,
-			struct efi_event **event, unsigned long *index);
+			struct efi_event **event, size_t *index);
 	efi_status_t (EFIAPI *signal_event)(struct efi_event *event);
 	efi_status_t (EFIAPI *close_event)(struct efi_event *event);
 	efi_status_t (EFIAPI *check_event)(struct efi_event *event);
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index e5adc17fab..976d5822f7 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -553,7 +553,7 @@  static efi_status_t EFIAPI efi_set_timer_ext(struct efi_event *event,
  */
 static efi_status_t EFIAPI efi_wait_for_event(unsigned long num_events,
 					      struct efi_event **event,
-					      unsigned long *index)
+					      size_t *index)
 {
 	int i, j;
 
diff --git a/lib/efi_selftest/efi_selftest_events.c b/lib/efi_selftest/efi_selftest_events.c
index 532f165d43..b2cdc150da 100644
--- a/lib/efi_selftest/efi_selftest_events.c
+++ b/lib/efi_selftest/efi_selftest_events.c
@@ -108,7 +108,7 @@  static int teardown(void)
  */
 static int execute(void)
 {
-	unsigned long index;
+	size_t index;
 	efi_status_t ret;
 
 	/* Set 10 ms timer */
diff --git a/lib/efi_selftest/efi_selftest_tpl.c b/lib/efi_selftest/efi_selftest_tpl.c
index 5d13f3b52d..0b78ee7595 100644
--- a/lib/efi_selftest/efi_selftest_tpl.c
+++ b/lib/efi_selftest/efi_selftest_tpl.c
@@ -110,7 +110,7 @@  static int teardown(void)
  */
 static int execute(void)
 {
-	unsigned long index;
+	size_t index;
 	efi_status_t ret;
 	UINTN old_tpl;