Skip to contentSkip to conversation

aic7xxx driver warning

PATCH In review Miguel Angel Flores 2 participants 2 messages Dec 10, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aic7xxx driver warning

Hi all,

These are two possible patches for the 2.6.10rc3. The patches correct a compiler warning when CONFIG_HIGHMEM64G is not defined.

Both patches works well. "Opt1" is the Alan Cox way and "Opt2" is the MaF way :-)

Cheers,
MaF

drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +1 -1
diff -r -u linux-2.6.10rc3/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c linux-2.6.10rc3-maf/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
@@ -226,7 +226,7 @@
 	}
 	pci_set_master(pdev);
 
-	mask_39bit = 0x7FFFFFFFFFULL;
+	mask_39bit = (dma_addr_t)0x7FFFFFFFFFULL;
 	if (sizeof(dma_addr_t) > 4
 	 && ahc_linux_get_memsize() > 0x80000000
 	 && pci_set_dma_mask(pdev, mask_39bit) == 0) {
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +1 -1
diff -r -u linux-2.6.10rc3/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c linux-2.6.10rc3-maf/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
@@ -226,10 +226,10 @@
 	}
 	pci_set_master(pdev);
 
-	mask_39bit = 0x7FFFFFFFFFULL;
 	if (sizeof(dma_addr_t) > 4
 	 && ahc_linux_get_memsize() > 0x80000000
 	 && pci_set_dma_mask(pdev, mask_39bit) == 0) {
+		mask_39bit = (dma_addr_t)0x7FFFFFFFFFULL;
 		ahc->flags |= AHC_39BIT_ADDRESSING;
 		ahc->platform_data->hw_dma_mask = mask_39bit;
 	} else {
#1 lore raw
Quoted 7 lines · Miguel Angel Flores

Hi all,

These are two possible patches for the 2.6.10rc3. The patches correct a compiler warning when CONFIG_HIGHMEM64G is not defined.

Both patches works well. "Opt1" is the Alan Cox way and "Opt2" is the MaF way :-)

-       mask_39bit = 0x7FFFFFFFFFULL;
        if (sizeof(dma_addr_t) > 4
         && ahc_linux_get_memsize() > 0x80000000
         && pci_set_dma_mask(pdev, mask_39bit) == 0) {
+               mask_39bit = (dma_addr_t)0x7FFFFFFFFFULL;
                ahc->flags |= AHC_39BIT_ADDRESSING;
                ahc->platform_data->hw_dma_mask = mask_39bit;
        } else {

How can this work ? You're using mask_39bit before you set it (See the pci_set_dma_mask call)

Dave