Rename this member variable to make it clear that it represents a list entry instead of a list. Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx> --- drivers/target/target_core_tmr.c | 10 ++++++---- drivers/target/target_core_transport.c | 6 +++--- include/target/target_core_base.h | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index ca0a2d5..d0a4102 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c @@ -265,7 +265,8 @@ static void core_tmr_drain_state_list( * in the Control Mode Page. */ spin_lock_irqsave(&dev->execute_task_lock, flags); - list_for_each_entry_safe(cmd, next, &dev->state_list, state_list) { + list_for_each_entry_safe(cmd, next, &dev->state_list, + state_list_entry) { /* * For PREEMPT_AND_ABORT usage, only process commands * with a matching reservation key. @@ -279,14 +280,15 @@ static void core_tmr_drain_state_list( if (prout_cmd == cmd) continue; - list_move_tail(&cmd->state_list, &drain_task_list); + list_move_tail(&cmd->state_list_entry, &drain_task_list); cmd->state_active = false; } spin_unlock_irqrestore(&dev->execute_task_lock, flags); while (!list_empty(&drain_task_list)) { - cmd = list_entry(drain_task_list.next, struct se_cmd, state_list); - list_del(&cmd->state_list); + cmd = list_entry(drain_task_list.next, struct se_cmd, + state_list_entry); + list_del(&cmd->state_list_entry); pr_debug("LUN_RESET: %s cmd: %p" " ITT/CmdSN: 0x%08llx/0x%08x, i_state: %d, t_state: %d" diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index fc8593e..19c9241 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -564,7 +564,7 @@ static void target_remove_from_state_list(struct se_cmd *cmd) spin_lock_irqsave(&dev->execute_task_lock, flags); if (cmd->state_active) { - list_del(&cmd->state_list); + list_del(&cmd->state_list_entry); cmd->state_active = false; } spin_unlock_irqrestore(&dev->execute_task_lock, flags); @@ -763,7 +763,7 @@ static void target_add_to_state_list(struct se_cmd *cmd) spin_lock_irqsave(&dev->execute_task_lock, flags); if (!cmd->state_active) { - list_add_tail(&cmd->state_list, &dev->state_list); + list_add_tail(&cmd->state_list_entry, &dev->state_list); cmd->state_active = true; } spin_unlock_irqrestore(&dev->execute_task_lock, flags); @@ -1162,7 +1162,7 @@ void transport_init_se_cmd( INIT_LIST_HEAD(&cmd->se_delayed_node); INIT_LIST_HEAD(&cmd->se_qf_node); INIT_LIST_HEAD(&cmd->se_cmd_list); - INIT_LIST_HEAD(&cmd->state_list); + INIT_LIST_HEAD(&cmd->state_list_entry); init_completion(&cmd->t_transport_stop_comp); init_completion(&cmd->cmd_wait_comp); init_completion(&cmd->task_stop_comp); diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index be47f6b..2b57314 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -538,7 +538,7 @@ struct se_cmd { struct scatterlist *t_bidi_data_sg; unsigned int t_bidi_data_nents; - struct list_head state_list; + struct list_head state_list_entry; bool state_active; /* old task stop completion, consider merging with some of the above */ -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html