未验证 提交 95f7cf16 编写于 作者: O openharmony_ci 提交者: Gitee

!770 LOS_PaddrToKVaddr函数的实现存在冗余修改

Merge pull request !770 from 闻飞/OpenHarmony-3.0-LTS
......@@ -479,16 +479,6 @@ VOID LOS_PhysPagesFreeContiguous(VOID *ptr, size_t nPages)
VADDR_T *LOS_PaddrToKVaddr(PADDR_T paddr)
{
struct VmPhysSeg *seg = NULL;
UINT32 segID;
for (segID = 0; segID < g_vmPhysSegNum; segID++) {
seg = &g_vmPhysSeg[segID];
if ((paddr >= seg->start) && (paddr < (seg->start + seg->size))) {
return (VADDR_T *)(UINTPTR)(paddr - SYS_MEM_BASE + KERNEL_ASPACE_BASE);
}
}
return (VADDR_T *)(UINTPTR)(paddr - SYS_MEM_BASE + KERNEL_ASPACE_BASE);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册