Commit ee1b1b9c authored by Andy Grover's avatar Andy Grover Committed by Nicholas Bellinger

target: Remove unneeded double parentheses

Signed-off-by: default avatarAndy Grover <agrover@redhat.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent af877292
...@@ -2685,7 +2685,7 @@ static int iscsit_send_logout_response( ...@@ -2685,7 +2685,7 @@ static int iscsit_send_logout_response(
*/ */
logout_conn = iscsit_get_conn_from_cid_rcfr(sess, logout_conn = iscsit_get_conn_from_cid_rcfr(sess,
cmd->logout_cid); cmd->logout_cid);
if ((logout_conn)) { if (logout_conn) {
iscsit_connection_reinstatement_rcfr(logout_conn); iscsit_connection_reinstatement_rcfr(logout_conn);
iscsit_dec_conn_usage_count(logout_conn); iscsit_dec_conn_usage_count(logout_conn);
} }
......
...@@ -518,7 +518,7 @@ int iscsi_login_post_auth_non_zero_tsih( ...@@ -518,7 +518,7 @@ int iscsi_login_post_auth_non_zero_tsih(
* initiator and release the new connection. * initiator and release the new connection.
*/ */
conn_ptr = iscsit_get_conn_from_cid_rcfr(sess, cid); conn_ptr = iscsit_get_conn_from_cid_rcfr(sess, cid);
if ((conn_ptr)) { if (conn_ptr) {
pr_err("Connection exists with CID %hu for %s," pr_err("Connection exists with CID %hu for %s,"
" performing connection reinstatement.\n", " performing connection reinstatement.\n",
conn_ptr->cid, sess->sess_ops->InitiatorName); conn_ptr->cid, sess->sess_ops->InitiatorName);
...@@ -539,7 +539,7 @@ int iscsi_login_post_auth_non_zero_tsih( ...@@ -539,7 +539,7 @@ int iscsi_login_post_auth_non_zero_tsih(
if (sess->sess_ops->ErrorRecoveryLevel == 2) { if (sess->sess_ops->ErrorRecoveryLevel == 2) {
cr = iscsit_get_inactive_connection_recovery_entry( cr = iscsit_get_inactive_connection_recovery_entry(
sess, cid); sess, cid);
if ((cr)) { if (cr) {
pr_debug("Performing implicit logout" pr_debug("Performing implicit logout"
" for connection recovery on CID: %hu\n", " for connection recovery on CID: %hu\n",
conn->cid); conn->cid);
...@@ -1081,7 +1081,7 @@ static int __iscsi_target_login_thread(struct iscsi_np *np) ...@@ -1081,7 +1081,7 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
goto new_sess_out; goto new_sess_out;
zero_tsih = (pdu->tsih == 0x0000); zero_tsih = (pdu->tsih == 0x0000);
if ((zero_tsih)) { if (zero_tsih) {
/* /*
* This is the leading connection of a new session. * This is the leading connection of a new session.
* We wait until after authentication to check for * We wait until after authentication to check for
......
...@@ -593,7 +593,7 @@ int iscsit_ta_authentication(struct iscsi_portal_group *tpg, u32 authentication) ...@@ -593,7 +593,7 @@ int iscsit_ta_authentication(struct iscsi_portal_group *tpg, u32 authentication)
} else { } else {
snprintf(buf1, sizeof(buf1), "%s", param->value); snprintf(buf1, sizeof(buf1), "%s", param->value);
none = strstr(buf1, NONE); none = strstr(buf1, NONE);
if ((none)) if (none)
goto out; goto out;
strncat(buf1, ",", strlen(",")); strncat(buf1, ",", strlen(","));
strncat(buf1, NONE, strlen(NONE)); strncat(buf1, NONE, strlen(NONE));
......
...@@ -507,7 +507,7 @@ static int core_scsi3_pr_seq_non_holder( ...@@ -507,7 +507,7 @@ static int core_scsi3_pr_seq_non_holder(
* Check if write exclusive initiator ports *NOT* holding the * Check if write exclusive initiator ports *NOT* holding the
* WRITE_EXCLUSIVE_* reservation. * WRITE_EXCLUSIVE_* reservation.
*/ */
if ((we) && !(registered_nexus)) { if (we && !registered_nexus) {
if (cmd->data_direction == DMA_TO_DEVICE) { if (cmd->data_direction == DMA_TO_DEVICE) {
/* /*
* Conflict for write exclusive * Conflict for write exclusive
...@@ -2486,7 +2486,7 @@ static int core_scsi3_pro_reserve( ...@@ -2486,7 +2486,7 @@ static int core_scsi3_pro_reserve(
*/ */
spin_lock(&dev->dev_reservation_lock); spin_lock(&dev->dev_reservation_lock);
pr_res_holder = dev->dev_pr_res_holder; pr_res_holder = dev->dev_pr_res_holder;
if ((pr_res_holder)) { if (pr_res_holder) {
/* /*
* From spc4r17 Section 5.7.9: Reserving: * From spc4r17 Section 5.7.9: Reserving:
* *
...@@ -4030,7 +4030,7 @@ static int core_scsi3_pri_read_reservation(struct se_cmd *cmd) ...@@ -4030,7 +4030,7 @@ static int core_scsi3_pri_read_reservation(struct se_cmd *cmd)
spin_lock(&se_dev->dev_reservation_lock); spin_lock(&se_dev->dev_reservation_lock);
pr_reg = se_dev->dev_pr_res_holder; pr_reg = se_dev->dev_pr_res_holder;
if ((pr_reg)) { if (pr_reg) {
/* /*
* Set the hardcoded Additional Length * Set the hardcoded Additional Length
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment