summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aha1542.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-10-18 08:08:02 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-10-19 20:07:19 +0200
commite6ab6113526aa485ca4256dbbfd8e6f48a4575f6 (patch)
treeab55499cb9ffe74421778f8d737a55dbf1e87bd4 /drivers/scsi/aha1542.c
parentscsi: sr: Add error handling support for add_disk() (diff)
downloadlinux-e6ab6113526aa485ca4256dbbfd8e6f48a4575f6.tar.xz
linux-e6ab6113526aa485ca4256dbbfd8e6f48a4575f6.zip
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: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r--drivers/scsi/aha1542.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index 8697f4720946..f0e8ae9f5e40 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -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;
}
}