[U-Boot] [PATCH 15/16] efi_selftest: test for (Dis)ConnectController

Simon Glass sjg at chromium.org
Mon Jan 8 03:37:24 UTC 2018


On 17 December 2017 at 08:43, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> This unit test checks the following protocol services:
> ConnectController, DisconnectController,
> InstallProtocol, UninstallProtocol,
> OpenProtocol, CloseProtcol, OpenProtocolInformation
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  lib/efi_selftest/Makefile                   |   1 +
>  lib/efi_selftest/efi_selftest_controllers.c | 385 ++++++++++++++++++++++++++++
>  2 files changed, 386 insertions(+)
>  create mode 100644 lib/efi_selftest/efi_selftest_controllers.c

Reviewed-by: Simon Glass <sjg at chromium.org>

Again I think some identifiers should be shorter.

The EFI_SUCCESS thing shows up again, i.e. instead of

return 0;
if (ret)

we do:

return EFI_SUCCESS;
if (ret != EFI_SUCCESS)

which to me is an obfuscation. The error code indicates an error, and
is 0 if there is no error, which is the normal case. This is how
U-Boot works in general and I would prefer that the EFI code followed
that.

Regards,
Simon


More information about the U-Boot mailing list