Commit c26002f9 authored by mufengyan's avatar mufengyan Committed by mufengyan
Browse files

UNIC: Using UBL-related macros to isolate UB header files

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAN6V7


CVE: NA

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

To improve the maintainability of the HNS3 and UNIC drivers,
the header files used by the UNIC are isolated by using the
CONFIG_HNS3_UBL macro. Use CONFIG_UB_UDMA_HNS3 to isolate
the header files related to the UDMA and use the CONFIG_UBL
macro to isolate the ubl.h file.

Fixes: 737ec46e ("UNIC: Adds the process of UNIC driver initializing")
Signed-off-by: default avatarmufengyan <mufengyan@hisilicon.com>
parent b3492b88
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7,7 +7,9 @@
#include "hnae3.h"
#include "hns3_debugfs.h"
#include "hns3_enet.h"
#ifdef CONFIG_HNS3_UBL
#include "hns3_unic_debugfs.h"
#endif

static struct dentry *hns3_dbgfs_root;

+4 −0
Original line number Diff line number Diff line
@@ -23,11 +23,15 @@
#include <net/vxlan.h>
#include <net/geneve.h>

#if IS_ENABLED(CONFIG_UBL)
#include "ubl.h"
#endif
#include "hnae3.h"
#include "hnae3_ext.h"
#include "hns3_enet.h"
#ifdef CONFIG_HNS3_UBL
#include "hns3_unic.h"
#endif
#include "hns3_roh.h"
/* All hns3 tracepoints are defined by the include below, which
 * must be included exactly once across the whole kernel with
+2 −0
Original line number Diff line number Diff line
@@ -8,7 +8,9 @@

#include "hns3_enet.h"
#include "hns3_ethtool.h"
#ifdef CONFIG_HNS3_UBL
#include "hns3_unic.h"
#endif

/* tqp related stats */
#define HNS3_TQP_STAT(_string, _member)	{			\
+2 −0
Original line number Diff line number Diff line
@@ -18,7 +18,9 @@
#include "hnae3.h"
#include "hns3_debugfs.h"
#include "hns3_enet.h"
#ifdef CONFIG_HNS3_UBL
#include "hns3_unic_debugfs.h"
#endif

static struct hns3_dbg_dentry_info ub_dbg_dentry[] = {
	{
+4 −0
Original line number Diff line number Diff line
@@ -6,10 +6,14 @@
#include "hclge_debugfs.h"
#include "hclge_err.h"
#include "hclge_main.h"
#ifdef CONFIG_HNS3_UBL
#include "hclge_unic_debugfs.h"
#endif
#include "hclge_regs.h"
#include "hclge_tm.h"
#if IS_ENABLED(CONFIG_UB_UDMA_HNS3)
#include "hclge_udma.h"
#endif
#include "hnae3.h"

static const char * const state_str[] = { "off", "on" };
Loading