Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christoph Hellwig and committed by
Martin K. Petersen
e6ab6113 e9d658c2

+2 -4
+2 -4
drivers/scsi/aha1542.c
··· 268 268 struct bio_vec bv; 269 269 270 270 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); 273 272 buf += bv.bv_len; 274 273 } 275 274 } ··· 451 452 struct bio_vec bv; 452 453 453 454 rq_for_each_segment(bv, rq, iter) { 454 - memcpy_from_page(buf, bv.bv_page, bv.bv_offset, 455 - bv.bv_len); 455 + memcpy_from_bvec(buf, &bv); 456 456 buf += bv.bv_len; 457 457 } 458 458 }