mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
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>
This commit is contained in:
parent
d7ca663c77
commit
fceb5bc7be
10 changed files with 23 additions and 25 deletions
|
@ -427,7 +427,7 @@ int iscsit_reset_np_thread(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int iscsit_del_np_comm(struct iscsi_np *np)
|
static int iscsit_del_np_comm(struct iscsi_np *np)
|
||||||
{
|
{
|
||||||
if (np->np_socket)
|
if (np->np_socket)
|
||||||
sock_release(np->np_socket);
|
sock_release(np->np_socket);
|
||||||
|
|
|
@ -38,4 +38,9 @@ extern struct kmem_cache *lio_cmd_cache;
|
||||||
extern struct kmem_cache *lio_qr_cache;
|
extern struct kmem_cache *lio_qr_cache;
|
||||||
extern struct kmem_cache *lio_r2t_cache;
|
extern struct kmem_cache *lio_r2t_cache;
|
||||||
|
|
||||||
|
extern struct idr sess_idr;
|
||||||
|
extern struct mutex auth_id_lock;
|
||||||
|
extern spinlock_t sess_idr_lock;
|
||||||
|
|
||||||
|
|
||||||
#endif /*** ISCSI_TARGET_H ***/
|
#endif /*** ISCSI_TARGET_H ***/
|
||||||
|
|
|
@ -135,7 +135,7 @@ static struct configfs_attribute *lio_target_portal_attrs[] = {
|
||||||
|
|
||||||
#define MAX_PORTAL_LEN 256
|
#define MAX_PORTAL_LEN 256
|
||||||
|
|
||||||
struct se_tpg_np *lio_target_call_addnptotpg(
|
static struct se_tpg_np *lio_target_call_addnptotpg(
|
||||||
struct se_portal_group *se_tpg,
|
struct se_portal_group *se_tpg,
|
||||||
struct config_group *group,
|
struct config_group *group,
|
||||||
const char *name)
|
const char *name)
|
||||||
|
@ -1170,7 +1170,7 @@ static struct configfs_attribute *lio_target_tpg_attrs[] = {
|
||||||
|
|
||||||
/* Start items for lio_target_tiqn_cit */
|
/* Start items for lio_target_tiqn_cit */
|
||||||
|
|
||||||
struct se_portal_group *lio_target_tiqn_addtpg(
|
static struct se_portal_group *lio_target_tiqn_addtpg(
|
||||||
struct se_wwn *wwn,
|
struct se_wwn *wwn,
|
||||||
struct config_group *group,
|
struct config_group *group,
|
||||||
const char *name)
|
const char *name)
|
||||||
|
@ -1220,7 +1220,7 @@ out:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lio_target_tiqn_deltpg(struct se_portal_group *se_tpg)
|
static void lio_target_tiqn_deltpg(struct se_portal_group *se_tpg)
|
||||||
{
|
{
|
||||||
struct iscsi_portal_group *tpg;
|
struct iscsi_portal_group *tpg;
|
||||||
struct iscsi_tiqn *tiqn;
|
struct iscsi_tiqn *tiqn;
|
||||||
|
@ -1252,7 +1252,7 @@ static struct configfs_attribute *lio_target_wwn_attrs[] = {
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct se_wwn *lio_target_call_coreaddtiqn(
|
static struct se_wwn *lio_target_call_coreaddtiqn(
|
||||||
struct target_fabric_configfs *tf,
|
struct target_fabric_configfs *tf,
|
||||||
struct config_group *group,
|
struct config_group *group,
|
||||||
const char *name)
|
const char *name)
|
||||||
|
@ -1300,7 +1300,7 @@ struct se_wwn *lio_target_call_coreaddtiqn(
|
||||||
return &tiqn->tiqn_wwn;
|
return &tiqn->tiqn_wwn;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lio_target_call_coredeltiqn(
|
static void lio_target_call_coredeltiqn(
|
||||||
struct se_wwn *wwn)
|
struct se_wwn *wwn)
|
||||||
{
|
{
|
||||||
struct iscsi_tiqn *tiqn = container_of(wwn, struct iscsi_tiqn, tiqn_wwn);
|
struct iscsi_tiqn *tiqn = container_of(wwn, struct iscsi_tiqn, tiqn_wwn);
|
||||||
|
|
|
@ -685,7 +685,7 @@ recover:
|
||||||
* Called from iscsit_handle_data_out() before DataOUT Payload is received
|
* Called from iscsit_handle_data_out() before DataOUT Payload is received
|
||||||
* and CRC computed.
|
* and CRC computed.
|
||||||
*/
|
*/
|
||||||
extern int iscsit_check_pre_dataout(
|
int iscsit_check_pre_dataout(
|
||||||
struct iscsi_cmd *cmd,
|
struct iscsi_cmd *cmd,
|
||||||
unsigned char *buf)
|
unsigned char *buf)
|
||||||
{
|
{
|
||||||
|
@ -789,7 +789,7 @@ static void iscsit_handle_time2retain_timeout(unsigned long data)
|
||||||
target_put_session(sess->se_sess);
|
target_put_session(sess->se_sess);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void iscsit_start_time2retain_handler(struct iscsi_session *sess)
|
void iscsit_start_time2retain_handler(struct iscsi_session *sess)
|
||||||
{
|
{
|
||||||
int tpg_active;
|
int tpg_active;
|
||||||
/*
|
/*
|
||||||
|
@ -822,7 +822,7 @@ extern void iscsit_start_time2retain_handler(struct iscsi_session *sess)
|
||||||
/*
|
/*
|
||||||
* Called with spin_lock_bh(&struct se_portal_group->session_lock) held
|
* Called with spin_lock_bh(&struct se_portal_group->session_lock) held
|
||||||
*/
|
*/
|
||||||
extern int iscsit_stop_time2retain_timer(struct iscsi_session *sess)
|
int iscsit_stop_time2retain_timer(struct iscsi_session *sess)
|
||||||
{
|
{
|
||||||
struct iscsi_portal_group *tpg = ISCSI_TPG_S(sess);
|
struct iscsi_portal_group *tpg = ISCSI_TPG_S(sess);
|
||||||
struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
|
struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
|
||||||
|
@ -926,7 +926,7 @@ static void iscsit_handle_connection_cleanup(struct iscsi_conn *conn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void iscsit_take_action_for_connection_exit(struct iscsi_conn *conn)
|
void iscsit_take_action_for_connection_exit(struct iscsi_conn *conn)
|
||||||
{
|
{
|
||||||
spin_lock_bh(&conn->state_lock);
|
spin_lock_bh(&conn->state_lock);
|
||||||
if (atomic_read(&conn->connection_exit)) {
|
if (atomic_read(&conn->connection_exit)) {
|
||||||
|
|
|
@ -193,15 +193,13 @@ int iscsit_remove_active_connection_recovery_entry(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int iscsit_remove_inactive_connection_recovery_entry(
|
static void iscsit_remove_inactive_connection_recovery_entry(
|
||||||
struct iscsi_conn_recovery *cr,
|
struct iscsi_conn_recovery *cr,
|
||||||
struct iscsi_session *sess)
|
struct iscsi_session *sess)
|
||||||
{
|
{
|
||||||
spin_lock(&sess->cr_i_lock);
|
spin_lock(&sess->cr_i_lock);
|
||||||
list_del(&cr->cr_list);
|
list_del(&cr->cr_list);
|
||||||
spin_unlock(&sess->cr_i_lock);
|
spin_unlock(&sess->cr_i_lock);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -39,10 +39,6 @@
|
||||||
#include "iscsi_target.h"
|
#include "iscsi_target.h"
|
||||||
#include "iscsi_target_parameters.h"
|
#include "iscsi_target_parameters.h"
|
||||||
|
|
||||||
extern struct idr sess_idr;
|
|
||||||
extern struct mutex auth_id_lock;
|
|
||||||
extern spinlock_t sess_idr_lock;
|
|
||||||
|
|
||||||
static int iscsi_login_init_conn(struct iscsi_conn *conn)
|
static int iscsi_login_init_conn(struct iscsi_conn *conn)
|
||||||
{
|
{
|
||||||
INIT_LIST_HEAD(&conn->conn_list);
|
INIT_LIST_HEAD(&conn->conn_list);
|
||||||
|
|
|
@ -44,7 +44,7 @@ void convert_null_to_semi(char *buf, int len)
|
||||||
buf[i] = ';';
|
buf[i] = ';';
|
||||||
}
|
}
|
||||||
|
|
||||||
int strlen_semi(char *buf)
|
static int strlen_semi(char *buf)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
|
|
@ -462,7 +462,7 @@ static int iscsit_task_reassign_complete(
|
||||||
* Right now the only one that its really needed for is
|
* Right now the only one that its really needed for is
|
||||||
* connection recovery releated TASK_REASSIGN.
|
* connection recovery releated TASK_REASSIGN.
|
||||||
*/
|
*/
|
||||||
extern int iscsit_tmr_post_handler(struct iscsi_cmd *cmd, struct iscsi_conn *conn)
|
int iscsit_tmr_post_handler(struct iscsi_cmd *cmd, struct iscsi_conn *conn)
|
||||||
{
|
{
|
||||||
struct iscsi_tmr_req *tmr_req = cmd->tmr_req;
|
struct iscsi_tmr_req *tmr_req = cmd->tmr_req;
|
||||||
struct se_tmr_req *se_tmr = cmd->se_cmd.se_tmr_req;
|
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
|
||||||
/*
|
/*
|
||||||
* Nothing to do here, but leave it for good measure. :-)
|
* Nothing to do here, but leave it for good measure. :-)
|
||||||
*/
|
*/
|
||||||
int iscsit_task_reassign_prepare_read(
|
static int iscsit_task_reassign_prepare_read(
|
||||||
struct iscsi_tmr_req *tmr_req,
|
struct iscsi_tmr_req *tmr_req,
|
||||||
struct iscsi_conn *conn)
|
struct iscsi_conn *conn)
|
||||||
{
|
{
|
||||||
|
@ -552,7 +552,7 @@ static void iscsit_task_reassign_prepare_unsolicited_dataout(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int iscsit_task_reassign_prepare_write(
|
static int iscsit_task_reassign_prepare_write(
|
||||||
struct iscsi_tmr_req *tmr_req,
|
struct iscsi_tmr_req *tmr_req,
|
||||||
struct iscsi_conn *conn)
|
struct iscsi_conn *conn)
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@ static void iscsi_add_ts_to_active_list(struct iscsi_thread_set *ts)
|
||||||
spin_unlock(&active_ts_lock);
|
spin_unlock(&active_ts_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void iscsi_add_ts_to_inactive_list(struct iscsi_thread_set *ts)
|
static void iscsi_add_ts_to_inactive_list(struct iscsi_thread_set *ts)
|
||||||
{
|
{
|
||||||
spin_lock(&inactive_ts_lock);
|
spin_lock(&inactive_ts_lock);
|
||||||
list_add_tail(&ts->ts_list, &inactive_ts_list);
|
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)
|
||||||
return ts;
|
return ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int iscsi_allocate_thread_sets(u32 thread_pair_count)
|
int iscsi_allocate_thread_sets(u32 thread_pair_count)
|
||||||
{
|
{
|
||||||
int allocated_thread_pair_count = 0, i, thread_id;
|
int allocated_thread_pair_count = 0, i, thread_id;
|
||||||
struct iscsi_thread_set *ts = NULL;
|
struct iscsi_thread_set *ts = NULL;
|
||||||
|
@ -140,7 +140,7 @@ extern int iscsi_allocate_thread_sets(u32 thread_pair_count)
|
||||||
return allocated_thread_pair_count;
|
return allocated_thread_pair_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void iscsi_deallocate_thread_sets(void)
|
void iscsi_deallocate_thread_sets(void)
|
||||||
{
|
{
|
||||||
u32 released_count = 0;
|
u32 released_count = 0;
|
||||||
struct iscsi_thread_set *ts = NULL;
|
struct iscsi_thread_set *ts = NULL;
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
* Defines for thread sets.
|
* Defines for thread sets.
|
||||||
*/
|
*/
|
||||||
extern int iscsi_thread_set_force_reinstatement(struct iscsi_conn *);
|
extern int iscsi_thread_set_force_reinstatement(struct iscsi_conn *);
|
||||||
extern void iscsi_add_ts_to_inactive_list(struct iscsi_thread_set *);
|
|
||||||
extern int iscsi_allocate_thread_sets(u32);
|
extern int iscsi_allocate_thread_sets(u32);
|
||||||
extern void iscsi_deallocate_thread_sets(void);
|
extern void iscsi_deallocate_thread_sets(void);
|
||||||
extern void iscsi_activate_thread_set(struct iscsi_conn *, struct iscsi_thread_set *);
|
extern void iscsi_activate_thread_set(struct iscsi_conn *, struct iscsi_thread_set *);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue