diff options
author | David S. Miller <davem@davemloft.net> | 2006-02-20 04:42:51 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:13:45 -0500 |
commit | d82965c16781a7c5b8508c3784ba10bbeef34ff4 (patch) | |
tree | fb2510731dc418c3271edfc50fec75c80a035ae6 /arch | |
parent | abf3b7bd89c11492b145e338913c0b511084cff7 (diff) |
[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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc64/kernel/pci_sun4v.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index d9ef0c7580ea..a9c44c0ae0a7 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -57,7 +57,7 @@ static long pci_iommu_batch_flush(struct pci_iommu_batch *p) | |||
57 | u64 *pglist = p->pglist; | 57 | u64 *pglist = p->pglist; |
58 | unsigned long npages = p->npages; | 58 | unsigned long npages = p->npages; |
59 | 59 | ||
60 | do { | 60 | while (npages != 0) { |
61 | long num; | 61 | long num; |
62 | 62 | ||
63 | num = pci_sun4v_iommu_map(devhandle, HV_PCI_TSBID(0, entry), | 63 | 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) | |||
75 | entry += num; | 75 | entry += num; |
76 | npages -= num; | 76 | npages -= num; |
77 | pglist += num; | 77 | pglist += num; |
78 | } while (npages != 0); | 78 | } |
79 | 79 | ||
80 | p->entry = entry; | 80 | p->entry = entry; |
81 | p->npages = 0; | 81 | p->npages = 0; |