From 9019487608c8afe7d3fc34cb5192df064b60cdb7 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Fri, 3 Sep 2021 15:16:20 +0200 Subject: fdtdec: Reorder fdtdec_set_carveout() parameters for consistency 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 Reviewed-by: Simon Glass Signed-off-by: Tom Warren --- lib/fdtdec.c | 6 +++--- lib/fdtdec_test.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/fdtdec.c b/lib/fdtdec.c index f124f05..a0ecc72 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1523,9 +1523,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 72c3001..3af9fb5 100644 --- a/lib/fdtdec_test.c +++ b/lib/fdtdec_test.c @@ -189,8 +189,8 @@ static int make_fdt_carveout_device(void *fdt, uint32_t na, uint32_t ns) offset = CHECK(fdt_add_subnode(fdt, 0, name + 1)); CHECK(fdt_setprop(fdt, offset, "reg", cells, (na + ns) * sizeof(*cells))); - return fdtdec_set_carveout(fdt, name, "memory-region", 0, - "framebuffer", NULL, 0, &carveout); + return fdtdec_set_carveout(fdt, name, "memory-region", 0, &carveout, + "framebuffer", NULL, 0); } static int check_fdt_carveout(void *fdt, uint32_t address_cells, -- cgit v1.1