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 <quic_llindhol@quicinc.com>
This commit is contained in:
Leif Lindholm 2024-09-30 22:36:51 +01:00 committed by mergify[bot]
parent 8292296893
commit 0cc9963cc9

View File

@ -7,6 +7,7 @@
**/ **/
#include <libfdt/libfdt/libfdt.h> #include <libfdt/libfdt/libfdt.h>
#include <Library/FdtLib.h>
#include <Uefi/UefiBaseType.h> #include <Uefi/UefiBaseType.h>
/** /**
@ -306,7 +307,7 @@ FdtNodeOffsetByPropertyValue (
come from FDT blob, it's encoding with big-endian. come from FDT blob, it's encoding with big-endian.
**/ **/
CONST struct fdt_property * CONST FDT_PROPERTY *
EFIAPI EFIAPI
FdtGetProperty ( FdtGetProperty (
IN CONST VOID *Fdt, IN CONST VOID *Fdt,
@ -315,7 +316,7 @@ FdtGetProperty (
IN INT32 *Length 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. @return The property to the structure of the given property offset.
**/ **/
CONST struct fdt_property * CONST FDT_PROPERTY *
EFIAPI EFIAPI
FdtGetPropertyByOffset ( FdtGetPropertyByOffset (
IN CONST VOID *Fdt, IN CONST VOID *Fdt,
@ -374,7 +375,7 @@ FdtGetPropertyByOffset (
IN INT32 *Length IN INT32 *Length
) )
{ {
return fdt_get_property_by_offset (Fdt, Offset, Length); return (FDT_PROPERTY *)fdt_get_property_by_offset (Fdt, Offset, Length);
} }
/** /**