From d3a9990c6a1d6fa89bdd61d240e7b56db383a00e Mon Sep 17 00:00:00 2001 From: Manish Pandey Date: Mon, 6 Nov 2023 13:28:48 +0000 Subject: [PATCH] chore(libfdt): update header files to v1.7.0 tag As part of TF-A 2.9.0 release, libfdt version was updated to its last tagged version (1.7.0) with commit 058e017e5. This commit has only updated the source files of libfdt but did not update header files. This patch updates the libfdt header files in include/lib/libfdt to the tagged version v1.7.0 Signed-off-by: Manish Pandey Change-Id: I09a0f51435b343c3e1cac45075fe7d28cbcae867 --- include/lib/libfdt/fdt.h | 4 ++-- include/lib/libfdt/libfdt.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/lib/libfdt/fdt.h b/include/lib/libfdt/fdt.h index eb9edb72f..c9acc0cb0 100644 --- a/include/lib/libfdt/fdt.h +++ b/include/lib/libfdt/fdt.h @@ -35,14 +35,14 @@ struct fdt_reserve_entry { struct fdt_node_header { fdt32_t tag; - char name[0]; + char name[]; }; struct fdt_property { fdt32_t tag; fdt32_t len; fdt32_t nameoff; - char data[0]; + char data[]; }; #endif /* !__ASSEMBLER__*/ diff --git a/include/lib/libfdt/libfdt.h b/include/lib/libfdt/libfdt.h index a7f432c80..d0a2ed274 100644 --- a/include/lib/libfdt/libfdt.h +++ b/include/lib/libfdt/libfdt.h @@ -660,6 +660,13 @@ int fdt_next_property_offset(const void *fdt, int offset); const struct fdt_property *fdt_get_property_by_offset(const void *fdt, int offset, int *lenp); +static inline struct fdt_property *fdt_get_property_by_offset_w(void *fdt, + int offset, + int *lenp) +{ + return (struct fdt_property *)(uintptr_t) + fdt_get_property_by_offset(fdt, offset, lenp); +} /** * fdt_get_property_namelen - find a property based on substring