Skip to content

Commit

Permalink
MdePkg: align BaseFdtLib function prototypes
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
leiflindholm authored and mergify[bot] committed Oct 2, 2024
1 parent 8292296 commit 0cc9963
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions MdePkg/Library/BaseFdtLib/FdtLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
**/

#include <libfdt/libfdt/libfdt.h>
#include <Library/FdtLib.h>
#include <Uefi/UefiBaseType.h>

/**
Expand Down Expand Up @@ -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,
Expand All @@ -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);
}

/**
Expand Down Expand Up @@ -366,15 +367,15 @@ 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,
IN INT32 Offset,
IN INT32 *Length
)
{
return fdt_get_property_by_offset (Fdt, Offset, Length);
return (FDT_PROPERTY *)fdt_get_property_by_offset (Fdt, Offset, Length);
}

/**
Expand Down

0 comments on commit 0cc9963

Please sign in to comment.