diff mbox series

[3/5] uas: Use scsi_[gs]et_resid() where appropriate

Message ID 20190208212503.237150-4-bvanassche@acm.org (mailing list archive)
State Mainlined
Commit 229531be6918906e92da5647c755ee8205fc1d7f
Headers show
Series Reduce the size of the SCSI request data structure | expand

Commit Message

Bart Van Assche Feb. 8, 2019, 9:25 p.m. UTC
This patch does not change any functionality.

Cc: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/usb/storage/uas.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Oliver Neukum Feb. 10, 2019, 6:32 p.m. UTC | #1
On Fr, 2019-02-08 at 13:25 -0800, Bart Van Assche wrote:
> This patch does not change any functionality.
> 
> Cc: Oliver Neukum <oneukum@suse.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Oliver Neukum <oneukum@suse.com>
Christoph Hellwig Feb. 12, 2019, 7:58 a.m. UTC | #2
Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 95f2142093d5..a6d68191c861 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -395,9 +395,9 @@  static void uas_data_cmplt(struct urb *urb)
 		if (status != -ENOENT && status != -ECONNRESET && status != -ESHUTDOWN)
 			uas_log_cmd_state(cmnd, "data cmplt err", status);
 		/* error: no data transfered */
-		sdb->resid = sdb->length;
+		scsi_set_resid(cmnd, sdb->length);
 	} else {
-		sdb->resid = sdb->length - urb->actual_length;
+		scsi_set_resid(cmnd, sdb->length - urb->actual_length);
 	}
 	uas_try_complete(cmnd, __func__);
 out: