Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: aacraid: Use scsi_cmd_to_rq() instead of scsi_cmnd.request

Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.

Link: https://lore.kernel.org/r/20210809230355.8186-14-bvanassche@acm.org
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
8779b4bd 2e4b231a

+2 -2
+1 -1
drivers/scsi/aacraid/aachba.c
··· 1504 1504 srbcmd->id = cpu_to_le32(scmd_id(cmd)); 1505 1505 srbcmd->lun = cpu_to_le32(cmd->device->lun); 1506 1506 srbcmd->flags = cpu_to_le32(flag); 1507 - timeout = cmd->request->timeout/HZ; 1507 + timeout = scsi_cmd_to_rq(cmd)->timeout / HZ; 1508 1508 if (timeout == 0) 1509 1509 timeout = (dev->sa_firmware ? AAC_SA_TIMEOUT : AAC_ARC_TIMEOUT); 1510 1510 srbcmd->timeout = cpu_to_le32(timeout); // timeout in seconds
+1 -1
drivers/scsi/aacraid/commsup.c
··· 224 224 { 225 225 struct fib *fibptr; 226 226 227 - fibptr = &dev->fibs[scmd->request->tag]; 227 + fibptr = &dev->fibs[scsi_cmd_to_rq(scmd)->tag]; 228 228 /* 229 229 * Null out fields that depend on being zero at the start of 230 230 * each I/O