scsi: uas: Use scsi_[gs]et_resid() where appropriate

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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Bart Van Assche 2019-02-08 13:25:01 -08:00 committed by Martin K. Petersen
parent 42d387be5b
commit 229531be69
1 changed files with 2 additions and 2 deletions

View File

@ -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: