Skip to contentSkip to conversation

target/tcmu: Fix queue_cmd_ring() declaration

PATCH Superseded Bart Van Assche 2 participants 2 messages Nov 6, 2018 – Nov 8, 2018

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/10 target/tcmu: Fix queue_cmd_ring() declaration

This patch does not change any functionality but avoids that sparse complains about the queue_cmd_ring() function and its callers.

Fixes 6fd0ce79724d ("tcmu: prep queue_cmd_ring to be used by unmap wq")
Cc Nicholas Bellinger <[email protected]>
Cc Mike Christie <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc David Disseldorp <[email protected]>
Cc Hannes Reinecke <[email protected]>
---
 drivers/target/target_core_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/target/target_core_user.c +1 -1
index 9cd404acdb82..1e6d24943565 100644
@@ -958,7 +958,7 @@ static int add_to_cmdr_queue(struct tcmu_cmd *tcmu_cmd)
  *  0 success
  *  1 internally queued to wait for ring memory to free.
  */
-static sense_reason_t queue_cmd_ring(struct tcmu_cmd *tcmu_cmd, int *scsi_err)
+static int queue_cmd_ring(struct tcmu_cmd *tcmu_cmd, sense_reason_t *scsi_err)
 {
 	struct tcmu_dev *udev = tcmu_cmd->tcmu_dev;
 	struct se_cmd *se_cmd = tcmu_cmd->se_cmd;
Signature · 1 line
2.19.1.930.g4563a0d9d0-goog
Reviewed-by on v1 1/10
#1 lore raw

On Tue, 6 Nov 2018 09:17:09 -0800, Bart Van Assche wrote:

...

drivers/target/target_core_user.c static int add_to_cmdr_queue(struct tcmu_cmd *tcmu_cmd) · line 964

Quoted 11 lines
drivers/target/target_core_user.c +1 -1
@@ -958,7 +958,7 @@ static int add_to_cmdr_queue(struct tcmu_cmd *tcmu_cmd)
  *  0 success
  *  1 internally queued to wait for ring memory to free.
  */
-static sense_reason_t queue_cmd_ring(struct tcmu_cmd *tcmu_cmd, int *scsi_err)
+static int queue_cmd_ring(struct tcmu_cmd *tcmu_cmd, sense_reason_t *scsi_err)
 {
 	struct tcmu_dev *udev = tcmu_cmd->tcmu_dev;
 	struct se_cmd *se_cmd = tcmu_cmd->se_cmd;

Looks good.