diff --git a/Kconfig b/Kconfig
index c2f61431..9d072146 100644
--- a/Kconfig
+++ b/Kconfig
@@ -369,7 +369,7 @@ config KERNEL_LMK
default n
depends on KERNEL_EXTKERNEL
help
- Configuration item for low momery killer tailoring.
+ Configuration item for low memory killer tailoring.
If you wish to build LiteOS with support for low memory killer.
config KERNEL_LMK_DEBUG
@@ -574,7 +574,7 @@ config MEM_LEAKCHECK
depends on DEBUG_VERSION && MEM_DEBUG
select KERNEL_BACKTRACE
help
- Answer Y to enable record the LR of Function call stack of Mem operation, it can check the mem leak through the infomations of mem node.
+ Answer Y to enable record the LR of Function call stack of Mem operation, it can check the mem leak through the informations of mem node.
config BASE_MEM_NODE_INTEGRITY_CHECK
bool "Enable integrity check or not"
default n
diff --git a/arch/arm/cortex-m3/keil/los_exc.S b/arch/arm/cortex-m3/keil/los_exc.S
index da2bcaf3..ab39c384 100644
--- a/arch/arm/cortex-m3/keil/los_exc.S
+++ b/arch/arm/cortex-m3/keil/los_exc.S
@@ -190,7 +190,7 @@ _hwiActiveCheck
CMP R3, #0
BEQ _hwiActiveCheckNext
- ; exc occured in IRQ
+ ; exc occurred in IRQ
ORR R0, R0, #FLAG_HWI_ACTIVE
RBIT R2, R3
CLZ R2, R2
@@ -228,19 +228,19 @@ _hwiActiveCheckNext
AND R2, R2,R3
CMP R2,#0
BNE _ExcInMSP
- ; exc occured in Task or Init or exc
+ ; exc occurred in Task or Init or exc
; reserved for register info from task stack
LDR R2, =g_taskScheduled
LDR R2, [R2]
TST R2, #1 ; OS_FLG_BGD_ACTIVE
- BEQ _ExcInMSP ; if exc occured in Init then branch
+ BEQ _ExcInMSP ; if exc occurred in Init then branch
CMP LR, #0xFFFFFFED ;auto push floating registers
BNE _NoFloatInPsp
- ; exc occured in Task
+ ; exc occurred in Task
MOV R2, R13
SUB R13, #96 ; add 8 Bytes reg(for STMFD)
diff --git a/arch/arm/cortex-m33/gcc/NTZ/los_exc.S b/arch/arm/cortex-m33/gcc/NTZ/los_exc.S
index c019764e..e809d8e1 100644
--- a/arch/arm/cortex-m33/gcc/NTZ/los_exc.S
+++ b/arch/arm/cortex-m33/gcc/NTZ/los_exc.S
@@ -263,7 +263,7 @@ _hwiActiveCheck:
CMP R3, #0
BEQ _hwiActiveCheckNext
- // exc occured in IRQ
+ // exc occurred in IRQ
ORR R0, R0, #FLAG_HWI_ACTIVE
RBIT R2, R3
CLZ R2, R2
@@ -316,19 +316,19 @@ _hwiActiveCheckNext:
AND R2, R2,R3
CMP R2,#0
BNE _ExcInMSP
- // exc occured in Task or Init or exc
+ // exc occurred in Task or Init or exc
// reserved for register info from task stack
LDR R2, =g_taskScheduled
LDR R2, [R2]
TST R2, #1 // OS_FLG_BGD_ACTIVE
- BEQ _ExcInMSP // if exc occured in Init then branch
+ BEQ _ExcInMSP // if exc occurred in Init then branch
CMP LR, #0xFFFFFFED //auto push floating registers
BNE _NoFloatInPsp
- // exc occured in Task
+ // exc occurred in Task
MOV R2, R13
SUB R13, #96 // add 8 Bytes reg(for STMFD)
diff --git a/arch/arm/cortex-m33/gcc/TZ/non_secure/los_exc.S b/arch/arm/cortex-m33/gcc/TZ/non_secure/los_exc.S
index e507da65..4e769cca 100644
--- a/arch/arm/cortex-m33/gcc/TZ/non_secure/los_exc.S
+++ b/arch/arm/cortex-m33/gcc/TZ/non_secure/los_exc.S
@@ -247,7 +247,7 @@ _hwiActiveCheck:
CMP R3, #0
BEQ _hwiActiveCheckNext
- // exc occured in IRQ
+ // exc occurred in IRQ
ORR R0, R0, #FLAG_HWI_ACTIVE
RBIT R2, R3
CLZ R2, R2
@@ -300,19 +300,19 @@ _hwiActiveCheckNext:
AND R2, R2,R3
CMP R2,#0
BNE _ExcInMSP
- // exc occured in Task or Init or exc
+ // exc occurred in Task or Init or exc
// reserved for register info from task stack
LDR R2, =g_taskScheduled
LDR R2, [R2]
TST R2, #1 // OS_FLG_BGD_ACTIVE
- BEQ _ExcInMSP // if exc occured in Init then branch
+ BEQ _ExcInMSP // if exc occurred in Init then branch
CMP LR, #0xFFFFFFED //auto push floating registers
BNE _NoFloatInPsp
- // exc occured in Task
+ // exc occurred in Task
MOV R2, R13
SUB R13, #96 // add 8 Bytes reg(for STMFD)
diff --git a/arch/arm/cortex-m33/iar/NTZ/los_exc.S b/arch/arm/cortex-m33/iar/NTZ/los_exc.S
index 4b560685..5e6b05a5 100644
--- a/arch/arm/cortex-m33/iar/NTZ/los_exc.S
+++ b/arch/arm/cortex-m33/iar/NTZ/los_exc.S
@@ -56,8 +56,8 @@ FLAG_ADDR_VALID EQU 0x10000
FLAG_HWI_ACTIVE EQU 0x20000
FLAG_NO_FLOAT EQU 0x10000000
-OS_NVIC_FSR EQU 0xE000ED28 ;include BusFault/MemFault/UsageFault State Regeister
-OS_NVIC_HFSR EQU 0xE000ED2C ;HardFault State Regeister
+OS_NVIC_FSR EQU 0xE000ED28 ;include BusFault/MemFault/UsageFault State Register
+OS_NVIC_HFSR EQU 0xE000ED2C ;HardFault State Register
OS_NVIC_BFAR EQU 0xE000ED38
OS_NVIC_MMAR EQU 0xE000ED34
OS_NVIC_ACT_BASE EQU 0xE000E300
@@ -190,7 +190,7 @@ _hwiActiveCheck
CMP R3, #0
BEQ _hwiActiveCheckNext
- ; exc occured in IRQ
+ ; exc occurred in IRQ
ORR R0, R0, #FLAG_HWI_ACTIVE
RBIT R2, R3
CLZ R2, R2
@@ -228,19 +228,19 @@ _hwiActiveCheckNext
AND R2, R2,R3
CMP R2,#0
BNE _ExcInMSP
- ; exc occured in Task or Init or exc
+ ; exc occurred in Task or Init or exc
; reserved for register info from task stack
LDR R2, =g_taskScheduled
LDR R2, [R2]
TST R2, #1 ; OS_FLG_BGD_ACTIVE
- BEQ _ExcInMSP ; if exc occured in Init then branch
+ BEQ _ExcInMSP ; if exc occurred in Init then branch
CMP LR, #0xFFFFFFED ;auto push floating registers
BNE _NoFloatInPsp
- ; exc occured in Task
+ ; exc occurred in Task
MOV R2, R13
SUB R13, #96 ; add 8 Bytes reg(for STMFD)
diff --git a/arch/arm/cortex-m33/iar/TZ/non_secure/los_exc.S b/arch/arm/cortex-m33/iar/TZ/non_secure/los_exc.S
index d592de54..c15c0382 100644
--- a/arch/arm/cortex-m33/iar/TZ/non_secure/los_exc.S
+++ b/arch/arm/cortex-m33/iar/TZ/non_secure/los_exc.S
@@ -55,8 +55,8 @@ FLAG_ADDR_VALID EQU 0x10000
FLAG_HWI_ACTIVE EQU 0x20000
FLAG_NO_FLOAT EQU 0x10000000
-OS_NVIC_FSR EQU 0xE000ED28 ;include BusFault/MemFault/UsageFault State Regeister
-OS_NVIC_HFSR EQU 0xE000ED2C ;HardFault State Regeister
+OS_NVIC_FSR EQU 0xE000ED28 ;include BusFault/MemFault/UsageFault State Register
+OS_NVIC_HFSR EQU 0xE000ED2C ;HardFault State Register
OS_NVIC_BFAR EQU 0xE000ED38
OS_NVIC_MMAR EQU 0xE000ED34
OS_NVIC_ACT_BASE EQU 0xE000E300
@@ -179,7 +179,7 @@ _hwiActiveCheck
CMP R3, #0
BEQ _hwiActiveCheckNext
- ; exc occured in IRQ
+ ; exc occurred in IRQ
ORR R0, R0, #FLAG_HWI_ACTIVE
RBIT R2, R3
CLZ R2, R2
@@ -217,19 +217,19 @@ _hwiActiveCheckNext
AND R2, R2,R3
CMP R2,#0
BNE _ExcInMSP
- ; exc occured in Task or Init or exc
+ ; exc occurred in Task or Init or exc
; reserved for register info from task stack
LDR R2, =g_taskScheduled
LDR R2, [R2]
TST R2, #1 ; OS_FLG_BGD_ACTIVE
- BEQ _ExcInMSP ; if exc occured in Init then branch
+ BEQ _ExcInMSP ; if exc occurred in Init then branch
CMP LR, #0xFFFFFFED ;auto push floating registers
BNE _NoFloatInPsp
- ; exc occured in Task
+ ; exc occurred in Task
MOV R2, R13
SUB R13, #96 ; add 8 Bytes reg(for STMFD)
diff --git a/arch/arm/cortex-m4/gcc/los_exc.S b/arch/arm/cortex-m4/gcc/los_exc.S
index a54e706c..c41d84db 100644
--- a/arch/arm/cortex-m4/gcc/los_exc.S
+++ b/arch/arm/cortex-m4/gcc/los_exc.S
@@ -278,7 +278,7 @@ _hwiActiveCheck:
CMP R3, #0
BEQ _hwiActiveCheckNext
- // exc occured in IRQ
+ // exc occurred in IRQ
ORR R0, R0, #FLAG_HWI_ACTIVE
RBIT R2, R3
CLZ R2, R2
@@ -331,19 +331,19 @@ _hwiActiveCheckNext:
AND R2, R2,R3
CMP R2,#0
BNE _ExcInMSP
- // exc occured in Task or Init or exc
+ // exc occurred in Task or Init or exc
// reserved for register info from task stack
LDR R2, =g_taskScheduled
LDR R2, [R2]
TST R2, #1 // OS_FLG_BGD_ACTIVE
- BEQ _ExcInMSP // if exc occured in Init then branch
+ BEQ _ExcInMSP // if exc occurred in Init then branch
CMP LR, #0xFFFFFFED //auto push floating registers
BNE _NoFloatInPsp
- // exc occured in Task
+ // exc occurred in Task
MOV R2, R13
SUB R13, #96 // add 8 Bytes reg(for STMFD)
diff --git a/arch/arm/cortex-m4/iar/los_exc.S b/arch/arm/cortex-m4/iar/los_exc.S
index b85290f1..2a3183e1 100644
--- a/arch/arm/cortex-m4/iar/los_exc.S
+++ b/arch/arm/cortex-m4/iar/los_exc.S
@@ -190,7 +190,7 @@ _hwiActiveCheck
CMP R3, #0
BEQ _hwiActiveCheckNext
- ; exc occured in IRQ
+ ; exc occurred in IRQ
ORR R0, R0, #FLAG_HWI_ACTIVE
RBIT R2, R3
CLZ R2, R2
@@ -228,19 +228,19 @@ _hwiActiveCheckNext
AND R2, R2,R3
CMP R2,#0
BNE _ExcInMSP
- ; exc occured in Task or Init or exc
+ ; exc occurred in Task or Init or exc
; reserved for register info from task stack
LDR R2, =g_taskScheduled
LDR R2, [R2]
TST R2, #1 ; OS_FLG_BGD_ACTIVE
- BEQ _ExcInMSP ; if exc occured in Init then branch
+ BEQ _ExcInMSP ; if exc occurred in Init then branch
CMP LR, #0xFFFFFFED ;auto push floating registers
BNE _NoFloatInPsp
- ; exc occured in Task
+ ; exc occurred in Task
MOV R2, R13
SUB R13, #96 ; add 8 Bytes reg(for STMFD)
diff --git a/arch/arm/cortex-m55/gcc/NTZ/los_exc.S b/arch/arm/cortex-m55/gcc/NTZ/los_exc.S
index c23af56f..9d996855 100644
--- a/arch/arm/cortex-m55/gcc/NTZ/los_exc.S
+++ b/arch/arm/cortex-m55/gcc/NTZ/los_exc.S
@@ -260,7 +260,7 @@ _hwiActiveCheck:
CMP R3, #0
BEQ _hwiActiveCheckNext
- // exc occured in IRQ
+ // exc occurred in IRQ
ORR R0, R0, #FLAG_HWI_ACTIVE
RBIT R2, R3
CLZ R2, R2
@@ -313,19 +313,19 @@ _hwiActiveCheckNext:
AND R2, R2, R3
CMP R2, #0
BNE _ExcInMSP
- // exc occured in Task or Init or exc
+ // exc occurred in Task or Init or exc
// reserved for register info from task stack
LDR R2, =g_taskScheduled
LDR R2, [R2]
TST R2, #1 // OS_FLG_BGD_ACTIVE
- BEQ _ExcInMSP // if exc occured in Init then branch
+ BEQ _ExcInMSP // if exc occurred in Init then branch
CMP LR, #0xFFFFFFED //auto push floating registers
BNE _NoFloatInPsp
- // exc occured in Task
+ // exc occurred in Task
MOV R2, R13
SUB R13, #96 // add 8 Bytes reg(for STMFD)
diff --git a/arch/arm/cortex-m7/gcc/los_exc.S b/arch/arm/cortex-m7/gcc/los_exc.S
index 054fa80c..de862fe3 100644
--- a/arch/arm/cortex-m7/gcc/los_exc.S
+++ b/arch/arm/cortex-m7/gcc/los_exc.S
@@ -263,7 +263,7 @@ _hwiActiveCheck:
CMP R3, #0
BEQ _hwiActiveCheckNext
- // exc occured in IRQ
+ // exc occurred in IRQ
ORR R0, R0, #FLAG_HWI_ACTIVE
RBIT R2, R3
CLZ R2, R2
@@ -316,19 +316,19 @@ _hwiActiveCheckNext:
AND R2, R2,R3
CMP R2,#0
BNE _ExcInMSP
- // exc occured in Task or Init or exc
+ // exc occurred in Task or Init or exc
// reserved for register info from task stack
LDR R2, =g_taskScheduled
LDR R2, [R2]
TST R2, #1 // OS_FLG_BGD_ACTIVE
- BEQ _ExcInMSP // if exc occured in Init then branch
+ BEQ _ExcInMSP // if exc occurred in Init then branch
CMP LR, #0xFFFFFFED //auto push floating registers
BNE _NoFloatInPsp
- // exc occured in Task
+ // exc occurred in Task
MOV R2, R13
SUB R13, #96 // add 8 Bytes reg(for STMFD)
diff --git a/arch/arm/cortex-m7/iar/los_exc.S b/arch/arm/cortex-m7/iar/los_exc.S
index 31d787cb..409166e0 100644
--- a/arch/arm/cortex-m7/iar/los_exc.S
+++ b/arch/arm/cortex-m7/iar/los_exc.S
@@ -190,7 +190,7 @@ _hwiActiveCheck
CMP R3, #0
BEQ _hwiActiveCheckNext
- ; exc occured in IRQ
+ ; exc occurred in IRQ
ORR R0, R0, #FLAG_HWI_ACTIVE
RBIT R2, R3
CLZ R2, R2
@@ -228,19 +228,19 @@ _hwiActiveCheckNext
AND R2, R2,R3
CMP R2,#0
BNE _ExcInMSP
- ; exc occured in Task or Init or exc
+ ; exc occurred in Task or Init or exc
; reserved for register info from task stack
LDR R2, =g_taskScheduled
LDR R2, [R2]
TST R2, #1 ; OS_FLG_BGD_ACTIVE
- BEQ _ExcInMSP ; if exc occured in Init then branch
+ BEQ _ExcInMSP ; if exc occurred in Init then branch
CMP LR, #0xFFFFFFED ;auto push floating registers
BNE _NoFloatInPsp
- ; exc occured in Task
+ ; exc occurred in Task
MOV R2, R13
SUB R13, #96 ; add 8 Bytes reg(for STMFD)
diff --git a/arch/risc-v/nuclei/gcc/nmsis/Core/Include/core_feature_dsp.h b/arch/risc-v/nuclei/gcc/nmsis/Core/Include/core_feature_dsp.h
index 4d41e553..ee3aab8f 100644
--- a/arch/risc-v/nuclei/gcc/nmsis/Core/Include/core_feature_dsp.h
+++ b/arch/risc-v/nuclei/gcc/nmsis/Core/Include/core_feature_dsp.h
@@ -105,7 +105,7 @@
* Based on the types of the four 8-bit arithmetic operations, the SIMD 8-bit add/subtract instructions
* can be classified into 2 main categories: Addition (four 8-bit addition), and Subtraction (four 8-bit
* subtraction).
- * Based on the way of how an overflow condition is handled for singed or unsigned operation, the
+ * Based on the way of how an overflow condition is handled for signed or unsigned operation, the
* SIMD 8-bit add/subtract instructions can be classified into 5 groups: Wrap-around (dropping
* overflow), Signed Halving (keeping overflow by dropping 1 LSB bit), Unsigned Halving, Signed
* Saturation (clipping overflow), and Unsigned Saturation.
diff --git a/arch/risc-v/riscv32/gcc/los_interrupt.c b/arch/risc-v/riscv32/gcc/los_interrupt.c
index fa05051a..7533eefb 100644
--- a/arch/risc-v/riscv32/gcc/los_interrupt.c
+++ b/arch/risc-v/riscv32/gcc/los_interrupt.c
@@ -332,7 +332,7 @@ VOID HalExcEntry(const LosExcContext *excBufAddr)
ExcInfoDisplay(excBufAddr);
if (LOS_TaskIsRunning()) {
- PRINTK("----------------All Task infomation ------------\n");
+ PRINTK("----------------All Task information ------------\n");
OsGetAllTskInfo();
}
diff --git a/components/cpup/los_cpup.c b/components/cpup/los_cpup.c
index 9c0c31ba..cffe7398 100644
--- a/components/cpup/los_cpup.c
+++ b/components/cpup/los_cpup.c
@@ -82,7 +82,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsCpupInit()
/*****************************************************************************
Function : OsTskCycleStart
-Description: start task to get cycles count in current task begining
+Description: start task to get cycles count in current task beginning
Input : None
Return : None
*****************************************************************************/
diff --git a/components/dynlink/los_dynlink.h b/components/dynlink/los_dynlink.h
index e6b60440..c152c373 100644
--- a/components/dynlink/los_dynlink.h
+++ b/components/dynlink/los_dynlink.h
@@ -169,7 +169,7 @@ VOID *LOS_SoLoad(const CHAR *fileName, VOID *pool);
VOID *LOS_FindSym(VOID *handle, const CHAR *name);
/*
- * @brief Decrement the reference count on the loaded shared library refered to by handle.
+ * @brief Decrement the reference count on the loaded shared library referred to by handle.
* If the reference count drops to zero, then the library is unloaded.
*
* This function validates that the handle is valid.
diff --git a/components/fs/fatfs/fatfs.c b/components/fs/fatfs/fatfs.c
index 11819fc8..eddeb903 100644
--- a/components/fs/fatfs/fatfs.c
+++ b/components/fs/fatfs/fatfs.c
@@ -584,7 +584,7 @@ ssize_t FatfsWrite(struct File *file, const char *buf, size_t nbyte)
res = f_write(fp, buf, nbyte, &lenWrite);
if ((res == FR_OK) && (lenWrite == 0) && (nbyte != 0) && (overFlow == FALSE)) {
overFlow = TRUE;
- PRINT_ERR("FAT write!\r\n");
+ PRINT_ERR("FAT write err!\r\n");
}
if ((res != FR_OK) || (nbyte != lenWrite)) {
diff --git a/components/lmk/los_lmk.h b/components/lmk/los_lmk.h
index d06704f6..c5a0637f 100644
--- a/components/lmk/los_lmk.h
+++ b/components/lmk/los_lmk.h
@@ -128,7 +128,7 @@ typedef struct {
* @param lmkNode [IN] The LosLmkOpsNode node to be registered.
*
* @retval LOS_OK The LosLmkOpsNode node is registered successfully.
- * @retval LOS_ERRNO_LMK_INVALID_PARAMETER The paramter is invalid.
+ * @retval LOS_ERRNO_LMK_INVALID_PARAMETER The parameter is invalid.
* @retval LOS_ERRNO_LMK_ALREADY_REGISTERED The LosLmkOpsNode node already registered.
* @par Dependency:
*
- los_lmk.h: the header file that contains the API declaration.
diff --git a/components/net/lwip-2.1/porting/src/api_shell.c b/components/net/lwip-2.1/porting/src/api_shell.c
index a02b6ac3..ec4da034 100644
--- a/components/net/lwip-2.1/porting/src/api_shell.c
+++ b/components/net/lwip-2.1/porting/src/api_shell.c
@@ -488,7 +488,7 @@ LWIP_STATIC int OsPingFunc(u32_t *parg)
PRINTK("\nPing: parameter problem ...");
break;
default:
- PRINTK("\nPing: unknow error ...");
+ PRINTK("\nPing: unknown error ...");
break;
}
i++;
diff --git a/components/security/box/los_box.c b/components/security/box/los_box.c
index 55c68790..05e77a3b 100644
--- a/components/security/box/los_box.c
+++ b/components/security/box/los_box.c
@@ -50,7 +50,7 @@ VOID OsUserTaskInit(UINT32 taskID, UINTPTR entry, UINTPTR userArea, UINTPTR user
VOID OsUserTaskDelete(UINT32 taskID)
{
- memset_s(&g_UserTaskCBArray[taskID], sizeof(UserTaskCB), 0, sizeof(UserTaskCB));
+ (VOID)memset_s(&g_UserTaskCBArray[taskID], sizeof(UserTaskCB), 0, sizeof(UserTaskCB));
}
UserTaskCB *OsGetUserTaskCB(UINT32 taskID)
diff --git a/components/shell/include/shell.h b/components/shell/include/shell.h
index 20a69356..24e9dc37 100644
--- a/components/shell/include/shell.h
+++ b/components/shell/include/shell.h
@@ -115,7 +115,7 @@ typedef enum {
/*
* Hook for user-defined debug function
- * Unify differnt module's func for registration
+ * Unify different module's func for registration
*/
typedef UINT32 (*CmdCallBackFunc)(UINT32 argc, const CHAR **argv);
diff --git a/components/shell/src/base/shcmd.c b/components/shell/src/base/shcmd.c
index 9330db45..ffc32376 100644
--- a/components/shell/src/base/shcmd.c
+++ b/components/shell/src/base/shcmd.c
@@ -72,10 +72,10 @@ CmdModInfo *OsCmdInfoGet(VOID)
}
/*
- * Description: Pass in the string and clear useless space ,which inlcude:
+ * Description: Pass in the string and clear useless space ,which include:
* 1) The overmatch space which is not be marked by Quote's area
* Squeeze the overmatch space into one space
- * 2) Clear all space before first vaild charatctor
+ * 2) Clear all space before first vaild character
* Input: cmdKey : Pass in the buff string, which is ready to be operated
* cmdOut : Pass out the buffer string ,which has already been operated
* size : cmdKey length
@@ -114,7 +114,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdKeyShift(const CHAR *cmdKey, CHAR *cmdOut, UI
/* 1) Quotes matching status is FALSE (which said that the space is not been marked by double quotes) */
/* 2) Current charactor is a space */
/* 3) Next charactor is a space too, or the string is been seeked to the end already(\0) */
- /* 4) Invaild charactor, such as single quotes */
+ /* 4) Invalid charactor, such as single quotes */
if ((*cmdKey == ' ') && ((*(cmdKey + 1) == ' ') || (*(cmdKey + 1) == '\0')) && QUOTES_STATUS_CLOSE(quotes)) {
continue;
}
diff --git a/components/shell/src/base/shmsg.c b/components/shell/src/base/shmsg.c
index f30472e4..8cc37ff2 100644
--- a/components/shell/src/base/shmsg.c
+++ b/components/shell/src/base/shmsg.c
@@ -96,7 +96,7 @@ CHAR *GetCmdName(const CHAR *cmdline, UINT32 len)
continue;
}
/* If detected a space which the quotes matching status is false */
- /* which said has detected the first space for seperator, finish this scan operation */
+ /* which said has detected the first space for separator, finish this scan operation */
if ((*tmpStr == ' ') && (QUOTES_STATUS_CLOSE(quotes))) {
break;
}
diff --git a/components/trace/los_trace.c b/components/trace/los_trace.c
index 523eea95..23241e87 100644
--- a/components/trace/los_trace.c
+++ b/components/trace/los_trace.c
@@ -106,7 +106,7 @@ STATIC VOID OsTraceSetFrame(TraceEventFrame *frame, UINT32 eventType, UINTPTR id
#if (LOSCFG_TRACE_FRAME_CORE_MSG == 1)
frame->core.cpuId = ArchCurrCpuid();
frame->core.hwiActive = OS_INT_ACTIVE ? TRUE : FALSE;
- frame->core.taskLockCnt = MIN(OsPercpuGet()->taskLockCnt, 0xF); /* taskLockCnt is 4 bits, max vaule = 0xF */
+ frame->core.taskLockCnt = MIN(OsPercpuGet()->taskLockCnt, 0xF); /* taskLockCnt is 4 bits, max value = 0xF */
frame->core.paramCount = paramCount;
#endif
diff --git a/components/trace/los_trace.h b/components/trace/los_trace.h
index 24812697..8aa15b4d 100644
--- a/components/trace/los_trace.h
+++ b/components/trace/los_trace.h
@@ -223,7 +223,7 @@ typedef struct {
/**
* @ingroup los_trace
- * struct to store the event infomation
+ * struct to store the event information
*/
typedef struct {
UINT32 eventType; /**< event type */
diff --git a/components/trace/los_trace_pri.h b/components/trace/los_trace_pri.h
index a011e425..8c5a8cab 100644
--- a/components/trace/los_trace_pri.h
+++ b/components/trace/los_trace_pri.h
@@ -96,7 +96,7 @@ typedef struct {
/**
* @ingroup los_trace
- * struct to store the event infomation
+ * struct to store the event information
*/
typedef struct {
UINT32 cmd; /* trace start or stop cmd */
diff --git a/components/trace/pipeline/trace_pipeline.c b/components/trace/pipeline/trace_pipeline.c
index 9fc1ffc9..1e096e2d 100644
--- a/components/trace/pipeline/trace_pipeline.c
+++ b/components/trace/pipeline/trace_pipeline.c
@@ -134,7 +134,7 @@ VOID OsTraceDataSend(UINT8 type, UINT16 len, UINT8 *data)
UINT32 intSave;
UINT8 outBuf[LOSCFG_TRACE_TLV_BUF_SIZE] = {0};
- if ((type > TRACE_MSG_MAX) || (len > LOSCFG_TRACE_TLV_BUF_SIZE)) {
+ if ((type >= TRACE_MSG_MAX) || (len > LOSCFG_TRACE_TLV_BUF_SIZE)) {
return;
}
diff --git a/components/trace/trace_offline.c b/components/trace/trace_offline.c
index d9ee1cfb..71c408bd 100644
--- a/components/trace/trace_offline.c
+++ b/components/trace/trace_offline.c
@@ -186,7 +186,7 @@ STATIC VOID OsTraceInfoEventData(VOID)
UINT32 taskLockCnt = frame->core.taskLockCnt;
#if (LOSCFG_KERNEL_SMP == 1)
/*
- * For smp systems, TRACE_LOCK will requst taskLock, and this counter
+ * For smp systems, TRACE_LOCK will request taskLock, and this counter
* will increase by 1 in that case.
*/
taskLockCnt -= 1;
diff --git a/kal/libc/newlib/porting/src/other_adapt.c b/kal/libc/newlib/porting/src/other_adapt.c
index 4d215b1c..eff0be4d 100644
--- a/kal/libc/newlib/porting/src/other_adapt.c
+++ b/kal/libc/newlib/porting/src/other_adapt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2021 Huawei Device Co., Ltd. All rights reserved.
+ * Copyright (c) 2021-2022 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -37,7 +37,7 @@
int _isatty(int file)
{
- return file <= 2;
+ return (int)(file <= 2); // 2: stderr
}
int _kill(int i, int j)
@@ -52,7 +52,7 @@ int _getpid(void)
void _exit(int status)
{
- write(1, "exit\n", 5);
+ write(1, "exit\n", 5); // 1: stdout; 5: string length
(VOID)pthread_exit(&status);
while (1) {
}
diff --git a/kernel/include/los_memory.h b/kernel/include/los_memory.h
index 2c29601c..ea1b5fcb 100644
--- a/kernel/include/los_memory.h
+++ b/kernel/include/los_memory.h
@@ -103,11 +103,11 @@ extern UINT32 LOS_MemDeInit(VOID *pool);
/**
* @ingroup los_memory
- * @brief Print infomation about all pools.
+ * @brief Print information about all pools.
*
* @par Description:
*
- * - This API is used to print infomation about all pools.
+ * - This API is used to print information about all pools.
*
*
* @retval #UINT32 The pool number.
@@ -394,11 +394,11 @@ extern UINT32 LOS_MemTotalUsedGet(VOID *pool);
/**
* @ingroup los_memory
- * @brief Get the infomation of memory pool.
+ * @brief Get the information of memory pool.
*
* @par Description:
*
- * - This API is used to get the infomation of memory pool.
+ * - This API is used to get the information of memory pool.
*
* @attention
*
@@ -409,7 +409,7 @@ extern UINT32 LOS_MemTotalUsedGet(VOID *pool);
* @param poolStatus [IN] A pointer for storage the pool status
*
* @retval #LOS_NOK The incoming parameter pool is NULL or invalid.
- * @retval #LOS_OK Success to get memory infomation.
+ * @retval #LOS_OK Success to get memory information.
* @par Dependency:
* - los_memory.h: the header file that contains the API declaration.
* @see None.
diff --git a/kernel/include/los_queue.h b/kernel/include/los_queue.h
index e1d43104..f012d6f3 100644
--- a/kernel/include/los_queue.h
+++ b/kernel/include/los_queue.h
@@ -323,7 +323,7 @@ extern "C" {
/**
* @ingroup los_queue
- * Queue error code: The buffer size passed in during queue readding is smaller than the queue size.
+ * Queue error code: The buffer size passed in during queue reading is smaller than the queue size.
*
* Value: 0x0200061f
*
@@ -333,7 +333,7 @@ extern "C" {
/**
* @ingroup los_queue
- * Queue error code: The buffer size passed in during queue readding or writting is bigger than the biggest size.
+ * Queue error code: The buffer size passed in during queue reading or writing is bigger than the biggest size.
*
* Value: 0x02000620
*
diff --git a/kernel/include/los_swtmr.h b/kernel/include/los_swtmr.h
index 1b060e9e..857abd9a 100644
--- a/kernel/include/los_swtmr.h
+++ b/kernel/include/los_swtmr.h
@@ -342,7 +342,7 @@ extern UINT32 LOS_SwtmrStop(UINT32 swtmrID);
* specified by usSwTmrID.
* @attention
*
- * - The specific timer should be created and started successfully, error happends otherwise.
+ * - The specific timer should be created and started successfully, error happens otherwise.
*
*
* @param swtmrID [IN] Software timer ID created by LOS_SwtmrCreate.
diff --git a/kernel/src/los_queue.c b/kernel/src/los_queue.c
index 63faefe4..686e5d14 100644
--- a/kernel/src/los_queue.c
+++ b/kernel/src/los_queue.c
@@ -120,6 +120,9 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_QueueCreate(const CHAR *queueName,
/* Memory allocation is time-consuming, to shorten the time of disable interrupt,
move the memory allocation to here. */
+ if ((UINT32_MAX / msgSize) < len) {
+ return LOS_ERRNO_QUEUE_SIZE_TOO_BIG;
+ }
queue = (UINT8 *)LOS_MemAlloc(m_aucSysMem0, (UINT32)len * msgSize);
if (queue == NULL) {
return LOS_ERRNO_QUEUE_CREATE_NO_MEMORY;
diff --git a/targets/riscv_nuclei_demo_soc_gcc/SoC/demosoc/Common/Include/demosoc_i2c.h b/targets/riscv_nuclei_demo_soc_gcc/SoC/demosoc/Common/Include/demosoc_i2c.h
index eb90eedf..86428dbe 100644
--- a/targets/riscv_nuclei_demo_soc_gcc/SoC/demosoc/Common/Include/demosoc_i2c.h
+++ b/targets/riscv_nuclei_demo_soc_gcc/SoC/demosoc/Common/Include/demosoc_i2c.h
@@ -32,7 +32,7 @@ extern "C" {
#define I2C_SR_RXACK (1 << 7)//0:received; 1:no ack resceived
#define I2C_SR_BUSY (1 << 6)//0:after 'STOP' detected; 1:after 'START' detected
#define I2C_SR_AL (1 << 5)
-#define I2C_SR_TIP (1 << 1)//0:transfer complete; 1:transfering
+#define I2C_SR_TIP (1 << 1)//0:transfer complete; 1:transferring
#define I2C_SR_IF (1 << 0)
#if 0
/*fileds*/
diff --git a/targets/riscv_nuclei_demo_soc_gcc/SoC/demosoc/Common/Source/system_demosoc.c b/targets/riscv_nuclei_demo_soc_gcc/SoC/demosoc/Common/Source/system_demosoc.c
index 9a3a5cef..fa183135 100644
--- a/targets/riscv_nuclei_demo_soc_gcc/SoC/demosoc/Common/Source/system_demosoc.c
+++ b/targets/riscv_nuclei_demo_soc_gcc/SoC/demosoc/Common/Source/system_demosoc.c
@@ -280,7 +280,7 @@ void ECLIC_Init(void)
* \param [in] IRQn NMI interrupt handler address
* \param [in] shv \ref ECLIC_NON_VECTOR_INTERRUPT means non-vector mode, and \ref ECLIC_VECTOR_INTERRUPT is vector mode
* \param [in] trig_mode see \ref ECLIC_TRIGGER_Type
- * \param [in] lvl interupt level
+ * \param [in] lvl interrupt level
* \param [in] priority interrupt priority
* \param [in] handler interrupt handler, if NULL, handler will not be installed
* \return -1 means invalid input parameter. 0 means successful.
diff --git a/targets/riscv_nuclei_gd32vf103_soc_gcc/SoC/gd32vf103/Common/Source/Drivers/gd32vf103_spi.c b/targets/riscv_nuclei_gd32vf103_soc_gcc/SoC/gd32vf103/Common/Source/Drivers/gd32vf103_spi.c
index 2e1b3a16..e2d1828c 100644
--- a/targets/riscv_nuclei_gd32vf103_soc_gcc/SoC/gd32vf103/Common/Source/Drivers/gd32vf103_spi.c
+++ b/targets/riscv_nuclei_gd32vf103_soc_gcc/SoC/gd32vf103/Common/Source/Drivers/gd32vf103_spi.c
@@ -98,7 +98,7 @@ void spi_struct_para_init(spi_parameter_struct* spi_struct)
/*!
\brief initialize SPI parameter
\param[in] spi_periph: SPIx(x=0,1,2)
- \param[in] spi_struct: SPI parameter initialization stuct members of the structure
+ \param[in] spi_struct: SPI parameter initialization struct members of the structure
and the member values are shown as below:
device_mode: SPI_MASTER, SPI_SLAVE
trans_mode: SPI_TRANSMODE_FULLDUPLEX, SPI_TRANSMODE_RECEIVEONLY,
diff --git a/targets/riscv_nuclei_gd32vf103_soc_gcc/SoC/gd32vf103/Common/Source/system_gd32vf103.c b/targets/riscv_nuclei_gd32vf103_soc_gcc/SoC/gd32vf103/Common/Source/system_gd32vf103.c
index b8f0220a..d6b9843e 100644
--- a/targets/riscv_nuclei_gd32vf103_soc_gcc/SoC/gd32vf103/Common/Source/system_gd32vf103.c
+++ b/targets/riscv_nuclei_gd32vf103_soc_gcc/SoC/gd32vf103/Common/Source/system_gd32vf103.c
@@ -423,9 +423,9 @@ uint32_t core_exception_handler(unsigned long mcause, unsigned long sp)
uint32_t EXCn = (uint32_t)(mcause & 0X00000fff);
EXC_HANDLER exc_handler;
- PRINTK("----------------All Task infomation ------------\r\n");
+ PRINTK("----------------All Task information ------------\r\n");
HalDisplayTaskInfo();
- PRINTK("---------------exc handler infomation -----------\r\n");
+ PRINTK("---------------exc handler information -----------\r\n");
if ((EXCn < MAX_SYSTEM_EXCEPTION_NUM) && (EXCn >= 0)) {
exc_handler = (EXC_HANDLER)SystemExceptionHandlers[EXCn];
@@ -474,7 +474,7 @@ void ECLIC_Init(void)
* \param [in] IRQn NMI interrupt handler address
* \param [in] shv \ref ECLIC_NON_VECTOR_INTERRUPT means non-vector mode, and \ref ECLIC_VECTOR_INTERRUPT is vector mode
* \param [in] trig_mode see \ref ECLIC_TRIGGER_Type
- * \param [in] lvl interupt level
+ * \param [in] lvl interrupt level
* \param [in] priority interrupt priority
* \param [in] handler interrupt handler, if NULL, handler will not be installed
* \return -1 means invalid input parameter. 0 means successful.
diff --git a/testsuites/include/osTest.h b/testsuites/include/osTest.h
index 3c56a018..65736820 100644
--- a/testsuites/include/osTest.h
+++ b/testsuites/include/osTest.h
@@ -297,7 +297,7 @@ extern UINT32 TaskUsedCountGet(VOID);
#define HWI_NUM_TEST3 36
#define LOS_KERNEL_MULTI_HWI_TEST 1 // default enable multiple hwi number test case
#elif __CSKY_V2__
-#define HWI_NUM_TEST 31 // csky_v2 only suppport one software interrupt number
+#define HWI_NUM_TEST 31 // csky_v2 only support one software interrupt number
#define LOS_KERNEL_MULTI_HWI_TEST 0 // csky_v2 not support multiple hwi number test case
#elif __XTENSA_LX6__
#define HWI_NUM_TEST 7 // xtensa_lx6 only suppport one software interrupt number
diff --git a/testsuites/sample/kernel/dynlink/It_los_dynlink_002.c b/testsuites/sample/kernel/dynlink/It_los_dynlink_002.c
index 8911a6fd..954fe7ce 100644
--- a/testsuites/sample/kernel/dynlink/It_los_dynlink_002.c
+++ b/testsuites/sample/kernel/dynlink/It_los_dynlink_002.c
@@ -30,7 +30,7 @@
#include "los_dynlink.h"
#include "It_los_dynlink.h"
-/* Test invalide params */
+/* Test invalid params */
STATIC UINT32 TestCase(VOID)
{
VOID *handle = NULL;
diff --git a/utils/los_debug.h b/utils/los_debug.h
index 8649cc0f..c2de19a5 100644
--- a/utils/los_debug.h
+++ b/utils/los_debug.h
@@ -121,7 +121,7 @@ typedef enum {
*
* @param type [IN] Type LogModuleType indicates the log type.
* @param level [IN] Type LogLevel indicates the log level.
- * @param fmt [IN] Type char* controls the ouput as in C printf.
+ * @param fmt [IN] Type char* controls the output as in C printf.
*
* @retval None
* @par Dependency: