fix: 编码规范修改

1.拼写错误
2.未使用的参数使用void
3.删除lint相关注释
4.函数返回值处理

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I155d786172d62f47d940b32b0a1b36406d3c047f
This commit is contained in:
zhushengle
2022-03-21 11:58:38 +08:00
parent ba727e2678
commit d161a0b03d
98 changed files with 443 additions and 289 deletions

View File

@@ -284,8 +284,8 @@ LITE_OS_SEC_TEXT_MINOR STATIC VOID OsCpupGetPos(UINT16 mode, UINT16 *curPosPoint
curPos = CPUP_PRE_POS(tmpPos);
/*
* The current postion has nothing to do with the CPUP modes,
* however, the previous postion differs.
* The current position has nothing to do with the CPUP modes,
* however, the previous position differs.
*/
switch (mode) {
case CPUP_LAST_ONE_SECONDS:

View File

@@ -45,7 +45,6 @@
#ifdef LOSCFG_DRIVERS_TZDRIVER
#include "fs/file.h"
#endif
#include "fs/file.h"
#include "unistd.h"
#ifdef __cplusplus

View File

@@ -103,7 +103,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsLiteIpcInit(VOID)
#if (USE_TASKID_AS_HANDLE == 1)
g_cmsTask.status = HANDLE_NOT_USED;
#else
memset_s(g_serviceHandleMap, sizeof(g_serviceHandleMap), 0, sizeof(g_serviceHandleMap));
(void)memset_s(g_serviceHandleMap, sizeof(g_serviceHandleMap), 0, sizeof(g_serviceHandleMap));
#endif
ret = LOS_MuxInit(&g_serviceHandleMapMux, NULL);
if (ret != LOS_OK) {
@@ -565,7 +565,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 SendDeathMsg(UINT32 processID, UINT32 serviceHand
}
content.flag = SEND;
content.outMsg = &msg;
memset_s(content.outMsg, sizeof(IpcMsg), 0, sizeof(IpcMsg));
(void)memset_s(content.outMsg, sizeof(IpcMsg), 0, sizeof(IpcMsg));
content.outMsg->type = MT_DEATH_NOTIFY;
content.outMsg->target.handle = ipcTaskID;
content.outMsg->target.token = serviceHandle;
@@ -1161,7 +1161,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 LiteIpcRead(IpcContent *content)
if (ret == LOS_OK) {
break;
}
if (ret == -ENOENT) { /* It means that we've recieved a failed reply */
if (ret == -ENOENT) { /* It means that we've received a failed reply */
return ret;
}
}
@@ -1208,7 +1208,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 LiteIpcMsgHandle(IpcContent *con)
}
content->outMsg = msg;
if ((content->outMsg->type < 0) || (content->outMsg->type >= MT_DEATH_NOTIFY)) {
PRINT_ERR("LiteIpc unknow msg type:%d\n", content->outMsg->type);
PRINT_ERR("LiteIpc unknown msg type:%d\n", content->outMsg->type);
ret = -EINVAL;
goto BUFFER_FREE;
}

View File

@@ -150,8 +150,8 @@ typedef struct {
VOID *data;
UINT32 spObjNum;
VOID *offsets;
UINT32 processID; /**< filled by kernel, processId of sender/reciever */
UINT32 taskID; /**< filled by kernel, taskId of sender/reciever */
UINT32 processID; /**< filled by kernel, processId of sender/receiver */
UINT32 taskID; /**< filled by kernel, taskId of sender/receiver */
#ifdef LOSCFG_SECURITY_CAPABILITY
UINT32 userID;
UINT32 gid;

0
kernel/extended/lms/Kconfig Executable file → Normal file
View File

0
kernel/extended/lms/Makefile Executable file → Normal file
View File

4
kernel/extended/lms/lms_libc.c Executable file → Normal file
View File

@@ -56,7 +56,7 @@ void *memcpy(void *dest, const void *src, size_t len)
}
#undef strcat
char *strcat (char *s, const char *append)
char *strcat(char *s, const char *append)
{
if ((s == NULL) || (append == NULL)) {
return NULL;
@@ -119,4 +119,4 @@ char *strncpy(char *dest, const char *src, size_t n)
__asan_storeN_noabort((UINTPTR)dest, n);
__asan_loadN_noabort((UINTPTR)src, size + 1);
return __strncpy(dest, src, n);
}
}

0
kernel/extended/lms/los_lms.c Executable file → Normal file
View File

0
kernel/extended/lms/los_lms_pri.h Executable file → Normal file
View File

0
kernel/extended/lms/usr/los_lms.c Executable file → Normal file
View File

0
kernel/extended/lms/usr/los_lms.h Executable file → Normal file
View File

0
kernel/extended/lms/usr/los_lms_pri.h Executable file → Normal file
View File

0
kernel/extended/lms/usr/los_lmslibc.c Executable file → Normal file
View File

View File

@@ -104,7 +104,7 @@ typedef struct {
#define PMU_INT(_num) PMU_LABEL_INT_##_num
#define OS_PMU_INTS(_num, _list) \
STATIC UINT32 _list [_num] = { \
STATIC UINT32 _list[_num] = { \
PMU_INT(_num) \
}

View File

@@ -181,7 +181,7 @@ STATIC VOID LOS_TraceTaskResume(const LosTaskCB *taskCB)
STATIC VOID LOS_TraceTaskSuspend(const LosTaskCB *taskCB)
{
LOS_TRACE(TASK_SUSPEND, taskCB->taskID, taskCB->taskStatus,OsCurrTaskGet()->taskID);
LOS_TRACE(TASK_SUSPEND, taskCB->taskID, taskCB->taskStatus, OsCurrTaskGet()->taskID);
}
STATIC VOID LOS_TraceIsrEnter(UINT32 hwiNum)

View File

@@ -94,7 +94,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 */

View File

@@ -57,6 +57,9 @@ UINT32 SerialPipelineInit(VOID)
UINT32 SerialDataReceive(UINT8 *data, UINT32 size, UINT32 timeout)
{
(VOID)data;
(VOID)size;
(VOID)timeout;
return LOS_OK;
}

View File

@@ -187,7 +187,7 @@ STATIC VOID OsTraceInfoEventData(VOID)
UINT32 taskLockCnt = frame->core.taskLockCnt;
#ifdef LOSCFG_KERNEL_SMP
/*
* 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;

View File

@@ -1,3 +1,34 @@
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-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:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)