From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> This patch moves g_lun0_dev and default_lu_gp from their locations in .c files to proper .h locations to appease sparse. Reported-by: Fubo Chen <fubo.chen@xxxxxxxxx> Reported-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> --- drivers/target/target_core_alua.c | 2 -- drivers/target/target_core_device.c | 2 -- drivers/target/target_core_tpg.c | 2 -- include/target/target_core_configfs.h | 3 +++ include/target/target_core_tpg.h | 3 +++ 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c index 9171ff9..175b1d0 100644 --- a/drivers/target/target_core_alua.c +++ b/drivers/target/target_core_alua.c @@ -52,8 +52,6 @@ static u32 alua_lu_gps_count; static DEFINE_SPINLOCK(lu_gps_lock); static LIST_HEAD(lu_gps_list); -struct t10_alua_lu_gp *default_lu_gp; - /* * REPORT_TARGET_PORT_GROUPS * diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index f4eee59..da3dc8d 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -56,8 +56,6 @@ static void se_dev_stop(struct se_device *dev); static struct se_hba *lun0_hba; static struct se_subsystem_dev *lun0_su_dev; -/* not static, needed by tpg.c */ -struct se_device *g_lun0_dev; int transport_lookup_cmd_lun(struct se_cmd *se_cmd, u32 unpacked_lun) { diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index 4f1ba4c..18f51b5 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c @@ -46,8 +46,6 @@ #include "target_core_hba.h" #include "target_core_stat.h" -extern struct se_device *g_lun0_dev; - static DEFINE_SPINLOCK(tpg_lock); static LIST_HEAD(tpg_list); diff --git a/include/target/target_core_configfs.h b/include/target/target_core_configfs.h index 6125095..ce95fa8 100644 --- a/include/target/target_core_configfs.h +++ b/include/target/target_core_configfs.h @@ -5,6 +5,9 @@ #define TARGET_CORE_NAME_MAX_LEN 64 #define TARGET_FABRIC_NAME_SIZE 32 +/* Used by target_core_alua.c */ +extern struct t10_alua_lu_gp *default_lu_gp; + extern struct target_fabric_configfs *target_fabric_configfs_init( struct module *, const char *); extern void target_fabric_configfs_free(struct target_fabric_configfs *); diff --git a/include/target/target_core_tpg.h b/include/target/target_core_tpg.h index 77e1872..dae2b29 100644 --- a/include/target/target_core_tpg.h +++ b/include/target/target_core_tpg.h @@ -1,6 +1,9 @@ #ifndef TARGET_CORE_TPG_H #define TARGET_CORE_TPG_H +/* Used by target_core_device.c */ +extern struct se_device *g_lun0_dev; + extern struct se_node_acl *__core_tpg_get_initiator_node_acl(struct se_portal_group *tpg, const char *); extern struct se_node_acl *core_tpg_get_initiator_node_acl(struct se_portal_group *tpg, -- 1.7.6 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html