From 4547ce65a8b00543986dd6f5388c2611dac578ff Mon Sep 17 00:00:00 2001 From: Ziye Yang Date: Thu, 21 Dec 2017 13:25:47 +0800 Subject: [PATCH] iscsi: make some functions into static No need to export these functions since they are not used by other files. Change-Id: Iab5d44667cc0d57ec105e90a71d434cc4e07f4f5 Signed-off-by: Ziye Yang Reviewed-on: https://review.gerrithub.io/392590 Reviewed-by: Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/iscsi/init_grp.c | 24 ++++++++++++------------ lib/iscsi/init_grp.h | 8 -------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/lib/iscsi/init_grp.c b/lib/iscsi/init_grp.c index 34cad2ef1a..0b1d8f74e1 100644 --- a/lib/iscsi/init_grp.c +++ b/lib/iscsi/init_grp.c @@ -295,7 +295,7 @@ spdk_iscsi_init_grp_delete_all_netmasks(struct spdk_iscsi_init_grp *ig) /* Read spdk iscsi target's config file and create initiator group */ -int +static int spdk_iscsi_init_grp_create_from_configfile(struct spdk_conf_section *sp) { int i, rc = 0; @@ -418,6 +418,16 @@ cleanup: return rc; } +static void +spdk_iscsi_init_grp_register(struct spdk_iscsi_init_grp *ig) +{ + assert(ig != NULL); + + pthread_mutex_lock(&g_spdk_iscsi.mutex); + TAILQ_INSERT_TAIL(&g_spdk_iscsi.ig_head, ig, tailq); + pthread_mutex_unlock(&g_spdk_iscsi.mutex); +} + /* * Create initiator group from list of initiator ip/hostnames and netmasks * The initiator hostname/netmask lists are allocated by the caller on the @@ -466,7 +476,7 @@ cleanup: return rc; } -void +static void spdk_iscsi_init_grp_destroy(struct spdk_iscsi_init_grp *ig) { if (!ig) { @@ -492,16 +502,6 @@ spdk_iscsi_init_grp_find_by_tag(int tag) return NULL; } -void -spdk_iscsi_init_grp_register(struct spdk_iscsi_init_grp *ig) -{ - assert(ig != NULL); - - pthread_mutex_lock(&g_spdk_iscsi.mutex); - TAILQ_INSERT_TAIL(&g_spdk_iscsi.ig_head, ig, tailq); - pthread_mutex_unlock(&g_spdk_iscsi.mutex); -} - int spdk_iscsi_init_grp_array_create(void) { diff --git a/lib/iscsi/init_grp.h b/lib/iscsi/init_grp.h index ddf5e0c1e1..bf4f0ac095 100644 --- a/lib/iscsi/init_grp.h +++ b/lib/iscsi/init_grp.h @@ -58,19 +58,11 @@ struct spdk_iscsi_init_grp { }; /* SPDK iSCSI Initiator Group management API */ -int spdk_iscsi_init_grp_create_from_configfile(struct spdk_conf_section *sp); - int spdk_iscsi_init_grp_create_from_initiator_list(int tag, int num_initiator_names, char **initiator_names, int num_initiator_masks, char **initiator_masks); - -void spdk_iscsi_init_grp_destroy(struct spdk_iscsi_init_grp *ig); void spdk_iscsi_init_grp_release(struct spdk_iscsi_init_grp *ig); - struct spdk_iscsi_init_grp *spdk_iscsi_init_grp_find_by_tag(int tag); - -void spdk_iscsi_init_grp_register(struct spdk_iscsi_init_grp *ig); - int spdk_iscsi_init_grp_array_create(void); void spdk_iscsi_init_grp_array_destroy(void);