ULL postfixes for tg3.c
PATCH 1/1 ULL postfixes for tg3.c
The patch below adds ULL postfixes to three constants in tg3.c .
There's no need to create an int constant and later cast it to u64.
The second case was also incorrect since the constant was too big for an int.
Please apply
Adrian
drivers/net/tg3.c renamed from drivers/net/tg3.c.old +3 -3
@@ -6679,16 +6679,16 @@ }/* Configure DMA attributes. */ -if (!pci_set_dma_mask (pdev, (u64 )0xffffffffffffffffULL )) { +if (!pci_set_dma_mask (pdev,0xffffffffffffffffULL )) { pci_using_dac =1 ;if (pci_set_consistent_dma_mask (pdev, - (u64 )0xffffffffffffffff )) { +0xffffffffffffffffULL )) { printk(KERN_ERR PFX "Unable to obtain 64 bit DMA " "for consistent allocations\n"); goto err_out_free_res; } }else { - err =pci_set_dma_mask (pdev, (u64 )0xffffffff ); + err =pci_set_dma_mask (pdev,0xffffffffULL );if (err) { printk(KERN_ERR PFX "No usable DMA configuration, " "aborting.\n");
I'll apply this, the INT64_MAX or whatever ideas are just stupid. We're saying what "bits" the device supports when it does DMA, so we should pass in a "bit" mask.
Quoted 3 lines · David S. Miller
I'll apply this, the
INT64_MAXor whatever ideas are just stupid. We're saying what "bits" the device supports when it does DMA, so we should pass in a "bit" mask.
however it might be a good idea to define a PCI_DMAMASK_64BIT (and 32 bit) with the right values ?
Quoted 3 lines · David S. Miller
I'll apply this, the
INT64_MAXor whatever ideas are just stupid. We're saying what "bits" the device supports when it does DMA, so we should pass in a "bit" mask.
no need. look what's in the pipe already.