Skip to content

Commit

Permalink
[SPARC64]: Handle zero-length map requests in pci_sun4v.c
Browse files Browse the repository at this point in the history
By simply changing the do-while loop into a plain
while loop.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller authored and David S. Miller committed Mar 20, 2006
1 parent abf3b7b commit d82965c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sparc64/kernel/pci_sun4v.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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;
Expand Down

0 comments on commit d82965c

Please sign in to comment.