]> www.infradead.org Git - users/hch/block.git/commitdiff
floppy: use memcpy_{to,from}_bvec bvec-kmap
authorChristoph Hellwig <hch@lst.de>
Sat, 22 May 2021 06:58:33 +0000 (08:58 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 1 Mar 2022 12:21:39 +0000 (14:21 +0200)
Use the helpers instead of open coding them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
drivers/block/floppy.c

index 19c2d0327e157ae2ac79b57933018fa301f5d022..8c647532e3ce99fd285216792590dd95257f0f68 100644 (file)
@@ -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;