dm: pci: change bus number register setting compliant with Linux
[oweals/u-boot.git] / lib / efi_selftest / efi_selftest.c
index ff00254c21936f113975c052b670bb694cd69108..45d8d3d384c1814ea7e5fdff88c8994b51e3f9e7 100644 (file)
@@ -66,16 +66,17 @@ void efi_st_exit_boot_services(void)
  *
  * @test       the test to be executed
  * @failures   counter that will be incremented if a failure occurs
+ * @return     EFI_ST_SUCCESS for success
  */
 static int setup(struct efi_unit_test *test, unsigned int *failures)
 {
        int ret;
 
        if (!test->setup)
-               return 0;
+               return EFI_ST_SUCCESS;
        efi_st_printf("\nSetting up '%s'\n", test->name);
        ret = test->setup(handle, systable);
-       if (ret) {
+       if (ret != EFI_ST_SUCCESS) {
                efi_st_error("Setting up '%s' failed\n", test->name);
                ++*failures;
        } else {
@@ -89,16 +90,17 @@ static int setup(struct efi_unit_test *test, unsigned int *failures)
  *
  * @test       the test to be executed
  * @failures   counter that will be incremented if a failure occurs
+ * @return     EFI_ST_SUCCESS for success
  */
 static int execute(struct efi_unit_test *test, unsigned int *failures)
 {
        int ret;
 
        if (!test->execute)
-               return 0;
+               return EFI_ST_SUCCESS;
        efi_st_printf("\nExecuting '%s'\n", test->name);
        ret = test->execute();
-       if (ret) {
+       if (ret != EFI_ST_SUCCESS) {
                efi_st_error("Executing '%s' failed\n", test->name);
                ++*failures;
        } else {
@@ -112,16 +114,17 @@ static int execute(struct efi_unit_test *test, unsigned int *failures)
  *
  * @test       the test to be torn down
  * @failures   counter that will be incremented if a failure occurs
+ * @return     EFI_ST_SUCCESS for success
  */
 static int teardown(struct efi_unit_test *test, unsigned int *failures)
 {
        int ret;
 
        if (!test->teardown)
-               return 0;
+               return EFI_ST_SUCCESS;
        efi_st_printf("\nTearing down '%s'\n", test->name);
        ret = test->teardown();
-       if (ret) {
+       if (ret != EFI_ST_SUCCESS) {
                efi_st_error("Tearing down '%s' failed\n", test->name);
                ++*failures;
        } else {