patch-2.4.14 linux/arch/alpha/kernel/pci_iommu.c

Next file: linux/arch/alpha/kernel/setup.c
Previous file: linux/arch/alpha/kernel/pci.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.13/linux/arch/alpha/kernel/pci_iommu.c linux/arch/alpha/kernel/pci_iommu.c
@@ -250,7 +250,7 @@
 	if (dir == PCI_DMA_NONE)
 		BUG();
 	return pci_map_single_1(pdev, cpu_addr, size,
-			        (pdev->dma_mask >> 32) != 0);
+				pdev ? (pdev->dma_mask >> 32) != 0 : 0);
 }
 
 dma_addr_t
@@ -260,7 +260,7 @@
 	if (dir == PCI_DMA_NONE)
 		BUG();
 	return pci_map_single_1(pdev, (char *)page_address(page) + offset,
-			        size, (pdev->dma_mask >> 32) != 0);
+			        size, pdev ? (pdev->dma_mask >> 32) != 0 : 0);
 }
 
 /* Unmap a single streaming mode DMA translation.  The DMA_ADDR and
@@ -304,7 +304,7 @@
 	dma_ofs = (dma_addr - arena->dma_base) >> PAGE_SHIFT;
 	if (dma_ofs * PAGE_SIZE >= arena->size) {
 		printk(KERN_ERR "Bogus pci_unmap_single: dma_addr %lx "
-		       " base %x size %x\n", dma_addr, arena->dma_base,
+		       " base %lx size %x\n", dma_addr, arena->dma_base,
 		       arena->size);
 		return;
 		BUG();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)