From: Christoph Hellwig <hch@xxxxxx> Headers under include/ should not include headers that require a specific include path. Fix this by moving the defintion of scsi_port_stats to target_core_base.h, and including target_core_mib.h directly where needed. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx> (cherry picked from commit 0080d7dd72627a04d704196dd06f01af2499061e) --- drivers/target/target_core_configfs.c | 1 + drivers/target/target_core_hba.c | 1 + drivers/target/target_core_mib.h | 7 ------- drivers/target/target_core_tpg.c | 1 + drivers/target/target_core_transport.c | 1 + include/target/target_core_base.h | 8 +++++++- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 656c4fa..96b87da 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -51,6 +51,7 @@ #include "target_core_hba.h" #include "target_core_pr.h" #include "target_core_rd.h" +#include "target_core_mib.h" static struct list_head g_tf_list; static struct mutex g_tf_lock; diff --git a/drivers/target/target_core_hba.c b/drivers/target/target_core_hba.c index 4bbe820..29dc3fa 100644 --- a/drivers/target/target_core_hba.c +++ b/drivers/target/target_core_hba.c @@ -43,6 +43,7 @@ #include <target/target_core_transport.h> #include "target_core_hba.h" +#include "target_core_mib.h" static LIST_HEAD(subsystem_list); static DEFINE_MUTEX(subsystem_mutex); diff --git a/drivers/target/target_core_mib.h b/drivers/target/target_core_mib.h index 2772046..5172674 100644 --- a/drivers/target/target_core_mib.h +++ b/drivers/target/target_core_mib.h @@ -13,13 +13,6 @@ struct scsi_index_table { u32 scsi_mib_index[SCSI_INDEX_TYPE_MAX]; } ____cacheline_aligned; -/* SCSI Port stats */ -struct scsi_port_stats { - u64 cmd_pdus; - u64 tx_data_octets; - u64 rx_data_octets; -} ____cacheline_aligned; - extern int init_scsi_target_mib(void); extern void remove_scsi_target_mib(void); extern void init_scsi_index_table(void); diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index d15deaf..1f69be1 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c @@ -45,6 +45,7 @@ #include <target/target_core_fabric_ops.h> #include "target_core_hba.h" +#include "target_core_mib.h" /* core_clear_initiator_node_from_tpg(): * diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 28b6292..8cb628b 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -58,6 +58,7 @@ #include "target_core_pr.h" #include "target_core_scdb.h" #include "target_core_ua.h" +#include "target_core_mib.h" /* #define DEBUG_CDB_HANDLER */ #ifdef DEBUG_CDB_HANDLER diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 764177b..c071907 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -8,7 +8,6 @@ #include <scsi/scsi_cmnd.h> #include <net/sock.h> #include <net/tcp.h> -#include "target_core_mib.h" #define TARGET_CORE_MOD_VERSION "v4.0.0-rc6" #define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGABRT)) @@ -175,6 +174,13 @@ struct se_obj { atomic_t obj_access_count; } ____cacheline_aligned; +/* SCSI Port stats */ +struct scsi_port_stats { + u64 cmd_pdus; + u64 tx_data_octets; + u64 rx_data_octets; +} ____cacheline_aligned; + /* * Used by TCM Core internally to signal if ALUA emulation is enabled or * disabled, or running in with TCM/pSCSI passthrough mode -- 1.7.3.5 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html