Commit b7494554 authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Adrian Bunk

BUG_ON() Conversion in drivers/parisc/

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.
Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
parent 089fe1b2
...@@ -1724,9 +1724,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa, ...@@ -1724,9 +1724,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa,
sba_dev->chip_resv.start = PCI_F_EXTEND | 0xfef00000UL; sba_dev->chip_resv.start = PCI_F_EXTEND | 0xfef00000UL;
sba_dev->chip_resv.end = PCI_F_EXTEND | (0xff000000UL - 1) ; sba_dev->chip_resv.end = PCI_F_EXTEND | (0xff000000UL - 1) ;
err = request_resource(&iomem_resource, &(sba_dev->chip_resv)); err = request_resource(&iomem_resource, &(sba_dev->chip_resv));
if (err < 0) { BUG_ON(err < 0);
BUG();
}
} else if (IS_PLUTO(sba_dev->iodc)) { } else if (IS_PLUTO(sba_dev->iodc)) {
int err; int err;
...@@ -2185,8 +2183,7 @@ void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r) ...@@ -2185,8 +2183,7 @@ void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r)
int i; int i;
int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */ int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */
if ((t!=HPHW_IOA) && (t!=HPHW_BCPORT)) BUG_ON((t!=HPHW_IOA) && (t!=HPHW_BCPORT));
BUG();
r->start = r->end = 0; r->start = r->end = 0;
...@@ -2228,8 +2225,7 @@ void sba_distributed_lmmio(struct parisc_device *pci_hba, struct resource *r ) ...@@ -2228,8 +2225,7 @@ void sba_distributed_lmmio(struct parisc_device *pci_hba, struct resource *r )
int base, size; int base, size;
int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */ int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */
if ((t!=HPHW_IOA) && (t!=HPHW_BCPORT)) BUG_ON((t!=HPHW_IOA) && (t!=HPHW_BCPORT));
BUG();
r->start = r->end = 0; r->start = r->end = 0;
......
...@@ -157,8 +157,8 @@ superio_init(struct pci_dev *pcidev) ...@@ -157,8 +157,8 @@ superio_init(struct pci_dev *pcidev)
if (sio->suckyio_irq_enabled) if (sio->suckyio_irq_enabled)
return; return;
if (!pdev) BUG(); BUG_ON(!pdev);
if (!sio->usb_pdev) BUG(); BUG_ON(!sio->usb_pdev);
/* use the IRQ iosapic found for USB INT D... */ /* use the IRQ iosapic found for USB INT D... */
pdev->irq = sio->usb_pdev->irq; pdev->irq = sio->usb_pdev->irq;
...@@ -474,8 +474,7 @@ superio_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -474,8 +474,7 @@ superio_probe(struct pci_dev *dev, const struct pci_device_id *id)
dev->subsystem_vendor, dev->subsystem_device, dev->subsystem_vendor, dev->subsystem_device,
dev->class); dev->class);
if (!sio->suckyio_irq_enabled) BUG_ON(!sio->suckyio_irq_enabled); /* Enabled by PCI_FIXUP_FINAL */
BUG(); /* Enabled by PCI_FIXUP_FINAL */
if (dev->device == PCI_DEVICE_ID_NS_87560_LIO) { /* Function 1 */ if (dev->device == PCI_DEVICE_ID_NS_87560_LIO) { /* Function 1 */
superio_parport_init(); superio_parport_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment