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

parisc: remove the HBA_DATA macro

No need to hide a cast in a macro, especially as all users have
cleaner ways to archive the result than blind casting.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Christoph Hellwig and committed by
Helge Deller
3654f012 50075267

+9 -8
-2
arch/parisc/include/asm/pci.h
··· 66 66 char gmmio_name[HBA_NAME_SIZE]; 67 67 }; 68 68 69 - #define HBA_DATA(d) ((struct pci_hba_data *) (d)) 70 - 71 69 /* 72 70 ** We support 2^16 I/O ports per HBA. These are set up in the form 73 71 ** 0xbbxxxx, where bb is the bus number and xxxx is the I/O port
+6 -3
drivers/parisc/ccio-dma.c
··· 1519 1519 { 1520 1520 int i; 1521 1521 struct ioc *ioc, **ioc_p = &ioc_list; 1522 + struct pci_hba_data *hba; 1522 1523 1523 1524 ioc = kzalloc(sizeof(struct ioc), GFP_KERNEL); 1524 1525 if (ioc == NULL) { ··· 1546 1545 ccio_ioc_init(ioc); 1547 1546 ccio_init_resources(ioc); 1548 1547 hppa_dma_ops = &ccio_ops; 1549 - dev->dev.platform_data = kzalloc(sizeof(struct pci_hba_data), GFP_KERNEL); 1550 1548 1549 + hba = kzalloc(sizeof(*hba), GFP_KERNEL); 1551 1550 /* if this fails, no I/O cards will work, so may as well bug */ 1552 - BUG_ON(dev->dev.platform_data == NULL); 1553 - HBA_DATA(dev->dev.platform_data)->iommu = ioc; 1551 + BUG_ON(hba == NULL); 1552 + 1553 + hba->iommu = ioc; 1554 + dev->dev.platform_data = hba; 1554 1555 1555 1556 #ifdef CONFIG_PROC_FS 1556 1557 if (ioc_count == 0) {
+3 -3
drivers/parisc/lba_pci.c
··· 1275 1275 r->flags = IORESOURCE_MEM; 1276 1276 /* mmio_mask also clears Enable bit */ 1277 1277 r->start &= mmio_mask; 1278 - r->start = PCI_HOST_ADDR(HBA_DATA(lba_dev), r->start); 1278 + r->start = PCI_HOST_ADDR(&lba_dev->hba, r->start); 1279 1279 rsize = ~ READ_REG32(lba_dev->hba.base_addr + LBA_LMMIO_MASK); 1280 1280 1281 1281 /* ··· 1321 1321 r->flags = IORESOURCE_MEM; 1322 1322 /* mmio_mask also clears Enable bit */ 1323 1323 r->start &= mmio_mask; 1324 - r->start = PCI_HOST_ADDR(HBA_DATA(lba_dev), r->start); 1324 + r->start = PCI_HOST_ADDR(&lba_dev->hba, r->start); 1325 1325 rsize = READ_REG32(lba_dev->hba.base_addr + LBA_ELMMIO_MASK); 1326 1326 r->end = r->start + ~rsize; 1327 1327 } ··· 1562 1562 1563 1563 /* ------------ Second : initialize common stuff ---------- */ 1564 1564 pci_bios = &lba_bios_ops; 1565 - pcibios_register_hba(HBA_DATA(lba_dev)); 1565 + pcibios_register_hba(&lba_dev->hba); 1566 1566 spin_lock_init(&lba_dev->lba_lock); 1567 1567 1568 1568 if (lba_hw_init(lba_dev))