aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_login.c
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2013-10-09 14:05:58 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2013-10-16 16:38:18 -0400
commit60bfcf8e04184b8cd68607cabdf1adc142aa78d1 (patch)
treee256979bef615998d2012fb19fcd62354b3d1a73 /drivers/target/iscsi/iscsi_target_login.c
parentb7eec2cdd874ad678228a32a31dea32e3fcc2f99 (diff)
target/iscsi: Remove macros that contain typecasts
These just want to return a pointer instead of a value, but are otherwise the same. ISCSI_TPG_LUN macro was unused. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_login.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_login.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
index 1794c753954a..646632aa2002 100644
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
@@ -347,15 +347,15 @@ static int iscsi_login_zero_tsih_s2(
347 * Assign a new TPG Session Handle. Note this is protected with 347 * Assign a new TPG Session Handle. Note this is protected with
348 * struct iscsi_portal_group->np_login_sem from iscsit_access_np(). 348 * struct iscsi_portal_group->np_login_sem from iscsit_access_np().
349 */ 349 */
350 sess->tsih = ++ISCSI_TPG_S(sess)->ntsih; 350 sess->tsih = ++sess->tpg->ntsih;
351 if (!sess->tsih) 351 if (!sess->tsih)
352 sess->tsih = ++ISCSI_TPG_S(sess)->ntsih; 352 sess->tsih = ++sess->tpg->ntsih;
353 353
354 /* 354 /*
355 * Create the default params from user defined values.. 355 * Create the default params from user defined values..
356 */ 356 */
357 if (iscsi_copy_param_list(&conn->param_list, 357 if (iscsi_copy_param_list(&conn->param_list,
358 ISCSI_TPG_C(conn)->param_list, 1) < 0) { 358 conn->tpg->param_list, 1) < 0) {
359 iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR, 359 iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
360 ISCSI_LOGIN_STATUS_NO_RESOURCES); 360 ISCSI_LOGIN_STATUS_NO_RESOURCES);
361 return -1; 361 return -1;
@@ -380,7 +380,7 @@ static int iscsi_login_zero_tsih_s2(
380 * In our case, we have already located the struct iscsi_tiqn at this point. 380 * In our case, we have already located the struct iscsi_tiqn at this point.
381 */ 381 */
382 memset(buf, 0, 32); 382 memset(buf, 0, 32);
383 sprintf(buf, "TargetPortalGroupTag=%hu", ISCSI_TPG_S(sess)->tpgt); 383 sprintf(buf, "TargetPortalGroupTag=%hu", sess->tpg->tpgt);
384 if (iscsi_change_param_value(buf, conn->param_list, 0) < 0) { 384 if (iscsi_change_param_value(buf, conn->param_list, 0) < 0) {
385 iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR, 385 iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
386 ISCSI_LOGIN_STATUS_NO_RESOURCES); 386 ISCSI_LOGIN_STATUS_NO_RESOURCES);
@@ -575,7 +575,7 @@ static int iscsi_login_non_zero_tsih_s2(
575 iscsi_login_set_conn_values(sess, conn, pdu->cid); 575 iscsi_login_set_conn_values(sess, conn, pdu->cid);
576 576
577 if (iscsi_copy_param_list(&conn->param_list, 577 if (iscsi_copy_param_list(&conn->param_list,
578 ISCSI_TPG_C(conn)->param_list, 0) < 0) { 578 conn->tpg->param_list, 0) < 0) {
579 iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR, 579 iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
580 ISCSI_LOGIN_STATUS_NO_RESOURCES); 580 ISCSI_LOGIN_STATUS_NO_RESOURCES);
581 return -1; 581 return -1;
@@ -593,7 +593,7 @@ static int iscsi_login_non_zero_tsih_s2(
593 * In our case, we have already located the struct iscsi_tiqn at this point. 593 * In our case, we have already located the struct iscsi_tiqn at this point.
594 */ 594 */
595 memset(buf, 0, 32); 595 memset(buf, 0, 32);
596 sprintf(buf, "TargetPortalGroupTag=%hu", ISCSI_TPG_S(sess)->tpgt); 596 sprintf(buf, "TargetPortalGroupTag=%hu", sess->tpg->tpgt);
597 if (iscsi_change_param_value(buf, conn->param_list, 0) < 0) { 597 if (iscsi_change_param_value(buf, conn->param_list, 0) < 0) {
598 iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR, 598 iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
599 ISCSI_LOGIN_STATUS_NO_RESOURCES); 599 ISCSI_LOGIN_STATUS_NO_RESOURCES);
@@ -691,7 +691,7 @@ int iscsi_post_login_handler(
691 int stop_timer = 0; 691 int stop_timer = 0;
692 struct iscsi_session *sess = conn->sess; 692 struct iscsi_session *sess = conn->sess;
693 struct se_session *se_sess = sess->se_sess; 693 struct se_session *se_sess = sess->se_sess;
694 struct iscsi_portal_group *tpg = ISCSI_TPG_S(sess); 694 struct iscsi_portal_group *tpg = sess->tpg;
695 struct se_portal_group *se_tpg = &tpg->tpg_se_tpg; 695 struct se_portal_group *se_tpg = &tpg->tpg_se_tpg;
696 struct iscsi_thread_set *ts; 696 struct iscsi_thread_set *ts;
697 697
@@ -1154,7 +1154,7 @@ old_sess_out:
1154 spin_lock_bh(&conn->sess->conn_lock); 1154 spin_lock_bh(&conn->sess->conn_lock);
1155 if (conn->sess->session_state == TARG_SESS_STATE_FAILED) { 1155 if (conn->sess->session_state == TARG_SESS_STATE_FAILED) {
1156 struct se_portal_group *se_tpg = 1156 struct se_portal_group *se_tpg =
1157 &ISCSI_TPG_C(conn)->tpg_se_tpg; 1157 &conn->tpg->tpg_se_tpg;
1158 1158
1159 atomic_set(&conn->sess->session_continuation, 0); 1159 atomic_set(&conn->sess->session_continuation, 0);
1160 spin_unlock_bh(&conn->sess->conn_lock); 1160 spin_unlock_bh(&conn->sess->conn_lock);