Cleanups after "make namespacecheck"

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@593 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2008-12-03 11:59:41 +00:00
parent 0961dd7433
commit e7e7c386f9
11 changed files with 37 additions and 64 deletions

View File

@@ -544,20 +544,6 @@ struct file_operations ctr_fops = {
};
#ifdef CONFIG_SCST_DEBUG
void iscsi_dump_iov(struct msghdr *msg)
{
if (trace_flag & TRACE_D_IOV) {
int i;
printk(LOG_FLAG "%p, %zd\n", msg->msg_iov, msg->msg_iovlen);
for (i = 0; i < min_t(size_t, msg->msg_iovlen,
ISCSI_CONN_IOV_MAX); i++) {
printk(LOG_FLAG "%d: %p,%zd\n",
i, msg->msg_iov[i].iov_base,
msg->msg_iov[i].iov_len);
}
}
}
static void iscsi_dump_char(int ch)
{
static unsigned char text[16];

View File

@@ -66,6 +66,7 @@ static void iscsi_send_task_mgmt_resp(struct iscsi_cmnd *req, int status);
static void cmnd_prepare_get_rejected_cmd_data(struct iscsi_cmnd *cmnd);
static void iscsi_check_send_delayed_tm_resp(struct iscsi_session *sess);
static void iscsi_session_push_cmnd(struct iscsi_cmnd *cmnd);
static void req_cmnd_release(struct iscsi_cmnd *req);
static inline u32 cmnd_write_size(struct iscsi_cmnd *cmnd)
{
@@ -392,7 +393,7 @@ again_rsp:
* Corresponding conn may also gets destroyed atfer this function, except only
* if it's called from the read thread!
*/
void req_cmnd_release(struct iscsi_cmnd *req)
static void req_cmnd_release(struct iscsi_cmnd *req)
{
struct iscsi_cmnd *c, *t;

View File

@@ -359,7 +359,6 @@ extern int cmnd_rx_start(struct iscsi_cmnd *);
extern void cmnd_rx_end(struct iscsi_cmnd *);
extern void cmnd_tx_start(struct iscsi_cmnd *);
extern void cmnd_tx_end(struct iscsi_cmnd *);
extern void req_cmnd_release(struct iscsi_cmnd *req);
extern void req_cmnd_release_force(struct iscsi_cmnd *req, int flags);
extern void rsp_cmnd_release(struct iscsi_cmnd *);
extern void cmnd_done(struct iscsi_cmnd *cmnd);

View File

@@ -43,12 +43,9 @@
#endif
#ifdef CONFIG_SCST_DEBUG
struct msghdr;
struct iscsi_pdu;
extern void iscsi_dump_iov(struct msghdr *msg);
extern void iscsi_dump_pdu(struct iscsi_pdu *pdu);
#else
#define iscsi_dump_iov(x) do {} while (0)
#define iscsi_dump_pdu(x) do {} while (0)
#endif

View File

@@ -2600,9 +2600,6 @@ int scst_alloc_set_sense(struct scst_cmd *cmd, int atomic,
void scst_set_sense(uint8_t *buffer, int len, int key,
int asc, int ascq);
void scst_set_cmd_error_sense(struct scst_cmd *cmd, uint8_t *sense,
unsigned int len);
/*
* Returnes a pseudo-random number for debugging purposes. Available only in
* the DEBUG build.

View File

@@ -37,6 +37,22 @@
static void scst_free_tgt_dev(struct scst_tgt_dev *tgt_dev);
static void scst_check_internal_sense(struct scst_device *dev, int result,
uint8_t *sense, int sense_len);
static void scst_alloc_set_UA(struct scst_tgt_dev *tgt_dev,
const uint8_t *sense, int sense_len, int head);
static void scst_free_all_UA(struct scst_tgt_dev *tgt_dev);
static void scst_release_space(struct scst_cmd *cmd);
static void scst_sess_free_tgt_devs(struct scst_session *sess);
static void scst_unblock_cmds(struct scst_device *dev);
#ifdef CONFIG_SCST_DEBUG_TM
static void tm_dbg_init_tgt_dev(struct scst_tgt_dev *tgt_dev,
struct scst_acg_dev *acg_dev);
static void tm_dbg_deinit_tgt_dev(struct scst_tgt_dev *tgt_dev);
#else
static inline void tm_dbg_init_tgt_dev(struct scst_tgt_dev *tgt_dev,
struct scst_acg_dev *acg_dev) {}
static inline void tm_dbg_deinit_tgt_dev(struct scst_tgt_dev *tgt_dev) {}
#endif /* CONFIG_SCST_DEBUG_TM */
int scst_alloc_sense(struct scst_cmd *cmd, int atomic)
{
@@ -144,7 +160,7 @@ void scst_set_sense(uint8_t *buffer, int len, int key,
}
EXPORT_SYMBOL(scst_set_sense);
void scst_set_cmd_error_sense(struct scst_cmd *cmd, uint8_t *sense,
static void scst_set_cmd_error_sense(struct scst_cmd *cmd, uint8_t *sense,
unsigned int len)
{
TRACE_ENTRY();
@@ -950,7 +966,7 @@ int scst_acg_remove_name(struct scst_acg *acg, const char *name)
return res;
}
struct scst_cmd *scst_create_prepare_internal_cmd(
static struct scst_cmd *scst_create_prepare_internal_cmd(
struct scst_cmd *orig_cmd, int bufsize)
{
struct scst_cmd *res;
@@ -983,7 +999,7 @@ out:
return res;
}
void scst_free_internal_cmd(struct scst_cmd *cmd)
static void scst_free_internal_cmd(struct scst_cmd *cmd)
{
TRACE_ENTRY();
@@ -3104,7 +3120,7 @@ void __scst_block_dev(struct scst_device *dev)
}
/* No locks */
void scst_block_dev(struct scst_device *dev, int outstanding)
static void scst_block_dev(struct scst_device *dev, int outstanding)
{
spin_lock_bh(&dev->dev_lock);
__scst_block_dev(dev);

View File

@@ -70,7 +70,8 @@
*/
struct mutex scst_mutex;
struct list_head scst_template_list;
/* All 3 protected by scst_mutex */
static struct list_head scst_template_list;
struct list_head scst_dev_list;
struct list_head scst_dev_type_list;
@@ -121,8 +122,9 @@ struct list_head scst_sess_shut_list;
wait_queue_head_t scst_dev_cmd_waitQ;
struct mutex scst_suspend_mutex;
struct list_head scst_cmd_lists_list;
static struct mutex scst_suspend_mutex;
/* protected by scst_suspend_mutex */
static struct list_head scst_cmd_lists_list;
static int scst_threads;
struct scst_threads_info_t scst_threads_info;
@@ -144,7 +146,7 @@ static struct io_context *scst_ioc;
#endif
#endif
unsigned int scst_max_cmd_mem;
static unsigned int scst_max_cmd_mem;
unsigned int scst_max_dev_cmd_mem;
module_param_named(scst_threads, scst_threads, int, 0);

View File

@@ -1057,6 +1057,7 @@ void sgv_pool_deinit(struct sgv_pool *pool)
}
TRACE_EXIT();
return;
}
void sgv_pool_set_allocator(struct sgv_pool *pool,

View File

@@ -125,7 +125,6 @@ extern unsigned long scst_trace_flag;
#define SCST_TGT_RETRY_TIMEOUT (3/2*HZ)
extern unsigned int scst_max_cmd_mem;
extern unsigned int scst_max_dev_cmd_mem;
extern mempool_t *scst_mgmt_mempool;
@@ -145,15 +144,10 @@ extern struct scst_sgv_pools scst_sgv;
extern unsigned long scst_flags;
extern struct mutex scst_mutex;
extern atomic_t scst_cmd_count;
extern struct list_head scst_template_list; /* protected by scst_mutex */
extern struct list_head scst_dev_list; /* protected by scst_mutex */
extern struct list_head scst_dev_type_list; /* protected by scst_mutex */
extern struct list_head scst_dev_list;
extern struct list_head scst_dev_type_list;
extern wait_queue_head_t scst_dev_cmd_waitQ;
extern struct mutex scst_suspend_mutex;
/* protected by scst_suspend_mutex */
extern struct list_head scst_cmd_lists_list;
extern struct list_head scst_acg_list;
extern struct scst_acg *scst_default_acg;
@@ -260,12 +254,8 @@ void scst_free_device(struct scst_device *dev);
struct scst_acg *scst_alloc_add_acg(const char *acg_name);
int scst_destroy_acg(struct scst_acg *acg);
int scst_proc_group_add_tree(struct scst_acg *acg, const char *name);
void scst_proc_del_acg_tree(struct proc_dir_entry *acg_proc_root,
const char *name);
int scst_sess_alloc_tgt_devs(struct scst_session *sess);
void scst_sess_free_tgt_devs(struct scst_session *sess);
void scst_nexus_loss(struct scst_tgt_dev *tgt_dev);
int scst_acg_add_dev(struct scst_acg *acg, struct scst_device *dev,
@@ -275,9 +265,6 @@ int scst_acg_remove_dev(struct scst_acg *acg, struct scst_device *dev);
int scst_acg_add_name(struct scst_acg *acg, const char *name);
int scst_acg_remove_name(struct scst_acg *acg, const char *name);
struct scst_cmd *scst_create_prepare_internal_cmd(
struct scst_cmd *orig_cmd, int bufsize);
void scst_free_internal_cmd(struct scst_cmd *cmd);
int scst_prepare_request_sense(struct scst_cmd *orig_cmd);
struct scst_cmd *scst_complete_request_sense(struct scst_cmd *cmd);
@@ -297,8 +284,6 @@ static inline void scst_destroy_cmd(struct scst_cmd *cmd)
return;
}
void scst_proccess_redirect_cmd(struct scst_cmd *cmd,
enum scst_exec_context context, int check_retries);
void scst_check_retries(struct scst_tgt *tgt);
void scst_tgt_retry_timer_fn(unsigned long arg);
@@ -338,7 +323,6 @@ static inline int scst_exec_req(struct scsi_device *sdev,
#endif
int scst_alloc_space(struct scst_cmd *cmd);
void scst_release_space(struct scst_cmd *cmd);
void scst_scsi_op_list_init(void);
enum scst_sg_copy_dir {
@@ -349,9 +333,6 @@ void scst_copy_sg(struct scst_cmd *cmd, enum scst_sg_copy_dir);
uint64_t scst_unpack_lun(const uint8_t *lun, int len);
struct scst_cmd *__scst_find_cmd_by_tag(struct scst_session *sess,
uint64_t tag);
struct scst_mgmt_cmd *scst_alloc_mgmt_cmd(gfp_t gfp_mask);
void scst_free_mgmt_cmd(struct scst_mgmt_cmd *mcmd);
void scst_done_cmd_mgmt(struct scst_cmd *cmd);
@@ -383,9 +364,6 @@ void scst_dev_check_set_local_UA(struct scst_device *dev,
void scst_check_set_UA(struct scst_tgt_dev *tgt_dev,
const uint8_t *sense, int sense_len, int head);
void scst_alloc_set_UA(struct scst_tgt_dev *tgt_dev, const uint8_t *sense,
int sense_len, int head);
void scst_free_all_UA(struct scst_tgt_dev *tgt_dev);
int scst_set_pending_UA(struct scst_cmd *cmd);
void scst_abort_cmd(struct scst_cmd *cmd, struct scst_mgmt_cmd *mcmd,
@@ -419,10 +397,8 @@ static inline int scst_is_implicit_hq(struct scst_cmd *cmd)
*/
extern int scst_inc_on_dev_cmd(struct scst_cmd *cmd);
extern void scst_unblock_cmds(struct scst_device *dev);
extern void __scst_block_dev(struct scst_device *dev);
extern void scst_block_dev(struct scst_device *dev, int outstanding);
extern void scst_block_dev_cmd(struct scst_cmd *cmd, int outstanding);
extern void scst_unblock_dev(struct scst_device *dev);
extern void scst_unblock_dev_cmd(struct scst_cmd *cmd);
@@ -519,9 +495,6 @@ static inline void scst_check_restore_sg_buff(struct scst_cmd *cmd)
}
#ifdef CONFIG_SCST_DEBUG_TM
extern void tm_dbg_init_tgt_dev(struct scst_tgt_dev *tgt_dev,
struct scst_acg_dev *acg_dev);
extern void tm_dbg_deinit_tgt_dev(struct scst_tgt_dev *tgt_dev);
extern void tm_dbg_check_released_cmds(void);
extern int tm_dbg_check_cmd(struct scst_cmd *cmd);
extern void tm_dbg_release_cmd(struct scst_cmd *cmd);
@@ -529,9 +502,6 @@ extern void tm_dbg_task_mgmt(struct scst_device *dev, const char *fn,
int force);
extern int tm_dbg_is_release(void);
#else
static inline void tm_dbg_init_tgt_dev(struct scst_tgt_dev *tgt_dev,
struct scst_acg_dev *acg_dev) {}
static inline void tm_dbg_deinit_tgt_dev(struct scst_tgt_dev *tgt_dev) {}
static inline void tm_dbg_check_released_cmds(void) {}
static inline int tm_dbg_check_cmd(struct scst_cmd *cmd)
{

View File

@@ -555,7 +555,7 @@ static void scst_proc_cleanup_module_log(void)
return;
}
int scst_proc_group_add_tree(struct scst_acg *acg, const char *name)
static int scst_proc_group_add_tree(struct scst_acg *acg, const char *name)
{
int res = 0;
struct proc_dir_entry *generic;
@@ -609,7 +609,7 @@ out_remove:
goto out;
}
void scst_proc_del_acg_tree(struct proc_dir_entry *acg_proc_root,
static void scst_proc_del_acg_tree(struct proc_dir_entry *acg_proc_root,
const char *name)
{
TRACE_ENTRY();

View File

@@ -35,6 +35,10 @@
static void scst_cmd_set_sn(struct scst_cmd *cmd);
static int __scst_init_cmd(struct scst_cmd *cmd);
static void scst_finish_cmd_mgmt(struct scst_cmd *cmd);
static struct scst_cmd *__scst_find_cmd_by_tag(struct scst_session *sess,
uint64_t tag);
static void scst_proccess_redirect_cmd(struct scst_cmd *cmd,
enum scst_exec_context context, int check_retries);
static inline void scst_schedule_tasklet(struct scst_cmd *cmd)
{