summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/Include/libfdt_env.h
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:53:56 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commite7108d0e9655b1795c94ac372b0449f28dd907df (patch)
treeb153716589979b9e42e9b85281ff8b7511ba272f /EmbeddedPkg/Include/libfdt_env.h
parent731c67e1d77b7741a91762d17659fc9fbcb9e305 (diff)
downloadedk2-e7108d0e9655b1795c94ac372b0449f28dd907df.tar.gz
edk2-e7108d0e9655b1795c94ac372b0449f28dd907df.tar.bz2
edk2-e7108d0e9655b1795c94ac372b0449f28dd907df.zip
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>
Diffstat (limited to 'EmbeddedPkg/Include/libfdt_env.h')
-rw-r--r--EmbeddedPkg/Include/libfdt_env.h132
1 files changed, 103 insertions, 29 deletions
diff --git a/EmbeddedPkg/Include/libfdt_env.h b/EmbeddedPkg/Include/libfdt_env.h
index c35ac73970..dfd3bac01f 100644
--- a/EmbeddedPkg/Include/libfdt_env.h
+++ b/EmbeddedPkg/Include/libfdt_env.h
@@ -12,79 +12,153 @@
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
-typedef UINT16 fdt16_t;
-typedef UINT32 fdt32_t;
-typedef UINT64 fdt64_t;
-
-typedef UINT8 uint8_t;
-typedef UINT16 uint16_t;
-typedef UINT32 uint32_t;
-typedef UINT64 uint64_t;
-typedef UINTN uintptr_t;
-typedef UINTN size_t;
-
-static inline uint16_t fdt16_to_cpu(fdt16_t x)
+typedef UINT16 fdt16_t;
+typedef UINT32 fdt32_t;
+typedef UINT64 fdt64_t;
+
+typedef UINT8 uint8_t;
+typedef UINT16 uint16_t;
+typedef UINT32 uint32_t;
+typedef UINT64 uint64_t;
+typedef UINTN uintptr_t;
+typedef UINTN size_t;
+
+static inline uint16_t
+fdt16_to_cpu (
+ fdt16_t x
+ )
{
return SwapBytes16 (x);
}
-#define cpu_to_fdt16(x) fdt16_to_cpu(x)
-static inline uint32_t fdt32_to_cpu(fdt32_t x)
+#define cpu_to_fdt16(x) fdt16_to_cpu(x)
+
+static inline uint32_t
+fdt32_to_cpu (
+ fdt32_t x
+ )
{
return SwapBytes32 (x);
}
-#define cpu_to_fdt32(x) fdt32_to_cpu(x)
-static inline uint64_t fdt64_to_cpu(fdt64_t x)
+#define cpu_to_fdt32(x) fdt32_to_cpu(x)
+
+static inline uint64_t
+fdt64_to_cpu (
+ fdt64_t x
+ )
{
return SwapBytes64 (x);
}
-#define cpu_to_fdt64(x) fdt64_to_cpu(x)
-static inline void* memcpy(void* dest, const void* src, size_t len) {
+#define cpu_to_fdt64(x) fdt64_to_cpu(x)
+
+static inline void *
+memcpy (
+ void *dest,
+ const void *src,
+ size_t len
+ )
+{
return CopyMem (dest, src, len);
}
-static inline void *memmove(void *dest, const void *src, size_t n) {
+static inline void *
+memmove (
+ void *dest,
+ const void *src,
+ size_t n
+ )
+{
return CopyMem (dest, src, n);
}
-static inline void *memset(void *s, int c, size_t n) {
+static inline void *
+memset (
+ void *s,
+ int c,
+ size_t n
+ )
+{
return SetMem (s, n, c);
}
-static inline int memcmp(const void* dest, const void* src, int len) {
+static inline int
+memcmp (
+ const void *dest,
+ const void *src,
+ int len
+ )
+{
return CompareMem (dest, src, len);
}
-static inline void *memchr(const void *s, int c, size_t n) {
+static inline void *
+memchr (
+ const void *s,
+ int c,
+ size_t n
+ )
+{
return ScanMem8 (s, n, c);
}
-static inline size_t strlen (const char* str) {
+static inline size_t
+strlen (
+ const char *str
+ )
+{
return AsciiStrLen (str);
}
-static inline char *strchr(const char *s, int c) {
- char pattern[2];
+static inline char *
+strchr (
+ const char *s,
+ int c
+ )
+{
+ char pattern[2];
+
pattern[0] = c;
pattern[1] = 0;
return AsciiStrStr (s, pattern);
}
-static inline size_t strnlen (const char* str, size_t strsz ) {
+static inline size_t
+strnlen (
+ const char *str,
+ size_t strsz
+ )
+{
return AsciiStrnLenS (str, strsz);
}
-static inline size_t strcmp (const char* str1, const char* str2) {
+static inline size_t
+strcmp (
+ const char *str1,
+ const char *str2
+ )
+{
return AsciiStrCmp (str1, str2);
}
-static inline size_t strncmp (const char* str1, const char* str2, size_t strsz ) {
+static inline size_t
+strncmp (
+ const char *str1,
+ const char *str2,
+ size_t strsz
+ )
+{
return AsciiStrnCmp (str1, str2, strsz);
}
-static inline size_t strncpy (char* dest, const char* source, size_t dest_max) {
+static inline size_t
+strncpy (
+ char *dest,
+ const char *source,
+ size_t dest_max
+ )
+{
return AsciiStrCpyS (dest, dest_max, source);
}