From 0cc9963cc93d568fc3468a4726105983dfc19354 Mon Sep 17 00:00:00 2001 From: Leif Lindholm Date: Mon, 30 Sep 2024 22:36:51 +0100 Subject: [PATCH] MdePkg: align BaseFdtLib function prototypes FdtLib.h uses CONST FDT_PROPERTY * return values for some wrapper functions, but the implementation in FdtLib.c used to original CONST struct fdt_property * instead of the exported typedef. Import LibFdt.h in the implementation file and make the implementation consistent with the declaration. Signed-off-by: Leif Lindholm --- MdePkg/Library/BaseFdtLib/FdtLib.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/MdePkg/Library/BaseFdtLib/FdtLib.c b/MdePkg/Library/BaseFdtLib/FdtLib.c index 1b1d21f502..04e2f5552c 100644 --- a/MdePkg/Library/BaseFdtLib/FdtLib.c +++ b/MdePkg/Library/BaseFdtLib/FdtLib.c @@ -7,6 +7,7 @@ **/ #include +#include #include /** @@ -306,7 +307,7 @@ FdtNodeOffsetByPropertyValue ( come from FDT blob, it's encoding with big-endian. **/ -CONST struct fdt_property * +CONST FDT_PROPERTY * EFIAPI FdtGetProperty ( IN CONST VOID *Fdt, @@ -315,7 +316,7 @@ FdtGetProperty ( IN INT32 *Length ) { - return fdt_get_property (Fdt, NodeOffset, Name, Length); + return (FDT_PROPERTY *)fdt_get_property (Fdt, NodeOffset, Name, Length); } /** @@ -366,7 +367,7 @@ FdtNextPropertyOffset ( @return The property to the structure of the given property offset. **/ -CONST struct fdt_property * +CONST FDT_PROPERTY * EFIAPI FdtGetPropertyByOffset ( IN CONST VOID *Fdt, @@ -374,7 +375,7 @@ FdtGetPropertyByOffset ( IN INT32 *Length ) { - return fdt_get_property_by_offset (Fdt, Offset, Length); + return (FDT_PROPERTY *)fdt_get_property_by_offset (Fdt, Offset, Length); } /**