* [U-Boot] [PATCH] fdt: Remove duplicate code
@ 2019-03-01 18:20 Thierry Reding
2019-03-10 21:51 ` Simon Glass
0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2019-03-01 18:20 UTC (permalink / raw)
To: u-boot
From: Thierry Reding <treding@nvidia.com>
Commit 6d29cc7dcf2d ("fdt: Fixup only valid memory banks") ended up
being merged twice, first as:
commit 6d29cc7dcf2d35966aa0b6119fd1cbca0d21d5e6
Author: Thierry Reding <treding@nvidia.com>
AuthorDate: Tue Jan 30 11:34:17 2018 +0100
Commit: Simon Glass <sjg@chromium.org>
CommitDate: Sun Feb 18 12:53:38 2018 -0700
fdt: Fixup only valid memory banks
Memory banks with address 0 and size 0 are empty and should not be
passed to the OS via device tree.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
and later again, though this time it was v2:
commit ed5af03f9bb8905f1e94d68ab49f22d7f061d75f
Author: Thierry Reding <treding@nvidia.com>
AuthorDate: Thu Feb 15 19:05:59 2018 +0100
Commit: Tom Rini <trini@konsulko.com>
CommitDate: Fri Feb 23 10:40:50 2018 -0500
fdt: Fixup only valid memory banks
Memory banks with address 0 and size 0 are empty and should not be
passed to the OS via device tree.
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
The second version was slightly different, so the main hunk of the patch
was applied twice. This isn't harmful because the code is idempotent,
but it's wasteful to run the same code twice.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
common/fdt_support.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 42583e3ed8c8..ab08a0114fee 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -456,12 +456,6 @@ int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks)
if (!banks)
return 0;
- for (i = 0; i < banks; i++)
- if (start[i] == 0 && size[i] == 0)
- break;
-
- banks = i;
-
len = fdt_pack_reg(blob, tmp, start, size, banks);
err = fdt_setprop(blob, nodeoffset, "reg", tmp, len);
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] fdt: Remove duplicate code
2019-03-01 18:20 [U-Boot] [PATCH] fdt: Remove duplicate code Thierry Reding
@ 2019-03-10 21:51 ` Simon Glass
0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2019-03-10 21:51 UTC (permalink / raw)
To: u-boot
On Fri, 1 Mar 2019 at 11:20, Thierry Reding <thierry.reding@gmail.com> wrote:
>
> From: Thierry Reding <treding@nvidia.com>
>
> Commit 6d29cc7dcf2d ("fdt: Fixup only valid memory banks") ended up
> being merged twice, first as:
>
> commit 6d29cc7dcf2d35966aa0b6119fd1cbca0d21d5e6
> Author: Thierry Reding <treding@nvidia.com>
> AuthorDate: Tue Jan 30 11:34:17 2018 +0100
> Commit: Simon Glass <sjg@chromium.org>
> CommitDate: Sun Feb 18 12:53:38 2018 -0700
>
> fdt: Fixup only valid memory banks
>
> Memory banks with address 0 and size 0 are empty and should not be
> passed to the OS via device tree.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> Acked-by: Stephen Warren <swarren@nvidia.com>
>
> and later again, though this time it was v2:
>
> commit ed5af03f9bb8905f1e94d68ab49f22d7f061d75f
> Author: Thierry Reding <treding@nvidia.com>
> AuthorDate: Thu Feb 15 19:05:59 2018 +0100
> Commit: Tom Rini <trini@konsulko.com>
> CommitDate: Fri Feb 23 10:40:50 2018 -0500
>
> fdt: Fixup only valid memory banks
>
> Memory banks with address 0 and size 0 are empty and should not be
> passed to the OS via device tree.
>
> Acked-by: Stephen Warren <swarren@nvidia.com>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
>
> The second version was slightly different, so the main hunk of the patch
> was applied twice. This isn't harmful because the code is idempotent,
> but it's wasteful to run the same code twice.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> common/fdt_support.c | 6 ------
> 1 file changed, 6 deletions(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-10 21:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-01 18:20 [U-Boot] [PATCH] fdt: Remove duplicate code Thierry Reding
2019-03-10 21:51 ` Simon Glass
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.