提交 a1f7ffd9 编写于 作者: Y Yangyang Li 提交者: Xie XiuQi

RDMA/hns: Eliminate compilation alarms in arch x86

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

Add type cast to eliminiate compilation alarms. Use "virt_to_page" and
"page_to_pfn" which supported by X86 platform instead of
unsupported interface "virt_to_pfn".

Feature or Bugfix:Bugfix
Signed-off-by: NYangyang Li <liyangyang20@huawei.com>
Reviewed-by: Nchenglang <chenglang@huawei.com>
Reviewed-by: Noulijun <oulijun@huawei.com>
Reviewed-by: Nliweihang <liweihang@hisilicon.com>
Reviewed-by: Nliuyixian <liuyixian@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 a22e7a2c
......@@ -2536,7 +2536,7 @@ static int hns_roce_v2_init(struct hns_roce_dev *hr_dev)
hns_roce_free_link_table(hr_dev, &priv->tsq);
err_tsq_init_failed:
free_page(hr_dev->reset_page);
free_page((unsigned long)hr_dev->reset_page);
return ret;
}
......@@ -2550,7 +2550,7 @@ static void hns_roce_v2_exit(struct hns_roce_dev *hr_dev)
hns_roce_free_link_table(hr_dev, &priv->tpq);
hns_roce_free_link_table(hr_dev, &priv->tsq);
free_page(hr_dev->reset_page);
free_page((unsigned long)hr_dev->reset_page);
}
static int hns_roce_query_mbox_status(struct hns_roce_dev *hr_dev)
......
......@@ -660,7 +660,7 @@ static int hns_roce_mmap(struct ib_ucontext *context,
if (hr_dev->reset_page)
if (remap_pfn_range(vma, vma->vm_start,
virt_to_pfn(hr_dev->reset_page),
page_to_pfn(virt_to_page(hr_dev->reset_page)),
PAGE_SIZE, vma->vm_page_prot)) {
dev_err(hr_dev->dev,
"mmap reset page failed.\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册