From: Thierry Reding
The fdtdec_set_carveout() function's parameters are inconsistent with
the parameters passed to fdtdec_add_reserved_memory(). Fix up the order
to make it more consistent.
Signed-off-by: Thierry Reding
---
board/nvidia/p2371-2180/p2371-2180.c | 4 ++--
board/nvidia/p2771-/p2771-.c | 4 ++--
board/nvidia/p3450-/p3450-.c | 4 ++--
include/fdtdec.h | 8
lib/fdtdec.c | 6 +++---
lib/fdtdec_test.c| 4 ++--
test/dm/fdtdec.c | 15 ++-
7 files changed, 21 insertions(+), 24 deletions(-)
diff --git a/board/nvidia/p2371-2180/p2371-2180.c
b/board/nvidia/p2371-2180/p2371-2180.c
index 58077255d073..bc0a133725ed 100644
--- a/board/nvidia/p2371-2180/p2371-2180.c
+++ b/board/nvidia/p2371-2180/p2371-2180.c
@@ -138,8 +138,8 @@ static int ft_copy_carveout(void *dst, const void *src,
const char *node)
return err;
}
- err = fdtdec_set_carveout(dst, node, "memory-region", 0, "framebuffer",
- NULL, 0, );
+ err = fdtdec_set_carveout(dst, node, "memory-region", 0, ,
+ "framebuffer", NULL, 0);
if (err < 0) {
printf("failed to set carveout for %s: %d\n", node, err);
return err;
diff --git a/board/nvidia/p2771-/p2771-.c
b/board/nvidia/p2771-/p2771-.c
index e35e6b6f48dc..cde5eff02f2a 100644
--- a/board/nvidia/p2771-/p2771-.c
+++ b/board/nvidia/p2771-/p2771-.c
@@ -114,8 +114,8 @@ static int ft_copy_carveout(void *dst, const void *src,
const char *node)
return err;
}
- err = fdtdec_set_carveout(dst, node, "memory-region", 0, "framebuffer",
- NULL, 0, );
+ err = fdtdec_set_carveout(dst, node, "memory-region", 0, ,
+ "framebuffer", NULL, 0);
if (err < 0) {
printf("failed to set carveout for %s: %d\n", node, err);
return err;
diff --git a/board/nvidia/p3450-/p3450-.c
b/board/nvidia/p3450-/p3450-.c
index d9ef45af5eea..541863cef361 100644
--- a/board/nvidia/p3450-/p3450-.c
+++ b/board/nvidia/p3450-/p3450-.c
@@ -138,8 +138,8 @@ static int ft_copy_carveout(void *dst, const void *src,
const char *node)
return err;
}
- err = fdtdec_set_carveout(dst, node, "memory-region", 0, "framebuffer",
- NULL, 0, );
+ err = fdtdec_set_carveout(dst, node, "memory-region", 0, ,
+ "framebuffer", NULL, 0);
if (err < 0) {
printf("failed to set carveout for %s: %d\n", node, err);
return err;
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 489f5063763b..6d56c67d111c 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -1143,16 +1143,16 @@ int fdtdec_get_carveout(const void *blob, const char
*node,
* @param prop_namename of the property in which to store the phandle of
* the carveout
* @param indexindex of the phandle to store
- * @param name base name of the reserved-memory node to create
* @param carveout information about the carveout to add
+ * @param name base name of the reserved-memory node to create
* @param compatibles compatible strings to set for the carveout
* @param countnumber of compatible strings
* @return 0 on success or a negative error code on failure
*/
int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name,
- unsigned int index, const char *name,
- const char **compatibles, unsigned int count,
- const struct fdt_memory *carveout);
+ unsigned int index, const struct fdt_memory *carveout,
+ const char *name, const char **compatibles,
+ unsigned int count);
/**
* Set up the device tree ready for use
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index ba1fefaeef9d..60e537b8d61e 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1561,9 +1561,9 @@ skip_compat:
}
int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name,
- unsigned int index, const char *name,
- const char **compatibles, unsigned int count,
- const struct fdt_memory *carveout)
+ unsigned int index, const struct fdt_memory *carveout,
+ const char *name, const char **compatibles,
+ unsigned int count)
{
uint32_t phandle;
int err, offset, len;
diff --git a/lib/fdtdec_test.c b/lib/fdtdec_test.c
index 72c3001a2105..3af9fb5da604 100644
--- a/lib/fdtdec_test.c
+++ b/lib/fdtdec_test.c
@@ -189,8 +189,8 @@ static int