aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-26 01:44:10 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-26 03:19:50 -0400
commit6c830fefcc2e9d20f0a6c6aff43c8d333da2ea46 (patch)
tree21c70ff793b00e955cd6e13d4481cb0c90ef660b /arch/sparc64/kernel
parent99cd220133cdf2a559529d522a78b2ebc1bef2d8 (diff)
[SPARC64]: Fix sparse warnings in arch/sparc64/kernel/iommu.c
Fix local variable shadowing in dma_4u_map_sg(). Mark sun4u_dma_ops static. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r--arch/sparc64/kernel/iommu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c
index fbaab3497bfd..b781d3d54fb8 100644
--- a/arch/sparc64/kernel/iommu.c
+++ b/arch/sparc64/kernel/iommu.c
@@ -626,7 +626,7 @@ static int dma_4u_map_sg(struct device *dev, struct scatterlist *sglist,
626iommu_map_failed: 626iommu_map_failed:
627 for_each_sg(sglist, s, nelems, i) { 627 for_each_sg(sglist, s, nelems, i) {
628 if (s->dma_length != 0) { 628 if (s->dma_length != 0) {
629 unsigned long vaddr, npages, entry, i; 629 unsigned long vaddr, npages, entry, j;
630 iopte_t *base; 630 iopte_t *base;
631 631
632 vaddr = s->dma_address & IO_PAGE_MASK; 632 vaddr = s->dma_address & IO_PAGE_MASK;
@@ -637,8 +637,8 @@ iommu_map_failed:
637 >> IO_PAGE_SHIFT; 637 >> IO_PAGE_SHIFT;
638 base = iommu->page_table + entry; 638 base = iommu->page_table + entry;
639 639
640 for (i = 0; i < npages; i++) 640 for (j = 0; j < npages; j++)
641 iopte_make_dummy(iommu, base + i); 641 iopte_make_dummy(iommu, base + j);
642 642
643 s->dma_address = DMA_ERROR_CODE; 643 s->dma_address = DMA_ERROR_CODE;
644 s->dma_length = 0; 644 s->dma_length = 0;
@@ -803,7 +803,7 @@ static void dma_4u_sync_sg_for_cpu(struct device *dev,
803 spin_unlock_irqrestore(&iommu->lock, flags); 803 spin_unlock_irqrestore(&iommu->lock, flags);
804} 804}
805 805
806const struct dma_ops sun4u_dma_ops = { 806static const struct dma_ops sun4u_dma_ops = {
807 .alloc_coherent = dma_4u_alloc_coherent, 807 .alloc_coherent = dma_4u_alloc_coherent,
808 .free_coherent = dma_4u_free_coherent, 808 .free_coherent = dma_4u_free_coherent,
809 .map_single = dma_4u_map_single, 809 .map_single = dma_4u_map_single,