EmbeddedPkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the EmbeddedPkg package

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Andrew Fish <afish@apple.com>
This commit is contained in:
Michael Kubacki
2021-12-05 14:53:56 -08:00
committed by mergify[bot]
parent 731c67e1d7
commit e7108d0e96
106 changed files with 9242 additions and 7648 deletions

View File

@@ -55,42 +55,56 @@
#include "libfdt_internal.h"
int fdt_address_cells(const void *fdt, int nodeoffset)
int
fdt_address_cells (
const void *fdt,
int nodeoffset
)
{
const fdt32_t *ac;
int val;
int len;
const fdt32_t *ac;
int val;
int len;
ac = fdt_getprop(fdt, nodeoffset, "#address-cells", &len);
if (!ac)
return 2;
ac = fdt_getprop (fdt, nodeoffset, "#address-cells", &len);
if (!ac) {
return 2;
}
if (len != sizeof(*ac))
return -FDT_ERR_BADNCELLS;
if (len != sizeof (*ac)) {
return -FDT_ERR_BADNCELLS;
}
val = fdt32_to_cpu(*ac);
if ((val <= 0) || (val > FDT_MAX_NCELLS))
return -FDT_ERR_BADNCELLS;
val = fdt32_to_cpu (*ac);
if ((val <= 0) || (val > FDT_MAX_NCELLS)) {
return -FDT_ERR_BADNCELLS;
}
return val;
return val;
}
int fdt_size_cells(const void *fdt, int nodeoffset)
int
fdt_size_cells (
const void *fdt,
int nodeoffset
)
{
const fdt32_t *sc;
int val;
int len;
const fdt32_t *sc;
int val;
int len;
sc = fdt_getprop(fdt, nodeoffset, "#size-cells", &len);
if (!sc)
return 2;
sc = fdt_getprop (fdt, nodeoffset, "#size-cells", &len);
if (!sc) {
return 2;
}
if (len != sizeof(*sc))
return -FDT_ERR_BADNCELLS;
if (len != sizeof (*sc)) {
return -FDT_ERR_BADNCELLS;
}
val = fdt32_to_cpu(*sc);
if ((val < 0) || (val > FDT_MAX_NCELLS))
return -FDT_ERR_BADNCELLS;
val = fdt32_to_cpu (*sc);
if ((val < 0) || (val > FDT_MAX_NCELLS)) {
return -FDT_ERR_BADNCELLS;
}
return val;
return val;
}