From: Gao Xun gaoxun3@huawei.com
driver inclusion category: Bugfix bugzilla: NA CVE: NA
We updated dfx module related conditional compilation layout to ensure proper compilation when we turnoff dfx in .config file.
Signed-off-by: Gao Xun gaoxun3@huawei.com Reviewed-by: Hu Chunzhi huchunzhi@huawei.com Reviewed-by: Wang Lin wanglin137@huawei.com Reviewed-by: Zhao Weibo zhaoweibo3@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/infiniband/hw/hns/roce-customer/rdfx_entry.c | 3 ++- drivers/infiniband/hw/hns/roce-customer/rdfx_intf.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/hns/roce-customer/rdfx_entry.c b/drivers/infiniband/hw/hns/roce-customer/rdfx_entry.c index 52cb9f7..8c2de43 100644 --- a/drivers/infiniband/hw/hns/roce-customer/rdfx_entry.c +++ b/drivers/infiniband/hw/hns/roce-customer/rdfx_entry.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ // Copyright (c) 2016-2017 Hisilicon Limited. - +#ifdef CONFIG_INFINIBAND_HNS_DFX #include "roce_k_compat.h" #include "rdfx_common.h" #include "rdfx_intf.h" @@ -328,3 +328,4 @@ void rdfx_set_cqe_info(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq, } } EXPORT_SYMBOL_GPL(rdfx_set_cqe_info); +#endif diff --git a/drivers/infiniband/hw/hns/roce-customer/rdfx_intf.c b/drivers/infiniband/hw/hns/roce-customer/rdfx_intf.c index 7561e0ef..9a84e7c 100644 --- a/drivers/infiniband/hw/hns/roce-customer/rdfx_intf.c +++ b/drivers/infiniband/hw/hns/roce-customer/rdfx_intf.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ // Copyright (c) 2016-2017 Hisilicon Limited. - +#ifdef CONFIG_INFINIBAND_HNS_DFX #include "roce_k_compat.h" #include "hns_roce_device.h" #include "hns_roce_common.h" @@ -940,4 +940,4 @@ void rdfx_set_rdfx_cq_ci(struct hns_roce_dev *hr_dev, spin_unlock(&rdfx->cq.cq_lock); } EXPORT_SYMBOL_GPL(rdfx_set_rdfx_cq_ci); - +#endif