From: Heinrich Schuchardt Date: Tue, 25 Sep 2018 14:00:39 +0200 Subject: [U-Boot] [PATCH v2 1/2] efi_loader: typedef struct efi_object *efi_handle_t In-Reply-To: <6624e86def779291@bloch.sibelius.xs4all.nl> References: <20180925101918.2524-1-xypron.glpk@gmx.de> <20180925101918.2524-2-xypron.glpk@gmx.de> <6624e86def779291@bloch.sibelius.xs4all.nl> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/25/2018 01:15 PM, Mark Kettenis wrote: >> From: Heinrich Schuchardt >> Date: Tue, 25 Sep 2018 12:19:17 +0200 >> >> All our handles point to a struct efi_object. So let's define the >> efi_handle_t accordingly. This helps us to discover coding errors much >> more easily. This becomes evident by the corrections to the usage of >> handles in this patch. >> >> Signed-off-by: Heinrich Schuchardt >> --- >> v2 >> no change >> --- >> cmd/bootefi.c | 4 ++-- >> include/efi.h | 2 +- >> include/efi_api.h | 8 ++++---- >> lib/efi/efi.c | 2 +- >> lib/efi_loader/efi_boottime.c | 18 +++++++++--------- >> lib/efi_selftest/efi_selftest_devicepath.c | 2 +- >> 6 files changed, 18 insertions(+), 18 deletions(-) >> >> diff --git a/cmd/bootefi.c b/cmd/bootefi.c >> index 9c51a2cbd1..05eb168e4a 100644 >> --- a/cmd/bootefi.c >> +++ b/cmd/bootefi.c >> @@ -447,7 +447,7 @@ static efi_status_t do_bootefi_exec(void *efi, >> } >> #endif >> >> - ret = efi_do_enter(image_handle, &systab, entry); >> + ret = efi_do_enter(&image_handle->parent, &systab, entry); > This bit makes absolutely no sense to me :(. What about the other > efi_do_enter() calls? And why is the variable called image_handle if > it isn't a handle? > >> Thanks for pointing to this misnomer. We should rename image_handle to image_obj in this function. And we should be consistent about how we pass the address. Regards Heinrich