diff options
author | Christoph Hellwig <hch@lst.de> | 2022-03-03 14:19:05 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-03-04 12:29:21 -0700 |
commit | 13d4ef0f66b7ee9415e101e213acaf94a0cb28ee (patch) | |
tree | 86ec96afe0e08e3c62eee56acc00967e6c9c45af /drivers/block/floppy.c | |
parent | 3eddaa60b8411c135d1c71090dea9b59ff3f2e26 (diff) | |
download | linux-stable-13d4ef0f66b7ee9415e101e213acaf94a0cb28ee.tar.gz linux-stable-13d4ef0f66b7ee9415e101e213acaf94a0cb28ee.tar.bz2 linux-stable-13d4ef0f66b7ee9415e101e213acaf94a0cb28ee.zip |
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>
Diffstat (limited to 'drivers/block/floppy.c')
-rw-r--r-- | drivers/block/floppy.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 19c2d0327e15..8c647532e3ce 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -2485,11 +2485,9 @@ static void copy_buffer(int ssize, int max_sector, int max_sector_2) } if (CT(raw_cmd->cmd[COMMAND]) == FD_READ) - memcpy_to_page(bv.bv_page, bv.bv_offset, dma_buffer, - size); + memcpy_to_bvec(&bv, dma_buffer); else - memcpy_from_page(dma_buffer, bv.bv_page, bv.bv_offset, - size); + memcpy_from_bvec(dma_buffer, &bv); remaining -= size; dma_buffer += size; |