提交 d82965c1 编写于 作者: D David S. Miller 提交者: David S. Miller

[SPARC64]: Handle zero-length map requests in pci_sun4v.c

By simply changing the do-while loop into a plain
while loop.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 abf3b7bd
......@@ -57,7 +57,7 @@ static long pci_iommu_batch_flush(struct pci_iommu_batch *p)
u64 *pglist = p->pglist;
unsigned long npages = p->npages;
do {
while (npages != 0) {
long num;
num = pci_sun4v_iommu_map(devhandle, HV_PCI_TSBID(0, entry),
......@@ -75,7 +75,7 @@ static long pci_iommu_batch_flush(struct pci_iommu_batch *p)
entry += num;
npages -= num;
pglist += num;
} while (npages != 0);
}
p->entry = entry;
p->npages = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册