Commit e6ab6113 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen
Browse files

scsi: aha1542: Use memcpy_{from,to}_bvec()

Use the memcpy_{from,to}_bvec() helpers instead of open coding them.

Link: https://lore.kernel.org/r/20211018060802.1815982-1-hch@lst.de


Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e9d658c2
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -268,8 +268,7 @@ static void aha1542_free_cmd(struct scsi_cmnd *cmd)
		struct bio_vec bv;

		rq_for_each_segment(bv, rq, iter) {
			memcpy_to_page(bv.bv_page, bv.bv_offset, buf,
				       bv.bv_len);
			memcpy_to_bvec(&bv, buf);
			buf += bv.bv_len;
		}
	}
@@ -452,8 +451,7 @@ static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
		struct bio_vec bv;

		rq_for_each_segment(bv, rq, iter) {
			memcpy_from_page(buf, bv.bv_page, bv.bv_offset,
					 bv.bv_len);
			memcpy_from_bvec(buf, &bv);
			buf += bv.bv_len;
		}
	}