Skip to content

Commit 13d4ef0

Browse files
Christoph Hellwigaxboe
authored andcommitted
floppy: use memcpy_{to,from}_bvec
Use the helpers instead of open coding them. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Link: https://lore.kernel.org/r/20220303111905.321089-11-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 3eddaa6 commit 13d4ef0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/block/floppy.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,11 +2485,9 @@ static void copy_buffer(int ssize, int max_sector, int max_sector_2)
24852485
}
24862486

24872487
if (CT(raw_cmd->cmd[COMMAND]) == FD_READ)
2488-
memcpy_to_page(bv.bv_page, bv.bv_offset, dma_buffer,
2489-
size);
2488+
memcpy_to_bvec(&bv, dma_buffer);
24902489
else
2491-
memcpy_from_page(dma_buffer, bv.bv_page, bv.bv_offset,
2492-
size);
2490+
memcpy_from_bvec(dma_buffer, &bv);
24932491

24942492
remaining -= size;
24952493
dma_buffer += size;

0 commit comments

Comments
 (0)