Skip to contentSkip to conversation

postfix a constant in cciss.c with ULL

PATCH New Adrian Bunk 1 participant 1 message Jun 24, 2003 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 postfix a constant in cciss.c with ULL

The patch below postfixes a constant in cciss.h with ULL, on 32 bit archs this constant is too big for an int.

The cast doesn't do the right thing, 0xffffffffffffffff is in C an int and the cast casts 0xffffffffffffffff interpreted as an int to an u64.

Please apply
Adrian

drivers/block/cciss.c renamed from drivers/block/cciss.c.old +1 -1
@@ -2457,7 +2457,7 @@
 	hba[i]->pdev = pdev;
 
 	/* configure PCI DMA stuff */
-	if (!pci_set_dma_mask(pdev, (u64) 0xffffffffffffffff))
+	if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL))
 		printk("cciss: using DAC cycles\n");
 	else if (!pci_set_dma_mask(pdev, 0xffffffff))
 		printk("cciss: not using DAC cycles\n");