Re: [PATCH 4/5] target: Remove useless if statement
On Wed, 2013-01-02 at 12:48 -0800, Roland Dreier wrote: From: Roland Dreier rol...@purestorage.com We do the same thing no matter which way the test goes, so just remove the test and do what we're going to do. The debug messages printed the wrong value of CMD_T_ACTIVE and don't seem particularly useful, remove them too. Signed-off-by: Roland Dreier rol...@purestorage.com --- drivers/target/target_core_tmr.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index c6e0293..d0b4dd9 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c @@ -331,18 +331,6 @@ static void core_tmr_drain_state_list( fe_count = atomic_read(cmd-t_fe_count); - if (!(cmd-transport_state CMD_T_ACTIVE)) { - pr_debug(LUN_RESET: got CMD_T_ACTIVE for - cdb: %p, t_fe_count: %d dev: %p\n, cmd, - fe_count, dev); - cmd-transport_state |= CMD_T_ABORTED; - spin_unlock_irqrestore(cmd-t_state_lock, flags); - - core_tmr_handle_tas_abort(tmr_nacl, cmd, tas, fe_count); - continue; - } - pr_debug(LUN_RESET: Got !CMD_T_ACTIVE for cdb: %p, - t_fe_count: %d dev: %p\n, cmd, fe_count, dev); cmd-transport_state |= CMD_T_ABORTED; spin_unlock_irqrestore(cmd-t_state_lock, flags); Looks OK to drop. Applying to for-next. --nab -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/5] target: Remove useless if statement
From: Roland Dreier rol...@purestorage.com We do the same thing no matter which way the test goes, so just remove the test and do what we're going to do. The debug messages printed the wrong value of CMD_T_ACTIVE and don't seem particularly useful, remove them too. Signed-off-by: Roland Dreier rol...@purestorage.com --- drivers/target/target_core_tmr.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index c6e0293..d0b4dd9 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c @@ -331,18 +331,6 @@ static void core_tmr_drain_state_list( fe_count = atomic_read(cmd-t_fe_count); - if (!(cmd-transport_state CMD_T_ACTIVE)) { - pr_debug(LUN_RESET: got CMD_T_ACTIVE for -cdb: %p, t_fe_count: %d dev: %p\n, cmd, - fe_count, dev); - cmd-transport_state |= CMD_T_ABORTED; - spin_unlock_irqrestore(cmd-t_state_lock, flags); - - core_tmr_handle_tas_abort(tmr_nacl, cmd, tas, fe_count); - continue; - } - pr_debug(LUN_RESET: Got !CMD_T_ACTIVE for cdb: %p, -t_fe_count: %d dev: %p\n, cmd, fe_count, dev); cmd-transport_state |= CMD_T_ABORTED; spin_unlock_irqrestore(cmd-t_state_lock, flags); -- 1.8.0 -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html