diff mbox

[29/34] target: Change return type of transport_wait_for_tasks() into void

Message ID 20170125233646.2243-30-bart.vanassche@sandisk.com (mailing list archive)
State Superseded
Headers show

Commit Message

Bart Van Assche Jan. 25, 2017, 11:36 p.m. UTC
None of the callers of this function uses the returne value. Hence
change the return type into void.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Andy Grover <agrover@redhat.com>
Cc: David Disseldorp <ddiss@suse.de>
---
 drivers/target/target_core_transport.c | 21 ++++++++-------------
 include/target/target_core_fabric.h    |  2 +-
 2 files changed, 9 insertions(+), 14 deletions(-)

Comments

Hannes Reinecke Jan. 26, 2017, 8:36 a.m. UTC | #1
On 01/26/2017 12:36 AM, Bart Van Assche wrote:
> None of the callers of this function uses the returne value. Hence
> change the return type into void.
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Andy Grover <agrover@redhat.com>
> Cc: David Disseldorp <ddiss@suse.de>
> ---
>  drivers/target/target_core_transport.c | 21 ++++++++-------------
>  include/target/target_core_fabric.h    |  2 +-
>  2 files changed, 9 insertions(+), 14 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
diff mbox

Patch

diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 25d794c20959..0fb46c9ce449 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2482,7 +2482,7 @@  static void transport_write_pending_qf(struct se_cmd *cmd)
 	}
 }
 
-static bool
+static void
 __transport_wait_for_tasks(struct se_cmd *, bool, unsigned long *flags);
 
 static void target_wait_free_cmd(struct se_cmd *cmd)
@@ -2648,7 +2648,7 @@  void transport_clear_lun_ref(struct se_lun *lun)
 	wait_for_completion(&lun->lun_ref_comp);
 }
 
-static bool __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
+static void __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
 				       unsigned long *flags)
 	__releases(&cmd->t_state_lock)
 	__acquires(&cmd->t_state_lock)
@@ -2662,17 +2662,17 @@  static bool __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
 
 	if (!(cmd->se_cmd_flags & SCF_SE_LUN_CMD) &&
 	    !(cmd->se_cmd_flags & SCF_SCSI_TMR_CDB))
-		return false;
+		return;
 
 	if (!(cmd->se_cmd_flags & SCF_SUPPORTED_SAM_OPCODE) &&
 	    !(cmd->se_cmd_flags & SCF_SCSI_TMR_CDB))
-		return false;
+		return;
 
 	if (!(cmd->transport_state & CMD_T_ACTIVE))
-		return false;
+		return;
 
 	if (fabric_stop && (cmd->transport_state & CMD_T_ABORTED))
-		return false;
+		return;
 
 	cmd->transport_state |= CMD_T_STOP;
 
@@ -2689,8 +2689,6 @@  static bool __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
 
 	pr_debug("wait_for_tasks: Stopped wait_for_completion(&cmd->"
 		 "t_transport_stop_comp) for ITT: 0x%08llx\n", cmd->tag);
-
-	return true;
 }
 
 /**
@@ -2701,16 +2699,13 @@  static bool __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
  * been set, sets the CMD_T_STOP flag, waits for t_transport_stop_comp and
  * clears CMD_T_STOP and CMD_T_ACTIVE.
  */
-bool transport_wait_for_tasks(struct se_cmd *cmd)
+void transport_wait_for_tasks(struct se_cmd *cmd)
 {
 	unsigned long flags;
-	bool ret;
 
 	spin_lock_irqsave(&cmd->t_state_lock, flags);
-	ret = __transport_wait_for_tasks(cmd, false, &flags);
+	__transport_wait_for_tasks(cmd, false, &flags);
 	spin_unlock_irqrestore(&cmd->t_state_lock, flags);
-
-	return ret;
 }
 EXPORT_SYMBOL(transport_wait_for_tasks);
 
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h
index 25bfdd0d24b0..1e0b4cbd6580 100644
--- a/include/target/target_core_fabric.h
+++ b/include/target/target_core_fabric.h
@@ -151,7 +151,7 @@  void	target_execute_cmd(struct se_cmd *cmd);
 
 int	transport_generic_free_cmd(struct se_cmd *, int);
 
-bool	transport_wait_for_tasks(struct se_cmd *);
+void	transport_wait_for_tasks(struct se_cmd *);
 int	transport_send_check_condition_and_sense(struct se_cmd *,
 		sense_reason_t, int);
 int	target_get_sess_cmd(struct se_cmd *, bool);