aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2013-07-03 11:22:16 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2013-07-07 21:36:52 -0400
commit11fee8a751670cf6d60b1912e2e9cb1c7e392842 (patch)
treed2c85866d95593de6fc099afa1b99ad654b1d3fe
parentad7babd23726b442b0b5fd92d8bd0611af5e5d6a (diff)
target: remove unused codes from enum tcm_tmrsp_table
Three have been checked for but were never set. Remove the dead code. Also renumbers the remaining ones to a) get rid of the holes after the removal and b) avoid a collision between TMR_FUNCTION_COMPLETE==0 and the uninitialized case. If we failed to set a code, we should rather fall into the default case then return success. Signed-off-by: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r--drivers/target/iscsi/iscsi_target.c2
-rw-r--r--drivers/target/tcm_fc/tfc_cmd.c3
-rw-r--r--include/target/target_core_base.h13
3 files changed, 5 insertions, 13 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index c30ec1d5756e..f73da43cdf9e 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -3286,8 +3286,6 @@ static u8 iscsit_convert_tcm_tmr_rsp(struct se_tmr_req *se_tmr)
3286 return ISCSI_TMF_RSP_NO_LUN; 3286 return ISCSI_TMF_RSP_NO_LUN;
3287 case TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED: 3287 case TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED:
3288 return ISCSI_TMF_RSP_NOT_SUPPORTED; 3288 return ISCSI_TMF_RSP_NOT_SUPPORTED;
3289 case TMR_FUNCTION_AUTHORIZATION_FAILED:
3290 return ISCSI_TMF_RSP_AUTH_FAILED;
3291 case TMR_FUNCTION_REJECTED: 3289 case TMR_FUNCTION_REJECTED:
3292 default: 3290 default:
3293 return ISCSI_TMF_RSP_REJECTED; 3291 return ISCSI_TMF_RSP_REJECTED;
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c
index b406f178ff39..7b6bb72fa475 100644
--- a/drivers/target/tcm_fc/tfc_cmd.c
+++ b/drivers/target/tcm_fc/tfc_cmd.c
@@ -413,10 +413,7 @@ int ft_queue_tm_resp(struct se_cmd *se_cmd)
413 code = FCP_TMF_REJECTED; 413 code = FCP_TMF_REJECTED;
414 break; 414 break;
415 case TMR_TASK_DOES_NOT_EXIST: 415 case TMR_TASK_DOES_NOT_EXIST:
416 case TMR_TASK_STILL_ALLEGIANT:
417 case TMR_TASK_FAILOVER_NOT_SUPPORTED:
418 case TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED: 416 case TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED:
419 case TMR_FUNCTION_AUTHORIZATION_FAILED:
420 default: 417 default:
421 code = FCP_TMF_FAILED; 418 code = FCP_TMF_FAILED;
422 break; 419 break;
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index d92ec6765f5d..e34fc904f2e1 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -218,14 +218,11 @@ enum tcm_tmreq_table {
218 218
219/* fabric independent task management response values */ 219/* fabric independent task management response values */
220enum tcm_tmrsp_table { 220enum tcm_tmrsp_table {
221 TMR_FUNCTION_COMPLETE = 0, 221 TMR_FUNCTION_COMPLETE = 1,
222 TMR_TASK_DOES_NOT_EXIST = 1, 222 TMR_TASK_DOES_NOT_EXIST = 2,
223 TMR_LUN_DOES_NOT_EXIST = 2, 223 TMR_LUN_DOES_NOT_EXIST = 3,
224 TMR_TASK_STILL_ALLEGIANT = 3, 224 TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED = 4,
225 TMR_TASK_FAILOVER_NOT_SUPPORTED = 4, 225 TMR_FUNCTION_REJECTED = 5,
226 TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED = 5,
227 TMR_FUNCTION_AUTHORIZATION_FAILED = 6,
228 TMR_FUNCTION_REJECTED = 255,
229}; 226};
230 227
231/* 228/*