RDMA/hns: Refactor mtr_init_buf_cfg()
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5Y79T ------------------------------------------------------------------- page_shift and page_cnt is only used in mtr_map_bufs(). And these parameter could be calculated indepedently. Strip the computation of page_shift and page_cnt from mtr_init_buf_cfg(), reducing the number of parameters of it. This help reducing coupling between mtr_inif_buf_cfg() and mtr_map_bufs(). And the parameter validation in mtr_init_buf_cfg has also been abstracted into a separate function and placed at the beginning of the function. Signed-off-by:Chengchang Tang <tangchengchang@huawei.com> Reviewed-by:
Yangyang Li <liyangyang20@huawei.com> Reviewed-by:
YueHaibing <yuehaibing@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment