diff mbox series

[U-Boot,v2,3/5] fdt: boot_get_fdt: simplify no_fdt handling (non-functional)

Message ID 20190401104537.29801-4-erosca@de.adit-jv.com
State Accepted
Delegated to: Simon Glass
Headers show
Series boot_get_fdt: clean up and use 'fdtaddr' as fallback for Android | expand

Commit Message

Eugeniu Rosca April 1, 2019, 10:45 a.m. UTC
Increase the readability of boot_get_fdt().
No change in behavior is expected.

Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
---
Changes in v2:
 - NA
 - Link v1: https://patchwork.ozlabs.org/patch/1071588/
---
 common/image-fdt.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

Simon Glass April 21, 2019, 7:26 p.m. UTC | #1
On Mon, 1 Apr 2019 at 03:47, Eugeniu Rosca <erosca@de.adit-jv.com> wrote:
>
> Increase the readability of boot_get_fdt().
> No change in behavior is expected.
>
> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
> ---
> Changes in v2:
>  - NA
>  - Link v1: https://patchwork.ozlabs.org/patch/1071588/
> ---
>  common/image-fdt.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Simon Glass April 22, 2019, 2:38 a.m. UTC | #2
On Mon, 1 Apr 2019 at 03:47, Eugeniu Rosca <erosca@de.adit-jv.com> wrote:
>
> Increase the readability of boot_get_fdt().
> No change in behavior is expected.
>
> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
> ---
> Changes in v2:
>  - NA
>  - Link v1: https://patchwork.ozlabs.org/patch/1071588/
> ---
>  common/image-fdt.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)

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

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/common/image-fdt.c b/common/image-fdt.c
index c335e7e2f220..68bcab85baf4 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -279,7 +279,6 @@  int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
 	int		fdt_noffset;
 #endif
 	const char *select = NULL;
-	int		ok_no_fdt = 0;
 
 	*of_flat_tree = NULL;
 	*of_size = 0;
@@ -487,12 +486,9 @@  int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
 	return 0;
 
 no_fdt:
-	ok_no_fdt = 1;
+	debug("Continuing to boot without FDT\n");
+	return 0;
 error:
-	if (ok_no_fdt) {
-		debug("Continuing to boot without FDT\n");
-		return 0;
-	}
 	return 1;
 }