Skip to content

Commit 1574cd3

Browse files
antkleinmergify[bot]
authored andcommitted
MdePkg/BaseFdtLib: Header style update to FdtOverlayApply and
FdtStrerror Update the FdtOverlayApply() function to mark the Fdt pointer as an IN OUT variable. The internal fdt_overlay_apply() function returns the merged blob in the Fdt variable. Update FdtStrerror to have it's return type on a single line, aligning the style with the rest of the file. Signed-off-by: Antaeus Kleinert-Strand <[email protected]>
1 parent 4afb388 commit 1574cd3

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

MdePkg/Include/Library/FdtLib.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -995,22 +995,20 @@ FdtFindMaxPhandle (
995995
/**
996996
Applies a DT overlay on a base DT.
997997
998-
@param[in] Fdt The pointer to FDT blob.
999-
@param[in] Fdto The pointer to FDT overlay blob.
998+
@param[in,out] Fdt The pointer to FDT blob.
999+
@param[in] Fdto The pointer to FDT overlay blob.
10001000
1001-
@return 0 on success, or negative error code.
1001+
@return 0 on success, or negative error code on failure.
10021002
**/
10031003
INT32
10041004
EFIAPI
10051005
FdtOverlayApply (
1006-
IN VOID *Fdt,
1007-
IN VOID *Fdto
1006+
IN OUT VOID *Fdt,
1007+
IN VOID *Fdto
10081008
);
10091009

10101010
/* Debug functions. */
1011-
CONST
1012-
CHAR8
1013-
*
1011+
CONST CHAR8 *
10141012
FdtStrerror (
10151013
IN INT32 ErrVal
10161014
);

MdePkg/Library/BaseFdtLib/FdtLib.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -940,25 +940,23 @@ FdtFindMaxPhandle (
940940
/**
941941
Applies a DT overlay on a base DT.
942942
943-
@param[in] Fdt The pointer to FDT blob.
944-
@param[in] Fdto The pointer to FDT overlay blob.
943+
@param[in,out] Fdt The pointer to FDT blob.
944+
@param[in] Fdto The pointer to FDT overlay blob.
945945
946-
@return 0 on success, or negative error code.
946+
@return 0 on success, or negative error code on failure.
947947
**/
948948
INT32
949949
EFIAPI
950950
FdtOverlayApply (
951-
IN VOID *Fdt,
952-
IN VOID *Fdto
951+
IN OUT VOID *Fdt,
952+
IN VOID *Fdto
953953
)
954954
{
955955
return fdt_overlay_apply (Fdt, Fdto);
956956
}
957957

958958
/* Debug functions. */
959-
CONST
960-
CHAR8
961-
*
959+
CONST CHAR8 *
962960
FdtStrerror (
963961
IN INT32 ErrVal
964962
)

0 commit comments

Comments
 (0)