From 229531be6918906e92da5647c755ee8205fc1d7f Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 8 Feb 2019 13:25:01 -0800 Subject: scsi: uas: Use scsi_[gs]et_resid() where appropriate This patch does not change any functionality. Cc: Oliver Neukum Signed-off-by: Bart Van Assche Acked-by: Oliver Neukum Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen --- drivers/usb/storage/uas.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/storage') 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: -- cgit v1.2.1