提交 145106e8 编写于 作者: M Muli Ben-Yehuda 提交者: Andi Kleen

[PATCH] remove superflous BUG_ON's in nommu and gart

There's no need to check for invalid DMA data direction in nommu and
gart since we do it in dma-mapping.h anyway before calling the
individual dma-ops.
Signed-off-by: NMuli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: NAndi Kleen <ak@suse.de>
上级 29a6c25b
...@@ -239,8 +239,6 @@ dma_addr_t gart_map_single(struct device *dev, void *addr, size_t size, int dir) ...@@ -239,8 +239,6 @@ dma_addr_t gart_map_single(struct device *dev, void *addr, size_t size, int dir)
{ {
unsigned long phys_mem, bus; unsigned long phys_mem, bus;
BUG_ON(dir == DMA_NONE);
if (!dev) if (!dev)
dev = &fallback_dev; dev = &fallback_dev;
...@@ -383,7 +381,6 @@ int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, int dir) ...@@ -383,7 +381,6 @@ int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, int dir)
unsigned long pages = 0; unsigned long pages = 0;
int need = 0, nextneed; int need = 0, nextneed;
BUG_ON(dir == DMA_NONE);
if (nents == 0) if (nents == 0)
return 0; return 0;
......
...@@ -59,7 +59,6 @@ int nommu_map_sg(struct device *hwdev, struct scatterlist *sg, ...@@ -59,7 +59,6 @@ int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
{ {
int i; int i;
BUG_ON(direction == DMA_NONE);
for (i = 0; i < nents; i++ ) { for (i = 0; i < nents; i++ ) {
struct scatterlist *s = &sg[i]; struct scatterlist *s = &sg[i];
BUG_ON(!s->page); BUG_ON(!s->page);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册