From 3db0198358e1b8101d78a7c785e4f4efde4fcaf9 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Thu, 23 Aug 2018 18:08:20 +0200 Subject: [PATCH] util/cbfstool: Fix typos Change-Id: I6967a106ce1286d633ddeeb041f582e65f9ea78c Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/28208 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Martin Roth --- util/cbfstool/cbfs_image.c | 6 +++--- util/cbfstool/common.c | 2 +- util/cbfstool/common.h | 2 +- util/cbfstool/elfheaders.c | 2 +- util/cbfstool/elfparsing.h | 2 +- util/cbfstool/linux.h | 2 +- util/cbfstool/lz4/lib/lz4frame.c | 2 +- util/cbfstool/lz4/lib/xxhash.c | 36 ++++++++++++++++---------------- util/cbfstool/lzma/C/LzmaEnc.h | 4 ++-- util/cbfstool/rmodule.h | 2 +- 10 files changed, 30 insertions(+), 30 deletions(-) diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c index 4b6bda929a..963c892168 100644 --- a/util/cbfstool/cbfs_image.c +++ b/util/cbfstool/cbfs_image.c @@ -685,7 +685,7 @@ static int cbfs_add_entry_at(struct cbfs_image *image, len = content_offset - addr - header_size; memcpy(entry, header, header_size); if (len != 0) { - /* the header moved backwards a bit to accomodate cbfs_file + /* the header moved backwards a bit to accommodate cbfs_file * alignment requirements, so patch up ->offset to still point * to file data. */ @@ -1867,9 +1867,9 @@ struct cbfs_file_attribute *cbfs_add_file_attr(struct cbfs_file *header, * If NULL, we have to create the first one. */ if (attr == NULL) { /* New attributes start where the header ends. - * header->offset is later set to accomodate the + * header->offset is later set to accommodate the * additional structure. - * No endianess translation necessary here, because both + * No endianness translation necessary here, because both * fields are encoded the same way. */ header->attributes_offset = header->offset; attr = (struct cbfs_file_attribute *) diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c index 14ccaa9584..c1725dc903 100644 --- a/util/cbfstool/common.c +++ b/util/cbfstool/common.c @@ -29,7 +29,7 @@ /* Utilities */ int verbose = 0; -/* Small, OS/libc independent runtime check for endianess */ +/* Small, OS/libc independent runtime check for endianness */ int is_big_endian(void) { static const uint32_t inttest = 0x12345678; diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h index baefc1cad0..f1521043e9 100644 --- a/util/cbfstool/common.h +++ b/util/cbfstool/common.h @@ -25,7 +25,7 @@ #include #include -/* Endianess */ +/* Endianness */ #include "swab.h" #define IS_TOP_ALIGNED_ADDRESS(x) ((uint32_t)(x) > 0x80000000) diff --git a/util/cbfstool/elfheaders.c b/util/cbfstool/elfheaders.c index 36226639d0..9d02c30573 100644 --- a/util/cbfstool/elfheaders.c +++ b/util/cbfstool/elfheaders.c @@ -100,7 +100,7 @@ * accurate but it is actually good enough in practice. It allows the * header transformation code to ignore the possibility of underrun. * - * We also must accomodate different ELF files, and hence formats, + * We also must accommodate different ELF files, and hence formats, * in the same cbfs invocation. We might load a 64-bit payload * on a 32-bit machine; we might even have a mixed armv7/armv8 * SOC or even a system with an x86/ARM! diff --git a/util/cbfstool/elfparsing.h b/util/cbfstool/elfparsing.h index 1c6bf5e81a..8b08c135af 100644 --- a/util/cbfstool/elfparsing.h +++ b/util/cbfstool/elfparsing.h @@ -84,7 +84,7 @@ struct elf_writer; void elf_init_eheader(Elf64_Ehdr *ehdr, int machine, int nbits, int endian); /* - * Initialize a new ELF writer. Deafult machine type, endianness, etc is + * Initialize a new ELF writer. Default machine type, endianness, etc is * copied from the passed in Elf64_Ehdr. Returns NULL on failure, valid * pointer on success. */ diff --git a/util/cbfstool/linux.h b/util/cbfstool/linux.h index c2d9079054..4bba6f0d5e 100644 --- a/util/cbfstool/linux.h +++ b/util/cbfstool/linux.h @@ -91,7 +91,7 @@ struct linux_header { u32 init_size; /* 0x260 */ } __packed; -/* Paramters passed to 32-bit part of Linux +/* Parameters passed to 32-bit part of Linux * This is another view of the structure above.. */ struct linux_params { u8 orig_x; /* 0x00 */ diff --git a/util/cbfstool/lz4/lib/lz4frame.c b/util/cbfstool/lz4/lib/lz4frame.c index f984b2734a..aef508d8df 100644 --- a/util/cbfstool/lz4/lib/lz4frame.c +++ b/util/cbfstool/lz4/lib/lz4frame.c @@ -184,7 +184,7 @@ static size_t LZ4F_getBlockSize(unsigned blockSizeID) } -/* unoptimized version; solves endianess & alignment issues */ +/* unoptimized version; solves endianness & alignment issues */ static U32 LZ4F_readLE32 (const BYTE* srcPtr) { U32 value32 = srcPtr[0]; diff --git a/util/cbfstool/lz4/lib/xxhash.c b/util/cbfstool/lz4/lib/xxhash.c index ed9f8ed2e9..0f896266f0 100644 --- a/util/cbfstool/lz4/lib/xxhash.c +++ b/util/cbfstool/lz4/lib/xxhash.c @@ -65,7 +65,7 @@ You can contact the author at : /* #define XXH_ACCEPT_NULL_INPUT_POINTER 1 */ /* XXH_FORCE_NATIVE_FORMAT : - * By default, xxHash library provides endian-independant Hash values, based on little-endian convention. + * By default, xxHash library provides endian-independent Hash values, based on little-endian convention. * Results are therefore identical for little-endian and big-endian CPU. * This comes at a performance cost for big-endian CPU, since some swapping is required to emulate little-endian format. * Should endian-independance be of no importance for your application, you may set the #define below to 1, @@ -219,7 +219,7 @@ static U64 XXH_swap64 (U64 x) /*************************************** * Architecture Macros ***************************************/ -typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess; +typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianness; /* XXH_CPU_LITTLE_ENDIAN can be defined externally, for example one the compiler command line */ #ifndef XXH_CPU_LITTLE_ENDIAN @@ -233,7 +233,7 @@ typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess; *****************************/ typedef enum { XXH_aligned, XXH_unaligned } XXH_alignment; -FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_alignment align) +FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianness endian, XXH_alignment align) { if (align==XXH_unaligned) return endian==XXH_littleEndian ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr)); @@ -241,12 +241,12 @@ FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_a return endian==XXH_littleEndian ? *(const U32*)ptr : XXH_swap32(*(const U32*)ptr); } -FORCE_INLINE U32 XXH_readLE32(const void* ptr, XXH_endianess endian) +FORCE_INLINE U32 XXH_readLE32(const void* ptr, XXH_endianness endian) { return XXH_readLE32_align(ptr, endian, XXH_unaligned); } -FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_alignment align) +FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianness endian, XXH_alignment align) { if (align==XXH_unaligned) return endian==XXH_littleEndian ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr)); @@ -254,7 +254,7 @@ FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_a return endian==XXH_littleEndian ? *(const U64*)ptr : XXH_swap64(*(const U64*)ptr); } -FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianess endian) +FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianness endian) { return XXH_readLE64_align(ptr, endian, XXH_unaligned); } @@ -285,7 +285,7 @@ FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianess endian) /***************************** * Simple Hash Functions *****************************/ -FORCE_INLINE U32 XXH32_endian_align(const void* input, size_t len, U32 seed, XXH_endianess endian, XXH_alignment align) +FORCE_INLINE U32 XXH32_endian_align(const void* input, size_t len, U32 seed, XXH_endianness endian, XXH_alignment align) { const BYTE* p = (const BYTE*)input; const BYTE* bEnd = p + len; @@ -371,7 +371,7 @@ unsigned int XXH32 (const void* input, size_t len, unsigned int seed) XXH32_update(&state, input, len); return XXH32_digest(&state); #else - XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN; # if !defined(XXH_USELESS_ALIGN_BRANCH) if ((((size_t)input) & 3) == 0) /* Input is 4-bytes aligned, leverage the speed benefit */ @@ -390,7 +390,7 @@ unsigned int XXH32 (const void* input, size_t len, unsigned int seed) #endif } -FORCE_INLINE U64 XXH64_endian_align(const void* input, size_t len, U64 seed, XXH_endianess endian, XXH_alignment align) +FORCE_INLINE U64 XXH64_endian_align(const void* input, size_t len, U64 seed, XXH_endianness endian, XXH_alignment align) { const BYTE* p = (const BYTE*)input; const BYTE* bEnd = p + len; @@ -511,7 +511,7 @@ unsigned long long XXH64 (const void* input, size_t len, unsigned long long seed XXH64_update(&state, input, len); return XXH64_digest(&state); #else - XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN; # if !defined(XXH_USELESS_ALIGN_BRANCH) if ((((size_t)input) & 7)==0) /* Input is aligned, let's leverage the speed advantage */ @@ -612,7 +612,7 @@ XXH_errorcode XXH64_reset(XXH64_state_t* state_in, unsigned long long seed) } -FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state_in, const void* input, size_t len, XXH_endianess endian) +FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state_in, const void* input, size_t len, XXH_endianness endian) { XXH_istate32_t* state = (XXH_istate32_t *) state_in; const BYTE* p = (const BYTE*)input; @@ -703,7 +703,7 @@ FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state_in, const v XXH_errorcode XXH32_update (XXH32_state_t* state_in, const void* input, size_t len) { - XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN; if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH32_update_endian(state_in, input, len, XXH_littleEndian); @@ -713,7 +713,7 @@ XXH_errorcode XXH32_update (XXH32_state_t* state_in, const void* input, size_t l -FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state_in, XXH_endianess endian) +FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state_in, XXH_endianness endian) { const XXH_istate32_t* state = (const XXH_istate32_t*) state_in; const BYTE * p = (const BYTE*)state->mem32; @@ -757,7 +757,7 @@ FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state_in, XXH_endiane unsigned int XXH32_digest (const XXH32_state_t* state_in) { - XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN; if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH32_digest_endian(state_in, XXH_littleEndian); @@ -766,7 +766,7 @@ unsigned int XXH32_digest (const XXH32_state_t* state_in) } -FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state_in, const void* input, size_t len, XXH_endianess endian) +FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state_in, const void* input, size_t len, XXH_endianness endian) { XXH_istate64_t * state = (XXH_istate64_t *) state_in; const BYTE* p = (const BYTE*)input; @@ -857,7 +857,7 @@ FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state_in, const v XXH_errorcode XXH64_update (XXH64_state_t* state_in, const void* input, size_t len) { - XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN; if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH64_update_endian(state_in, input, len, XXH_littleEndian); @@ -867,7 +867,7 @@ XXH_errorcode XXH64_update (XXH64_state_t* state_in, const void* input, size_t l -FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state_in, XXH_endianess endian) +FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state_in, XXH_endianness endian) { const XXH_istate64_t * state = (const XXH_istate64_t *) state_in; const BYTE * p = (const BYTE*)state->mem64; @@ -951,7 +951,7 @@ FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state_in, XXH_endiane unsigned long long XXH64_digest (const XXH64_state_t* state_in) { - XXH_endianess endian_detected = (XXH_endianess)XXH_CPU_LITTLE_ENDIAN; + XXH_endianness endian_detected = (XXH_endianness)XXH_CPU_LITTLE_ENDIAN; if ((endian_detected==XXH_littleEndian) || XXH_FORCE_NATIVE_FORMAT) return XXH64_digest_endian(state_in, XXH_littleEndian); diff --git a/util/cbfstool/lzma/C/LzmaEnc.h b/util/cbfstool/lzma/C/LzmaEnc.h index e62bdb33f4..c57c3209a0 100644 --- a/util/cbfstool/lzma/C/LzmaEnc.h +++ b/util/cbfstool/lzma/C/LzmaEnc.h @@ -37,7 +37,7 @@ uint32_t LzmaEncProps_GetDictSize(const struct CLzmaEncProps *props2); Returns: SZ_OK - OK SZ_ERROR_MEM - Memory allocation error - SZ_ERROR_PARAM - Incorrect paramater in props + SZ_ERROR_PARAM - Incorrect parameter in props SZ_ERROR_WRITE - Write callback error. SZ_ERROR_PROGRESS - some break from progress callback SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) @@ -60,7 +60,7 @@ SRes LzmaEnc_MemEncode(CLzmaEncHandle p, uint8_t *dest, size_t *destLen, const u Return code: SZ_OK - OK SZ_ERROR_MEM - Memory allocation error - SZ_ERROR_PARAM - Incorrect paramater + SZ_ERROR_PARAM - Incorrect parameter SZ_ERROR_OUTPUT_EOF - output buffer overflow SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) */ diff --git a/util/cbfstool/rmodule.h b/util/cbfstool/rmodule.h index 43851009ad..192928aeea 100644 --- a/util/cbfstool/rmodule.h +++ b/util/cbfstool/rmodule.h @@ -36,7 +36,7 @@ struct rmod_context { /* endian conversion ops */ struct xdr *xdr; - /* Parsed ELF sturcture. */ + /* Parsed ELF structure. */ struct parsed_elf pelf; /* Program segment. */ Elf64_Phdr *phdr;