Skip to content

Commit e6ab611

Browse files
Christoph Hellwigmartinkpetersen
authored andcommitted
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/[email protected] Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent e9d658c commit e6ab611

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/scsi/aha1542.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ static void aha1542_free_cmd(struct scsi_cmnd *cmd)
268268
struct bio_vec bv;
269269

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

454453
rq_for_each_segment(bv, rq, iter) {
455-
memcpy_from_page(buf, bv.bv_page, bv.bv_offset,
456-
bv.bv_len);
454+
memcpy_from_bvec(buf, &bv);
457455
buf += bv.bv_len;
458456
}
459457
}

0 commit comments

Comments
 (0)