Message ID | 20220222155156.597597-11-hch@lst.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [01/10] iss-simdisk: use bvec_kmap_local in simdisk_submit_bio | expand |
On Tue, Feb 22, 2022 at 04:51:56PM +0100, Christoph Hellwig wrote: > 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 | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c > index 19c2d0327e157..8c647532e3ce9 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; > -- > 2.30.2 > >
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 19c2d0327e157..8c647532e3ce9 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;
Use the helpers instead of open coding them. Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/block/floppy.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)