diff mbox series

[1/3] scsi: wd719: Stop using scsi_cmnd.tag

Message ID 1628862553-179450-2-git-send-email-john.garry@huawei.com
State New
Headers show
Series Remove scsi_cmnd.tag | expand

Commit Message

John Garry Aug. 13, 2021, 1:49 p.m. UTC
Use scsi_cmd_to_rq(cmd)->tag instead.

Signed-off-by: John Garry <john.garry@huawei.com>

---
 drivers/scsi/wd719x.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

-- 
2.26.2

Comments

Hannes Reinecke Aug. 13, 2021, 4:30 p.m. UTC | #1
On 8/13/21 3:49 PM, John Garry wrote:
> Use scsi_cmd_to_rq(cmd)->tag instead.

> 

> Signed-off-by: John Garry <john.garry@huawei.com>

> ---

>   drivers/scsi/wd719x.c | 8 +++++---

>   1 file changed, 5 insertions(+), 3 deletions(-)

> 

Reviewed-by: Hannes Reinecke <hare@suse.de>


Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
Bart Van Assche Aug. 14, 2021, 3:11 a.m. UTC | #2
On 8/13/21 6:49 AM, John Garry wrote:
> -	action = /*cmd->tag ? WD719X_CMD_ABORT_TAG : */WD719X_CMD_ABORT;

> +	action = /*tag ? WD719X_CMD_ABORT_TAG : */WD719X_CMD_ABORT;


If this patch series would be reposted, please remove the commented-out
code instead of modifying it. Anyway:

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
diff mbox series

Patch

diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c
index edc8a139a60d..622aec075aba 100644
--- a/drivers/scsi/wd719x.c
+++ b/drivers/scsi/wd719x.c
@@ -466,14 +466,16 @@  static int wd719x_abort(struct scsi_cmnd *cmd)
 	unsigned long flags;
 	struct wd719x_scb *scb = scsi_cmd_priv(cmd);
 	struct wd719x *wd = shost_priv(cmd->device->host);
+	struct device *dev = &wd->pdev->dev;
 
-	dev_info(&wd->pdev->dev, "abort command, tag: %x\n", cmd->tag);
+	dev_info(dev, "abort command, tag: %x\n", scsi_cmd_to_rq(cmd)->tag);
 
-	action = /*cmd->tag ? WD719X_CMD_ABORT_TAG : */WD719X_CMD_ABORT;
+	action = /*tag ? WD719X_CMD_ABORT_TAG : */WD719X_CMD_ABORT;
 
 	spin_lock_irqsave(wd->sh->host_lock, flags);
 	result = wd719x_direct_cmd(wd, action, cmd->device->id,
-				   cmd->device->lun, cmd->tag, scb->phys, 0);
+				   cmd->device->lun, scsi_cmd_to_rq(cmd)->tag,
+				   scb->phys, 0);
 	wd719x_finish_cmd(scb, DID_ABORT);
 	spin_unlock_irqrestore(wd->sh->host_lock, flags);
 	if (result)