Thread (81 messages) 81 messages, 5 authors, 2021-05-17

Re: [PATCH 49/50] usb-storage: Use blk_req() instead of scsi_cmnd.request

From: Alan Stern <stern@rowland.harvard.edu>
Date: 2021-05-15 15:09:45

On Fri, May 14, 2021 at 02:33:04PM -0700, Bart Van Assche wrote:
Prepare for removal of the request pointer by using blk_req() instead. This
patch does not change any functionality.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
Acked-by: Alan Stern <stern@rowland.harvard.edu>
quoted hunk ↗ jump to hunk
 drivers/usb/storage/transport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index f4304ce69350..53cc76b51ed7 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -551,7 +551,7 @@ static void last_sector_hacks(struct us_data *us, struct scsi_cmnd *srb)
 	/* Did this command access the last sector? */
 	sector = (srb->cmnd[2] << 24) | (srb->cmnd[3] << 16) |
 			(srb->cmnd[4] << 8) | (srb->cmnd[5]);
-	disk = srb->request->rq_disk;
+	disk = blk_req(srb)->rq_disk;
 	if (!disk)
 		goto done;
 	sdkp = scsi_disk(disk);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help