From daniel.marjamaki@comhem.se Thu Dec 1 09:06:11 2005 Date: Thu, 1 Dec 2005 18:01:28 +0100 From: Daniel Marjamäki To: Greg KH Subject: PCI: irq.c: trivial printk and DBG updates Message-Id: <20051201180128.40bc358a.daniel.marjamaki@comhem.se> Updated printk and DBG with appropriate KERN_*. Signed-off-by: Daniel Marjamäki Signed-off-by: Greg Kroah-Hartman --- arch/i386/pci/irq.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) --- gregkh-2.6.orig/arch/i386/pci/irq.c +++ gregkh-2.6/arch/i386/pci/irq.c @@ -78,7 +78,7 @@ static inline struct irq_routing_table * for (i=0; i < rt->size; i++) sum += addr[i]; if (!sum) { - DBG("PCI: Interrupt Routing Table found at 0x%p\n", rt); + DBG(KERN_DEBUG "PCI: Interrupt Routing Table found at 0x%p\n", rt); return rt; } return NULL; @@ -128,7 +128,7 @@ static void __init pirq_peer_trick(void) #ifdef DEBUG { int j; - DBG("%02x:%02x slot=%02x", e->bus, e->devfn/8, e->slot); + DBG(KERN_DEBUG "%02x:%02x slot=%02x", e->bus, e->devfn/8, e->slot); for(j=0; j<4; j++) DBG(" %d:%02x/%04x", j, e->irq[j].link, e->irq[j].bitmap); DBG("\n"); @@ -160,10 +160,10 @@ void eisa_set_level_irq(unsigned int irq return; eisa_irq_mask |= (1 << irq); - printk("PCI: setting IRQ %u as level-triggered\n", irq); + printk(KERN_DEBUG "PCI: setting IRQ %u as level-triggered\n", irq); val = inb(port); if (!(val & mask)) { - DBG(" -> edge"); + DBG(KERN_DEBUG " -> edge"); outb(val | mask, port); } } @@ -677,11 +677,11 @@ static __init int ali_router_probe(struc { case PCI_DEVICE_ID_AL_M1533: case PCI_DEVICE_ID_AL_M1563: - printk("PCI: Using ALI IRQ Router\n"); - r->name = "ALI"; - r->get = pirq_ali_get; - r->set = pirq_ali_set; - return 1; + printk(KERN_DEBUG "PCI: Using ALI IRQ Router\n"); + r->name = "ALI"; + r->get = pirq_ali_get; + r->set = pirq_ali_set; + return 1; } return 0; } @@ -749,12 +749,13 @@ static void __init pirq_find_router(stru r->get = NULL; r->set = NULL; - DBG("PCI: Attempting to find IRQ router for %04x:%04x\n", + DBG(KERN_DEBUG "PCI: Attempting to find IRQ router for %04x:%04x\n", rt->rtr_vendor, rt->rtr_device); pirq_router_dev = pci_find_slot(rt->rtr_bus, rt->rtr_devfn); if (!pirq_router_dev) { - DBG("PCI: Interrupt router not found at %02x:%02x\n", rt->rtr_bus, rt->rtr_devfn); + DBG(KERN_DEBUG "PCI: Interrupt router not found at " + "%02x:%02x\n", rt->rtr_bus, rt->rtr_devfn); return; } @@ -799,7 +800,7 @@ static int pcibios_lookup_irq(struct pci /* Find IRQ pin */ pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); if (!pin) { - DBG(" -> no interrupt pin\n"); + DBG(KERN_DEBUG " -> no interrupt pin\n"); return 0; } pin = pin - 1; @@ -809,16 +810,16 @@ static int pcibios_lookup_irq(struct pci if (!pirq_table) return 0; - DBG("IRQ for %s[%c]", pci_name(dev), 'A' + pin); + DBG(KERN_DEBUG "IRQ for %s[%c]", pci_name(dev), 'A' + pin); info = pirq_get_info(dev); if (!info) { - DBG(" -> not found in routing table\n"); + DBG(" -> not found in routing table\n" KERN_DEBUG); return 0; } pirq = info->irq[pin].link; mask = info->irq[pin].bitmap; if (!pirq) { - DBG(" -> not routed\n"); + DBG(" -> not routed\n" KERN_DEBUG); return 0; } DBG(" -> PIRQ %02x, mask %04x, excl %04x", pirq, mask, pirq_table->exclusive_irqs); @@ -848,7 +849,10 @@ static int pcibios_lookup_irq(struct pci newirq = dev->irq; if (newirq && !((1 << newirq) & mask)) { if ( pci_probe & PCI_USE_PIRQ_MASK) newirq = 0; - else printk(KERN_WARNING "PCI: IRQ %i for device %s doesn't match PIRQ mask - try pci=usepirqmask\n", newirq, pci_name(dev)); + else printk("\n" KERN_WARNING + "PCI: IRQ %i for device %s doesn't match PIRQ mask " + "- try pci=usepirqmask\n" KERN_DEBUG, newirq, + pci_name(dev)); } if (!newirq && assign) { for (i = 0; i < 16; i++) { @@ -923,14 +927,14 @@ static void __init pcibios_fixup_irqs(vo struct pci_dev *dev = NULL; u8 pin; - DBG("PCI: IRQ fixup\n"); + DBG(KERN_DEBUG "PCI: IRQ fixup\n"); while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { /* * If the BIOS has set an out of range IRQ number, just ignore it. * Also keep track of which IRQ's are already in use. */ if (dev->irq >= 16) { - DBG("%s: ignoring bogus IRQ %d\n", pci_name(dev), dev->irq); + DBG(KERN_DEBUG "%s: ignoring bogus IRQ %d\n", pci_name(dev), dev->irq); dev->irq = 0; } /* If the IRQ is already assigned to a PCI device, ignore its ISA use penalty */ @@ -1039,7 +1043,7 @@ static struct dmi_system_id __initdata p static int __init pcibios_irq_init(void) { - DBG("PCI: IRQ init\n"); + DBG(KERN_DEBUG "PCI: IRQ init\n"); if (pcibios_enable_irq || raw_pci_ops == NULL) return 0;