diff options
author | Andy Grover <agrover@redhat.com> | 2012-04-04 00:51:02 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-04-15 02:40:33 +0200 |
commit | c6037cc546ca10cbdc5b60f0598b4ddcb181fe5d (patch) | |
tree | e94de0fb6cd142cad6e8152c7130da1caefcf951 /drivers/target/iscsi/iscsi_target_erl0.c | |
parent | target/iscsi: Rename iscsi_cmd.i_list to iscsi_cmd.i_conn_node (diff) | |
download | linux-c6037cc546ca10cbdc5b60f0598b4ddcb181fe5d.tar.xz linux-c6037cc546ca10cbdc5b60f0598b4ddcb181fe5d.zip |
target/iscsi: Misc cleanups from Agrover (round 1)
*) Use decoded cmd->immediate_cmd for conditional instead of
re-examining hdr->opcode
*) Make iscist_dataout_post_crc_passed more legible
*) use max() to reduce code in build_r2ts_for_cmd()
*) Remove CONFIG_SMP and if 0 ifdefs
*) Replace if/goto with a while loop
*) Remove unused conn->tx_immediate_queue and tx_response_queue
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_erl0.c')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_erl0.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/target/iscsi/iscsi_target_erl0.c b/drivers/target/iscsi/iscsi_target_erl0.c index 1ab0560b0924..dd11520eb8b4 100644 --- a/drivers/target/iscsi/iscsi_target_erl0.c +++ b/drivers/target/iscsi/iscsi_target_erl0.c @@ -640,9 +640,12 @@ static int iscsit_dataout_post_crc_passed( cmd->write_data_done += payload_length; - return (cmd->write_data_done == cmd->data_length) ? - DATAOUT_SEND_TO_TRANSPORT : (send_r2t) ? - DATAOUT_SEND_R2T : DATAOUT_NORMAL; + if (cmd->write_data_done == cmd->data_length) + return DATAOUT_SEND_TO_TRANSPORT; + else if (send_r2t) + return DATAOUT_SEND_R2T; + else + return DATAOUT_NORMAL; } static int iscsit_dataout_post_crc_failed( |