Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dma-mapping: replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24)

Replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Yang Hongyang and committed by
Linus Torvalds
2f4f27d4 ce0b6201

+15 -15
+1 -1
arch/ia64/kernel/pci-dma.c
··· 75 75 /* Copied from i386. Doesn't make much sense, because it will 76 76 only work for pci_alloc_coherent. 77 77 The caller just has to use GFP_DMA in this case. */ 78 - if (mask < DMA_24BIT_MASK) 78 + if (mask < DMA_BIT_MASK(24)) 79 79 return 0; 80 80 81 81 /* Tell the device to use SAC when IOMMU force is on. This
+2 -2
arch/x86/include/asm/dma-mapping.h
··· 238 238 239 239 dma_mask = dev->coherent_dma_mask; 240 240 if (!dma_mask) 241 - dma_mask = (gfp & GFP_DMA) ? DMA_24BIT_MASK : DMA_BIT_MASK(32); 241 + dma_mask = (gfp & GFP_DMA) ? DMA_BIT_MASK(24) : DMA_BIT_MASK(32); 242 242 243 243 return dma_mask; 244 244 } ··· 247 247 { 248 248 unsigned long dma_mask = dma_alloc_coherent_mask(dev, gfp); 249 249 250 - if (dma_mask <= DMA_24BIT_MASK) 250 + if (dma_mask <= DMA_BIT_MASK(24)) 251 251 gfp |= GFP_DMA; 252 252 #ifdef CONFIG_X86_64 253 253 if (dma_mask <= DMA_BIT_MASK(32) && !(gfp & GFP_DMA))
+1 -1
arch/x86/kernel/pci-dma.c
··· 243 243 /* Copied from i386. Doesn't make much sense, because it will 244 244 only work for pci_alloc_coherent. 245 245 The caller just has to use GFP_DMA in this case. */ 246 - if (mask < DMA_24BIT_MASK) 246 + if (mask < DMA_BIT_MASK(24)) 247 247 return 0; 248 248 249 249 /* Tell the device to use SAC when IOMMU force is on. This
+1 -1
drivers/base/isa.c
··· 141 141 isa_dev->dev.release = isa_dev_release; 142 142 isa_dev->id = id; 143 143 144 - isa_dev->dev.coherent_dma_mask = DMA_24BIT_MASK; 144 + isa_dev->dev.coherent_dma_mask = DMA_BIT_MASK(24); 145 145 isa_dev->dev.dma_mask = &isa_dev->dev.coherent_dma_mask; 146 146 147 147 error = device_register(&isa_dev->dev);
+1 -1
drivers/pnp/card.c
··· 167 167 card->dev.parent = &card->protocol->dev; 168 168 dev_set_name(&card->dev, "%02x:%02x", card->protocol->number, card->number); 169 169 170 - card->dev.coherent_dma_mask = DMA_24BIT_MASK; 170 + card->dev.coherent_dma_mask = DMA_BIT_MASK(24); 171 171 card->dev.dma_mask = &card->dev.coherent_dma_mask; 172 172 173 173 dev_id = pnp_add_card_id(card, pnpid);
+1 -1
drivers/pnp/core.c
··· 137 137 INIT_LIST_HEAD(&dev->options); 138 138 dev->protocol = protocol; 139 139 dev->number = id; 140 - dev->dma_mask = DMA_24BIT_MASK; 140 + dev->dma_mask = DMA_BIT_MASK(24); 141 141 142 142 dev->dev.parent = &dev->protocol->dev; 143 143 dev->dev.bus = &pnp_bus_type;
+2 -2
sound/pci/als4000.c
··· 872 872 return err; 873 873 } 874 874 /* check, if we can restrict PCI DMA transfers to 24 bits */ 875 - if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 || 876 - pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) { 875 + if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 || 876 + pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) { 877 877 snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n"); 878 878 pci_disable_device(pci); 879 879 return -ENXIO;
+2 -2
sound/pci/azt3328.c
··· 2125 2125 chip->irq = -1; 2126 2126 2127 2127 /* check if we can restrict PCI DMA transfers to 24 bits */ 2128 - if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 || 2129 - pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) { 2128 + if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 || 2129 + pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) { 2130 2130 snd_printk(KERN_ERR "architecture does not support " 2131 2131 "24bit PCI busmaster DMA\n" 2132 2132 );
+2 -2
sound/pci/es1938.c
··· 1608 1608 if ((err = pci_enable_device(pci)) < 0) 1609 1609 return err; 1610 1610 /* check, if we can restrict PCI DMA transfers to 24 bits */ 1611 - if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 || 1612 - pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) { 1611 + if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 || 1612 + pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) { 1613 1613 snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n"); 1614 1614 pci_disable_device(pci); 1615 1615 return -ENXIO;
+2 -2
sound/pci/sonicvibes.c
··· 1264 1264 if ((err = pci_enable_device(pci)) < 0) 1265 1265 return err; 1266 1266 /* check, if we can restrict PCI DMA transfers to 24 bits */ 1267 - if (pci_set_dma_mask(pci, DMA_24BIT_MASK) < 0 || 1268 - pci_set_consistent_dma_mask(pci, DMA_24BIT_MASK) < 0) { 1267 + if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 || 1268 + pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) { 1269 1269 snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n"); 1270 1270 pci_disable_device(pci); 1271 1271 return -ENXIO;