Kill some unused functions Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp> --- usr/target.c | 40 ---------------------------------------- usr/tgtd.h | 2 -- 2 files changed, 0 insertions(+), 42 deletions(-) diff --git a/usr/target.c b/usr/target.c index ca0d3c8..3651767 100644 --- a/usr/target.c +++ b/usr/target.c @@ -355,22 +355,6 @@ static struct scsi_lu *device_lookup(struct target *target, uint64_t lun) return NULL; } -static struct scsi_cmd *cmd_lookup(int tid, uint64_t itn_id, uint64_t tag) -{ - struct scsi_cmd *cmd; - struct it_nexus *itn; - - itn = it_nexus_lookup(tid, itn_id); - if (!itn) - return NULL; - - list_for_each_entry(cmd, &itn->cmd_hash_list[hashfn(tag)], c_hlist) { - if (cmd->tag == tag) - return cmd; - } - return NULL; -} - static void cmd_hlist_insert(struct it_nexus *itn, struct scsi_cmd *cmd) { struct list_head *list = &itn->cmd_hash_list[hashfn(cmd->tag)]; @@ -1084,18 +1068,6 @@ void __cmd_done_passthrough(struct target *target, struct scsi_cmd *cmd) scsi_get_in_length(cmd)); } -struct scsi_cmd *target_cmd_lookup(int tid, uint64_t itn_id, uint64_t tag) -{ - struct scsi_cmd *cmd; - - cmd = cmd_lookup(tid, itn_id, tag); - if (!cmd) - eprintf("Cannot find cmd %d %" PRIx64 " %" PRIx64 "\n", - tid, itn_id, tag); - - return cmd; -} - void target_cmd_done(struct scsi_cmd *cmd) { struct mgmt_req *mreq; @@ -1683,18 +1655,6 @@ int tgt_unbind_host_to_target(int tid, int host_no) return -ENOENT; } -int tgt_bound_target_lookup(int host_no) -{ - struct bound_host *bhost; - - list_for_each_entry(bhost, &bound_host_list, bhost_siblings) { - if (bhost->host_no == host_no) - return bhost->target->tid; - } - - return -ENOENT; -} - enum scsi_target_state tgt_get_target_state(int tid) { struct target *target; diff --git a/usr/tgtd.h b/usr/tgtd.h index 547edaa..8b58208 100644 --- a/usr/tgtd.h +++ b/usr/tgtd.h @@ -235,7 +235,6 @@ extern int tgt_portal_destroy(int lld, char *args); extern int tgt_bind_host_to_target(int tid, int host_no); extern int tgt_unbind_host_to_target(int tid, int host_no); -extern int tgt_bound_target_lookup(int host_no); struct event_data; typedef void (*sched_event_handler_t)(struct event_data *tev); @@ -257,7 +256,6 @@ extern int target_cmd_perform(int tid, struct scsi_cmd *cmd); extern int target_cmd_perform_passthrough(int tid, struct scsi_cmd *cmd); extern void target_cmd_done(struct scsi_cmd *cmd); extern void __cmd_done_passthrough(struct target *target, struct scsi_cmd *cmd); -struct scsi_cmd *target_cmd_lookup(int tid, uint64_t itn_id, uint64_t tag); extern enum mgmt_req_result target_mgmt_request(int tid, uint64_t itn_id, uint64_t req_id, int function, -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html |