aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-09-26 08:00:36 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-10-02 17:41:59 -0400
commitfceb5bc7be7d9a98459fb1e44e1b1bedef094b2c (patch)
treeed0fcf60b2659471692469d1da0f073619aab05c /drivers/target
parentd7ca663c775bd1aafb718bdd6c208b49a9d53f50 (diff)
iscsit: mark various functions static
This patch marks a number of functions static to appease sparse static checking. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target.c2
-rw-r--r--drivers/target/iscsi/iscsi_target.h5
-rw-r--r--drivers/target/iscsi/iscsi_target_configfs.c10
-rw-r--r--drivers/target/iscsi/iscsi_target_erl0.c8
-rw-r--r--drivers/target/iscsi/iscsi_target_erl2.c4
-rw-r--r--drivers/target/iscsi/iscsi_target_login.c4
-rw-r--r--drivers/target/iscsi/iscsi_target_nego.c2
-rw-r--r--drivers/target/iscsi/iscsi_target_tmr.c6
-rw-r--r--drivers/target/iscsi/iscsi_target_tq.c6
-rw-r--r--drivers/target/iscsi/iscsi_target_tq.h1
10 files changed, 23 insertions, 25 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 632a5aeb14d9..cca6d1384a1f 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -427,7 +427,7 @@ int iscsit_reset_np_thread(
427 return 0; 427 return 0;
428} 428}
429 429
430int iscsit_del_np_comm(struct iscsi_np *np) 430static int iscsit_del_np_comm(struct iscsi_np *np)
431{ 431{
432 if (np->np_socket) 432 if (np->np_socket)
433 sock_release(np->np_socket); 433 sock_release(np->np_socket);
diff --git a/drivers/target/iscsi/iscsi_target.h b/drivers/target/iscsi/iscsi_target.h
index 12abb4c9e34e..f1e4f3155bac 100644
--- a/drivers/target/iscsi/iscsi_target.h
+++ b/drivers/target/iscsi/iscsi_target.h
@@ -38,4 +38,9 @@ extern struct kmem_cache *lio_cmd_cache;
38extern struct kmem_cache *lio_qr_cache; 38extern struct kmem_cache *lio_qr_cache;
39extern struct kmem_cache *lio_r2t_cache; 39extern struct kmem_cache *lio_r2t_cache;
40 40
41extern struct idr sess_idr;
42extern struct mutex auth_id_lock;
43extern spinlock_t sess_idr_lock;
44
45
41#endif /*** ISCSI_TARGET_H ***/ 46#endif /*** ISCSI_TARGET_H ***/
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c
index f491f969ab95..8c9955f51c5d 100644
--- a/drivers/target/iscsi/iscsi_target_configfs.c
+++ b/drivers/target/iscsi/iscsi_target_configfs.c
@@ -135,7 +135,7 @@ static struct configfs_attribute *lio_target_portal_attrs[] = {
135 135
136#define MAX_PORTAL_LEN 256 136#define MAX_PORTAL_LEN 256
137 137
138struct se_tpg_np *lio_target_call_addnptotpg( 138static struct se_tpg_np *lio_target_call_addnptotpg(
139 struct se_portal_group *se_tpg, 139 struct se_portal_group *se_tpg,
140 struct config_group *group, 140 struct config_group *group,
141 const char *name) 141 const char *name)
@@ -1170,7 +1170,7 @@ static struct configfs_attribute *lio_target_tpg_attrs[] = {
1170 1170
1171/* Start items for lio_target_tiqn_cit */ 1171/* Start items for lio_target_tiqn_cit */
1172 1172
1173struct se_portal_group *lio_target_tiqn_addtpg( 1173static struct se_portal_group *lio_target_tiqn_addtpg(
1174 struct se_wwn *wwn, 1174 struct se_wwn *wwn,
1175 struct config_group *group, 1175 struct config_group *group,
1176 const char *name) 1176 const char *name)
@@ -1220,7 +1220,7 @@ out:
1220 return NULL; 1220 return NULL;
1221} 1221}
1222 1222
1223void lio_target_tiqn_deltpg(struct se_portal_group *se_tpg) 1223static void lio_target_tiqn_deltpg(struct se_portal_group *se_tpg)
1224{ 1224{
1225 struct iscsi_portal_group *tpg; 1225 struct iscsi_portal_group *tpg;
1226 struct iscsi_tiqn *tiqn; 1226 struct iscsi_tiqn *tiqn;
@@ -1252,7 +1252,7 @@ static struct configfs_attribute *lio_target_wwn_attrs[] = {
1252 NULL, 1252 NULL,
1253}; 1253};
1254 1254
1255struct se_wwn *lio_target_call_coreaddtiqn( 1255static struct se_wwn *lio_target_call_coreaddtiqn(
1256 struct target_fabric_configfs *tf, 1256 struct target_fabric_configfs *tf,
1257 struct config_group *group, 1257 struct config_group *group,
1258 const char *name) 1258 const char *name)
@@ -1300,7 +1300,7 @@ struct se_wwn *lio_target_call_coreaddtiqn(
1300 return &tiqn->tiqn_wwn; 1300 return &tiqn->tiqn_wwn;
1301} 1301}
1302 1302
1303void lio_target_call_coredeltiqn( 1303static void lio_target_call_coredeltiqn(
1304 struct se_wwn *wwn) 1304 struct se_wwn *wwn)
1305{ 1305{
1306 struct iscsi_tiqn *tiqn = container_of(wwn, struct iscsi_tiqn, tiqn_wwn); 1306 struct iscsi_tiqn *tiqn = container_of(wwn, struct iscsi_tiqn, tiqn_wwn);
diff --git a/drivers/target/iscsi/iscsi_target_erl0.c b/drivers/target/iscsi/iscsi_target_erl0.c
index 2067efd2b7f7..0c37533ccbb5 100644
--- a/drivers/target/iscsi/iscsi_target_erl0.c
+++ b/drivers/target/iscsi/iscsi_target_erl0.c
@@ -685,7 +685,7 @@ recover:
685 * Called from iscsit_handle_data_out() before DataOUT Payload is received 685 * Called from iscsit_handle_data_out() before DataOUT Payload is received
686 * and CRC computed. 686 * and CRC computed.
687 */ 687 */
688extern int iscsit_check_pre_dataout( 688int iscsit_check_pre_dataout(
689 struct iscsi_cmd *cmd, 689 struct iscsi_cmd *cmd,
690 unsigned char *buf) 690 unsigned char *buf)
691{ 691{
@@ -789,7 +789,7 @@ static void iscsit_handle_time2retain_timeout(unsigned long data)
789 target_put_session(sess->se_sess); 789 target_put_session(sess->se_sess);
790} 790}
791 791
792extern void iscsit_start_time2retain_handler(struct iscsi_session *sess) 792void iscsit_start_time2retain_handler(struct iscsi_session *sess)
793{ 793{
794 int tpg_active; 794 int tpg_active;
795 /* 795 /*
@@ -822,7 +822,7 @@ extern void iscsit_start_time2retain_handler(struct iscsi_session *sess)
822/* 822/*
823 * Called with spin_lock_bh(&struct se_portal_group->session_lock) held 823 * Called with spin_lock_bh(&struct se_portal_group->session_lock) held
824 */ 824 */
825extern int iscsit_stop_time2retain_timer(struct iscsi_session *sess) 825int iscsit_stop_time2retain_timer(struct iscsi_session *sess)
826{ 826{
827 struct iscsi_portal_group *tpg = ISCSI_TPG_S(sess); 827 struct iscsi_portal_group *tpg = ISCSI_TPG_S(sess);
828 struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; 828 struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
@@ -926,7 +926,7 @@ static void iscsit_handle_connection_cleanup(struct iscsi_conn *conn)
926 } 926 }
927} 927}
928 928
929extern void iscsit_take_action_for_connection_exit(struct iscsi_conn *conn) 929void iscsit_take_action_for_connection_exit(struct iscsi_conn *conn)
930{ 930{
931 spin_lock_bh(&conn->state_lock); 931 spin_lock_bh(&conn->state_lock);
932 if (atomic_read(&conn->connection_exit)) { 932 if (atomic_read(&conn->connection_exit)) {
diff --git a/drivers/target/iscsi/iscsi_target_erl2.c b/drivers/target/iscsi/iscsi_target_erl2.c
index 667c19cc3b28..660694544128 100644
--- a/drivers/target/iscsi/iscsi_target_erl2.c
+++ b/drivers/target/iscsi/iscsi_target_erl2.c
@@ -193,15 +193,13 @@ int iscsit_remove_active_connection_recovery_entry(
193 return 0; 193 return 0;
194} 194}
195 195
196int iscsit_remove_inactive_connection_recovery_entry( 196static void iscsit_remove_inactive_connection_recovery_entry(
197 struct iscsi_conn_recovery *cr, 197 struct iscsi_conn_recovery *cr,
198 struct iscsi_session *sess) 198 struct iscsi_session *sess)
199{ 199{
200 spin_lock(&sess->cr_i_lock); 200 spin_lock(&sess->cr_i_lock);
201 list_del(&cr->cr_list); 201 list_del(&cr->cr_list);
202 spin_unlock(&sess->cr_i_lock); 202 spin_unlock(&sess->cr_i_lock);
203
204 return 0;
205} 203}
206 204
207/* 205/*
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
index 6aba4395e8d8..1e5d05011915 100644
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
@@ -39,10 +39,6 @@
39#include "iscsi_target.h" 39#include "iscsi_target.h"
40#include "iscsi_target_parameters.h" 40#include "iscsi_target_parameters.h"
41 41
42extern struct idr sess_idr;
43extern struct mutex auth_id_lock;
44extern spinlock_t sess_idr_lock;
45
46static int iscsi_login_init_conn(struct iscsi_conn *conn) 42static int iscsi_login_init_conn(struct iscsi_conn *conn)
47{ 43{
48 INIT_LIST_HEAD(&conn->conn_list); 44 INIT_LIST_HEAD(&conn->conn_list);
diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c
index d08373fa8caf..42b1c50d296a 100644
--- a/drivers/target/iscsi/iscsi_target_nego.c
+++ b/drivers/target/iscsi/iscsi_target_nego.c
@@ -44,7 +44,7 @@ void convert_null_to_semi(char *buf, int len)
44 buf[i] = ';'; 44 buf[i] = ';';
45} 45}
46 46
47int strlen_semi(char *buf) 47static int strlen_semi(char *buf)
48{ 48{
49 int i = 0; 49 int i = 0;
50 50
diff --git a/drivers/target/iscsi/iscsi_target_tmr.c b/drivers/target/iscsi/iscsi_target_tmr.c
index 05d2e6445ade..f15462bfafd2 100644
--- a/drivers/target/iscsi/iscsi_target_tmr.c
+++ b/drivers/target/iscsi/iscsi_target_tmr.c
@@ -462,7 +462,7 @@ static int iscsit_task_reassign_complete(
462 * Right now the only one that its really needed for is 462 * Right now the only one that its really needed for is
463 * connection recovery releated TASK_REASSIGN. 463 * connection recovery releated TASK_REASSIGN.
464 */ 464 */
465extern int iscsit_tmr_post_handler(struct iscsi_cmd *cmd, struct iscsi_conn *conn) 465int iscsit_tmr_post_handler(struct iscsi_cmd *cmd, struct iscsi_conn *conn)
466{ 466{
467 struct iscsi_tmr_req *tmr_req = cmd->tmr_req; 467 struct iscsi_tmr_req *tmr_req = cmd->tmr_req;
468 struct se_tmr_req *se_tmr = cmd->se_cmd.se_tmr_req; 468 struct se_tmr_req *se_tmr = cmd->se_cmd.se_tmr_req;
@@ -477,7 +477,7 @@ extern int iscsit_tmr_post_handler(struct iscsi_cmd *cmd, struct iscsi_conn *con
477/* 477/*
478 * Nothing to do here, but leave it for good measure. :-) 478 * Nothing to do here, but leave it for good measure. :-)
479 */ 479 */
480int iscsit_task_reassign_prepare_read( 480static int iscsit_task_reassign_prepare_read(
481 struct iscsi_tmr_req *tmr_req, 481 struct iscsi_tmr_req *tmr_req,
482 struct iscsi_conn *conn) 482 struct iscsi_conn *conn)
483{ 483{
@@ -552,7 +552,7 @@ static void iscsit_task_reassign_prepare_unsolicited_dataout(
552 } 552 }
553} 553}
554 554
555int iscsit_task_reassign_prepare_write( 555static int iscsit_task_reassign_prepare_write(
556 struct iscsi_tmr_req *tmr_req, 556 struct iscsi_tmr_req *tmr_req,
557 struct iscsi_conn *conn) 557 struct iscsi_conn *conn)
558{ 558{
diff --git a/drivers/target/iscsi/iscsi_target_tq.c b/drivers/target/iscsi/iscsi_target_tq.c
index 977e1cf90e83..9d881a000e42 100644
--- a/drivers/target/iscsi/iscsi_target_tq.c
+++ b/drivers/target/iscsi/iscsi_target_tq.c
@@ -40,7 +40,7 @@ static void iscsi_add_ts_to_active_list(struct iscsi_thread_set *ts)
40 spin_unlock(&active_ts_lock); 40 spin_unlock(&active_ts_lock);
41} 41}
42 42
43extern void iscsi_add_ts_to_inactive_list(struct iscsi_thread_set *ts) 43static void iscsi_add_ts_to_inactive_list(struct iscsi_thread_set *ts)
44{ 44{
45 spin_lock(&inactive_ts_lock); 45 spin_lock(&inactive_ts_lock);
46 list_add_tail(&ts->ts_list, &inactive_ts_list); 46 list_add_tail(&ts->ts_list, &inactive_ts_list);
@@ -76,7 +76,7 @@ static struct iscsi_thread_set *iscsi_get_ts_from_inactive_list(void)
76 return ts; 76 return ts;
77} 77}
78 78
79extern int iscsi_allocate_thread_sets(u32 thread_pair_count) 79int iscsi_allocate_thread_sets(u32 thread_pair_count)
80{ 80{
81 int allocated_thread_pair_count = 0, i, thread_id; 81 int allocated_thread_pair_count = 0, i, thread_id;
82 struct iscsi_thread_set *ts = NULL; 82 struct iscsi_thread_set *ts = NULL;
@@ -140,7 +140,7 @@ extern int iscsi_allocate_thread_sets(u32 thread_pair_count)
140 return allocated_thread_pair_count; 140 return allocated_thread_pair_count;
141} 141}
142 142
143extern void iscsi_deallocate_thread_sets(void) 143void iscsi_deallocate_thread_sets(void)
144{ 144{
145 u32 released_count = 0; 145 u32 released_count = 0;
146 struct iscsi_thread_set *ts = NULL; 146 struct iscsi_thread_set *ts = NULL;
diff --git a/drivers/target/iscsi/iscsi_target_tq.h b/drivers/target/iscsi/iscsi_target_tq.h
index 26e6a95ec203..547d11831282 100644
--- a/drivers/target/iscsi/iscsi_target_tq.h
+++ b/drivers/target/iscsi/iscsi_target_tq.h
@@ -5,7 +5,6 @@
5 * Defines for thread sets. 5 * Defines for thread sets.
6 */ 6 */
7extern int iscsi_thread_set_force_reinstatement(struct iscsi_conn *); 7extern int iscsi_thread_set_force_reinstatement(struct iscsi_conn *);
8extern void iscsi_add_ts_to_inactive_list(struct iscsi_thread_set *);
9extern int iscsi_allocate_thread_sets(u32); 8extern int iscsi_allocate_thread_sets(u32);
10extern void iscsi_deallocate_thread_sets(void); 9extern void iscsi_deallocate_thread_sets(void);
11extern void iscsi_activate_thread_set(struct iscsi_conn *, struct iscsi_thread_set *); 10extern void iscsi_activate_thread_set(struct iscsi_conn *, struct iscsi_thread_set *);