[PATCH] umem: use DMA_{32,64}BIT_MASK and correct call to pci_set_dma_mask() From: Tobias Klauser Since nobody replied to Domen's request for clarification [1], here's a patch to fix drivers/block/umem.c to correctly evaluate the return value of pci_set_dma_mask() both times. The function returns non-null on error, so this seems to be correct. [1] http://lists.osdl.org/mailman/htdig/kernel-janitors/2005-May/004119.html Signed-off-by: Tobias Klauser Signed-off-by: Alexey Dobriyan Index: linux-kj/drivers/block/umem.c =================================================================== --- linux-kj.orig/drivers/block/umem.c 2005-10-28 16:25:06.000000000 +0400 +++ linux-kj/drivers/block/umem.c 2005-10-28 16:31:24.000000000 +0400 @@ -892,8 +892,8 @@ static int __devinit mm_pci_probe(struct printk(KERN_INFO "Micro Memory(tm) controller #%d found at %02x:%02x (PCI Mem Module (Battery Backup))\n", card->card_number, dev->bus->number, dev->devfn); - if (pci_set_dma_mask(dev, 0xffffffffffffffffLL) && - !pci_set_dma_mask(dev, 0xffffffffLL)) { + if (pci_set_dma_mask(dev, DMA_64BIT_MASK) && + pci_set_dma_mask(dev, DMA_32BIT_MASK)) { printk(KERN_WARNING "MM%d: NO suitable DMA found\n",num_cards); return -ENOMEM; }