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: * 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: * * * @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: * * @attention *