Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f33d7e2d authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Linus Torvalds
Browse files

dma-mapping: fix dma_sync_single_range_*



dma_sync_single_range_for_cpu() and dma_sync_single_range_for_device() use
a wrong address with a partial synchronization.

Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fc2a093e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev,
		debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir);

	} else
		dma_sync_single_for_cpu(dev, addr, size, dir);
		dma_sync_single_for_cpu(dev, addr + offset, size, dir);
}

static inline void dma_sync_single_range_for_device(struct device *dev,
@@ -148,7 +148,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev,
		debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir);

	} else
		dma_sync_single_for_device(dev, addr, size, dir);
		dma_sync_single_for_device(dev, addr + offset, size, dir);
}

static inline void