Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos A
提交
e7daa282
K
Kernel Liteos A
项目概览
OpenHarmony
/
Kernel Liteos A
1 年多 前同步成功
通知
460
Star
414
Fork
55
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos A
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
e7daa282
编写于
10月 17, 2022
作者:
O
openharmony_ci
提交者:
Gitee
10月 17, 2022
浏览文件
操作
浏览文件
下载
差异文件
!1025 清除一些静态检查工具发现的问题
Merge pull request !1025 from Far/master
上级
ccdfa724
987a722d
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
22 addition
and
25 deletion
+22
-25
fs/jffs2/src/vfs_jffs2.c
fs/jffs2/src/vfs_jffs2.c
+0
-1
fs/vfs/operation/vfs_force_umount.c
fs/vfs/operation/vfs_force_umount.c
+3
-3
fs/vfs/operation/vfs_writev.c
fs/vfs/operation/vfs_writev.c
+0
-1
kernel/base/include/los_vm_dump.h
kernel/base/include/los_vm_dump.h
+1
-1
kernel/base/include/los_vm_filemap.h
kernel/base/include/los_vm_filemap.h
+2
-2
kernel/base/ipc/los_rwlock.c
kernel/base/ipc/los_rwlock.c
+1
-1
kernel/base/ipc/los_signal.c
kernel/base/ipc/los_signal.c
+0
-1
kernel/base/mem/tlsf/los_memory.c
kernel/base/mem/tlsf/los_memory.c
+1
-1
kernel/base/vm/los_vm_dump.c
kernel/base/vm/los_vm_dump.c
+1
-1
kernel/base/vm/los_vm_filemap.c
kernel/base/vm/los_vm_filemap.c
+3
-3
kernel/base/vm/los_vm_map.c
kernel/base/vm/los_vm_map.c
+1
-1
kernel/extended/perf/los_perf.c
kernel/extended/perf/los_perf.c
+1
-1
kernel/extended/power/los_pm.c
kernel/extended/power/los_pm.c
+1
-1
security/vid/vid.c
security/vid/vid.c
+2
-2
testsuites/kernel/sample/kernel_base/core/hwi_nesting/full/It_los_hwi_nesting_007.c
...ernel_base/core/hwi_nesting/full/It_los_hwi_nesting_007.c
+3
-3
testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_005.c
...el/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_005.c
+1
-1
testsuites/unittest/net/netdb/full/net_netdb_test_004.cpp
testsuites/unittest/net/netdb/full/net_netdb_test_004.cpp
+1
-1
未找到文件。
fs/jffs2/src/vfs_jffs2.c
浏览文件 @
e7daa282
...
...
@@ -780,7 +780,6 @@ ssize_t VfsJffs2Readlink(struct Vnode *vnode, char *buffer, size_t bufLen)
cnt
=
(
bufLen
-
1
)
<
targetLen
?
(
bufLen
-
1
)
:
targetLen
;
if
(
LOS_CopyFromKernel
(
buffer
,
bufLen
,
(
const
char
*
)
f
->
target
,
cnt
)
!=
0
)
{
cnt
=
0
;
LOS_MuxUnlock
(
&
g_jffs2FsLock
);
return
-
EFAULT
;
}
...
...
fs/vfs/operation/vfs_force_umount.c
浏览文件 @
e7daa282
...
...
@@ -353,7 +353,7 @@ static struct file_operations_vfs g_errorFileOps = {
.
unlink
=
ErrorFopUnlink
,
};
static
struct
Mount
*
GetDevMountPoint
(
struct
Vnode
*
dev
)
static
struct
Mount
*
GetDevMountPoint
(
const
struct
Vnode
*
dev
)
{
struct
Mount
*
mnt
=
NULL
;
LIST_HEAD
*
mntList
=
GetMountList
();
...
...
@@ -394,7 +394,7 @@ static void FilePreClose(struct file *filep, const struct file_operations_vfs *o
}
}
static
void
FileDisableAndClean
(
struct
Mount
*
mnt
)
static
void
FileDisableAndClean
(
const
struct
Mount
*
mnt
)
{
struct
filelist
*
flist
=
&
tg_filelist
;
struct
file
*
filep
=
NULL
;
...
...
@@ -435,7 +435,7 @@ static void VnodeTryFree(struct Vnode *vnode)
vnode
->
fop
=
&
g_errorFileOps
;
}
static
void
VnodeTryFreeAll
(
struct
Mount
*
mount
)
static
void
VnodeTryFreeAll
(
const
struct
Mount
*
mount
)
{
struct
Vnode
*
vnode
=
NULL
;
struct
Vnode
*
nextVnode
=
NULL
;
...
...
fs/vfs/operation/vfs_writev.c
浏览文件 @
e7daa282
...
...
@@ -66,7 +66,6 @@ static int iov_trans_to_buf(char *buf, ssize_t totallen, const struct iovec *iov
}
else
{
writepart
=
bytestowrite
-
ret
;
curbuf
+=
writepart
;
totallen
-=
writepart
;
break
;
}
}
...
...
kernel/base/include/los_vm_dump.h
浏览文件 @
e7daa282
...
...
@@ -70,7 +70,7 @@ VOID OsVmPhysDump(VOID);
VOID
OsVmPhysUsedInfoGet
(
UINT32
*
usedCount
,
UINT32
*
totalCount
);
INT32
OsRegionOverlapCheck
(
LosVmSpace
*
space
,
LosVmMapRegion
*
region
);
VOID
OsDumpPte
(
VADDR_T
vaddr
);
LosProcessCB
*
OsGetPIDByAspace
(
LosVmSpace
*
space
);
LosProcessCB
*
OsGetPIDByAspace
(
const
LosVmSpace
*
space
);
CHAR
*
OsArchFlagsToStr
(
const
UINT32
archFlags
);
#ifdef __cplusplus
...
...
kernel/base/include/los_vm_filemap.h
浏览文件 @
e7daa282
...
...
@@ -193,7 +193,7 @@ VOID OsVmmFileRegionFree(struct file *filep, LosProcessCB *processCB);
LosFilePage
*
OsPageCacheAlloc
(
struct
page_mapping
*
mapping
,
VM_OFFSET_T
pgoff
);
LosFilePage
*
OsFindGetEntry
(
struct
page_mapping
*
mapping
,
VM_OFFSET_T
pgoff
);
LosMapInfo
*
OsGetMapInfo
(
LosFilePage
*
page
,
LosArchMmu
*
archMmu
,
VADDR_T
vaddr
);
LosMapInfo
*
OsGetMapInfo
(
const
LosFilePage
*
page
,
const
LosArchMmu
*
archMmu
,
VADDR_T
vaddr
);
VOID
OsAddMapInfo
(
LosFilePage
*
page
,
LosArchMmu
*
archMmu
,
VADDR_T
vaddr
);
VOID
OsDelMapInfo
(
LosVmMapRegion
*
region
,
LosVmPgFault
*
pgFault
,
BOOL
cleanDirty
);
VOID
OsFileCacheFlush
(
struct
page_mapping
*
mapping
);
...
...
@@ -208,7 +208,7 @@ VOID OsDeletePageCacheLru(LosFilePage *page);
VOID
OsPageRefDecNoLock
(
LosFilePage
*
page
);
VOID
OsPageRefIncLocked
(
LosFilePage
*
page
);
int
OsTryShrinkMemory
(
size_t
nPage
);
VOID
OsMarkPageDirty
(
LosFilePage
*
fpage
,
LosVmMapRegion
*
region
,
int
off
,
int
len
);
VOID
OsMarkPageDirty
(
LosFilePage
*
fpage
,
const
LosVmMapRegion
*
region
,
int
off
,
int
len
);
#ifdef LOSCFG_DEBUG_VERSION
VOID
ResetPageCacheHitInfo
(
int
*
try
,
int
*
hit
);
...
...
kernel/base/ipc/los_rwlock.c
浏览文件 @
e7daa282
...
...
@@ -96,7 +96,7 @@ UINT32 LOS_RwlockDestroy(LosRwlock *rwlock)
return
LOS_OK
;
}
STATIC
UINT32
OsRwlockCheck
(
LosRwlock
*
rwlock
)
STATIC
UINT32
OsRwlockCheck
(
const
LosRwlock
*
rwlock
)
{
if
(
rwlock
==
NULL
)
{
return
LOS_EINVAL
;
...
...
kernel/base/ipc/los_signal.c
浏览文件 @
e7daa282
...
...
@@ -78,7 +78,6 @@ STATIC VOID OsMoveTmpInfoToUnbInfo(sig_cb *sigcb, INT32 signo)
/* delete tmpinfo from tmpList. */
*
prevHook
=
tmpInfoNode
->
next
;
(
VOID
)
LOS_MemFree
(
m_aucSysMem0
,
tmpInfoNode
);
tmpInfoNode
=
*
prevHook
;
break
;
}
prevHook
=
&
tmpInfoNode
->
next
;
...
...
kernel/base/mem/tlsf/los_memory.c
浏览文件 @
e7daa282
...
...
@@ -918,7 +918,7 @@ STATIC UINT32 OsMemPoolAdd(VOID *pool, UINT32 size)
return
LOS_OK
;
}
STATIC
UINT32
OsMemPoolDelete
(
VOID
*
pool
)
STATIC
UINT32
OsMemPoolDelete
(
const
VOID
*
pool
)
{
UINT32
ret
=
LOS_NOK
;
VOID
*
nextPool
=
NULL
;
...
...
kernel/base/vm/los_vm_dump.c
浏览文件 @
e7daa282
...
...
@@ -253,7 +253,7 @@ UINT32 OsUProcessPmUsage(LosVmSpace *space, UINT32 *sharePm, UINT32 *actualPm)
return
pmSize
;
}
LosProcessCB
*
OsGetPIDByAspace
(
LosVmSpace
*
space
)
LosProcessCB
*
OsGetPIDByAspace
(
const
LosVmSpace
*
space
)
{
UINT32
pid
;
UINT32
intSave
;
...
...
kernel/base/vm/los_vm_filemap.c
浏览文件 @
e7daa282
...
...
@@ -125,10 +125,10 @@ VOID OsAddMapInfo(LosFilePage *page, LosArchMmu *archMmu, VADDR_T vaddr)
page
->
n_maps
++
;
}
LosMapInfo
*
OsGetMapInfo
(
LosFilePage
*
page
,
LosArchMmu
*
archMmu
,
VADDR_T
vaddr
)
LosMapInfo
*
OsGetMapInfo
(
const
LosFilePage
*
page
,
const
LosArchMmu
*
archMmu
,
VADDR_T
vaddr
)
{
LosMapInfo
*
info
=
NULL
;
LOS_DL_LIST
*
immap
=
&
page
->
i_mmap
;
const
LOS_DL_LIST
*
immap
=
&
page
->
i_mmap
;
LOS_DL_LIST_FOR_EACH_ENTRY
(
info
,
immap
,
LosMapInfo
,
node
)
{
if
((
info
->
archMmu
==
archMmu
)
&&
(
info
->
vaddr
==
vaddr
)
&&
(
info
->
page
==
page
))
{
...
...
@@ -214,7 +214,7 @@ VOID OsVmmFileRemove(LosVmMapRegion *region, LosArchMmu *archMmu, VM_OFFSET_T pg
return
;
}
VOID
OsMarkPageDirty
(
LosFilePage
*
fpage
,
LosVmMapRegion
*
region
,
INT32
off
,
INT32
len
)
VOID
OsMarkPageDirty
(
LosFilePage
*
fpage
,
const
LosVmMapRegion
*
region
,
INT32
off
,
INT32
len
)
{
if
(
region
!=
NULL
)
{
OsSetPageDirty
(
fpage
->
vmPage
);
...
...
kernel/base/vm/los_vm_map.c
浏览文件 @
e7daa282
...
...
@@ -233,7 +233,7 @@ LosVmSpace *OsCreateUserVmSpace(VOID)
return
space
;
}
STATIC
BOOL
OsVmSpaceParamCheck
(
LosVmSpace
*
vmSpace
)
STATIC
BOOL
OsVmSpaceParamCheck
(
const
LosVmSpace
*
vmSpace
)
{
if
(
vmSpace
==
NULL
)
{
return
FALSE
;
...
...
kernel/extended/perf/los_perf.c
浏览文件 @
e7daa282
...
...
@@ -289,7 +289,7 @@ STATIC UINT32 OsPerfCollectData(Event *event, PerfSampleData *data, PerfRegs *re
* return TRUE if user haven't specified any taskId(which is supposed
* to instrument the whole system)
*/
STATIC
INLINE
BOOL
OsFilterId
(
UINT32
id
,
UINT32
*
ids
,
UINT8
idsNr
)
STATIC
INLINE
BOOL
OsFilterId
(
UINT32
id
,
const
UINT32
*
ids
,
UINT8
idsNr
)
{
UINT32
i
;
if
(
!
idsNr
)
{
...
...
kernel/extended/power/los_pm.c
浏览文件 @
e7daa282
...
...
@@ -300,7 +300,7 @@ UINT32 LOS_PmRegister(LOS_PmNodeType type, VOID *node)
return
LOS_EINVAL
;
}
STATIC
UINT32
OsPmDeviceUnregister
(
LosPmCB
*
pm
,
LosPmDevice
*
device
)
STATIC
UINT32
OsPmDeviceUnregister
(
LosPmCB
*
pm
,
const
LosPmDevice
*
device
)
{
LOS_SpinLock
(
&
g_pmSpin
);
if
(
pm
->
device
==
device
)
{
...
...
security/vid/vid.c
浏览文件 @
e7daa282
...
...
@@ -116,8 +116,8 @@ static UINT16 GetFreeVid(VOID)
for
(
i
=
0
;
i
<
mapMaxNum
;
i
++
)
{
num
=
idMap
->
bitMap
[
i
];
for
(
j
=
0
;
j
<
INT_BIT_COUNT
;
j
++
)
{
if
((
num
&
(
1
<<
j
))
==
0
)
{
num
|=
1
<<
j
;
if
((
num
&
(
1
U
<<
j
))
==
0
)
{
num
|=
1
U
<<
j
;
idMap
->
bitMap
[
i
]
=
num
;
return
(
INT_BIT_COUNT
*
i
+
j
);
}
...
...
testsuites/kernel/sample/kernel_base/core/hwi_nesting/full/It_los_hwi_nesting_007.c
浏览文件 @
e7daa282
...
...
@@ -49,13 +49,13 @@ static VOID NestingPrioHigh(INT32 irq, VOID *data)
UINT64
curTime
;
curTime
=
LOS_CurrNanosec
();
g_recordTime
[
g_saveIndex
]
=
curTime
-
g_intPendTime
;
if
(
g_saveIndex
==
MAX_RECORD_SIZE
)
{
g_saveIndex
=
0
;
}
dprintf
(
"curTime = %lld, pendTime = %lld
\n
"
,
curTime
,
g_intPendTime
);
dprintf
(
"%lld
\n
"
,
curTime
-
g_intPendTime
);
dprintf
(
"[swtmr] hwi response time : ##%lld
\n
"
,
g_recordTime
[
g_saveIndex
]);
g_saveIndex
++
;
if
(
g_saveIndex
==
MAX_RECORD_SIZE
)
{
g_saveIndex
=
0
;
}
}
static
VOID
DumpResult
()
...
...
testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_005.c
浏览文件 @
e7daa282
...
...
@@ -76,7 +76,7 @@ static void Task01(void)
ICUNIT_GOTO_EQUAL
(
ret
,
LOS_OK
,
ret
,
EXIT2
);
ret
=
memset_s
((
void
*
)(
&
taskInitParam
),
sizeof
(
TSK_INIT_PARAM_S
),
0
,
sizeof
(
TSK_INIT_PARAM_S
));
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT2
;
ICUNIT_GOTO_EQUAL
(
ret
,
0
,
ret
,
EXIT2
)
;
taskInitParam
.
pfnTaskEntry
=
(
TSK_ENTRY_FUNC
)
Task04
;
taskInitParam
.
uwStackSize
=
LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE
;
taskInitParam
.
pcName
=
"SmpCpup005_task04"
;
...
...
testsuites/unittest/net/netdb/full/net_netdb_test_004.cpp
浏览文件 @
e7daa282
...
...
@@ -65,7 +65,7 @@ static int GetHostByAddrTest(void)
addr
=
gethostbyaddr
(
&
ia
,
sizeof
ia
,
AF_INET
);
ICUNIT_ASSERT_EQUAL
(
errno
,
EINVAL
,
errno
);
RecoveryFileEnv
(
pathList
,
file_number
);
RecoveryFileEnv
(
pathList
,
file_number
);
return
ICUNIT_SUCCESS
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录