Commit 560f43b2 authored by Tang Yizhou's avatar Tang Yizhou Committed by Yang Yingliang
Browse files

share_pool: Extract sp_alloc_prepare

ascend inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4EUVI


CVE: NA

-------------------------------------------------

Refactor sp_alloc to improve its readability.
1. Introduce struct sp_alloc_context to save allocation parameters.
2. Extract sp_alloc_prepare to check input parameters of sp_alloc
and initialize sp_alloc_context instance.

Suggested-by: default avatarZhou Guanghui <zhouguanghui1@huawei.com>
Suggested-by: default avatarWang Wensheng <wangwensheng4@huawei.com>
Signed-off-by: default avatarTang Yizhou <tangyizhou@huawei.com>
Reviewed-by: default avatarDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: default avatarZhou Guanghui <zhouguanghui1@huawei.com>
Reviewed-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent bad65bdf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment