mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix printing when no interrupt is allocated
@ 2012-10-19  0:33 Daniel J Blueman
  2012-10-19  1:21 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel J Blueman @ 2012-10-19  0:33 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-acpi, linux-kernel, Daniel J Blueman

Previously a new line is implicitly added in the no GSI case:

[    7.185182] pci 0001:00:12.0: can't derive routing for PCI INT A
[    7.191352] pci 0001:00:12.0: PCI INT A: no GSI
[    7.195956]  - using ISA IRQ 10

The code thus prints a blank line where no legacy IRQ is available:

[    1.650124] pci 0000:00:14.0: can't derive routing for PCI INT A
[    1.650126] pci 0000:00:14.0: PCI INT A: no GSI
[    1.650126] 
[    1.650180] pci 0000:00:14.0: can't derive routing for PCI INT A

Fix this by making the newline explicit and removing the superfluous
one.

Signed-off-by: Daniel J Blueman <daniel@numascale-asia.com>
---
 drivers/acpi/pci_irq.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 0eefa12..2c37996 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -459,7 +459,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
 	 */
 	if (gsi < 0) {
 		u32 dev_gsi;
-		dev_warn(&dev->dev, "PCI INT %c: no GSI", pin_name(pin));
+		dev_warn(&dev->dev, "PCI INT %c: no GSI\n", pin_name(pin));
 		/* Interrupt Line values above 0xF are forbidden */
 		if (dev->irq > 0 && (dev->irq <= 0xF) &&
 		    (acpi_isa_irq_to_gsi(dev->irq, &dev_gsi) == 0)) {
@@ -467,11 +467,9 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
 			acpi_register_gsi(&dev->dev, dev_gsi,
 					  ACPI_LEVEL_SENSITIVE,
 					  ACPI_ACTIVE_LOW);
-			return 0;
-		} else {
-			printk("\n");
-			return 0;
 		}
+
+		return 0;
 	}
 
 	rc = acpi_register_gsi(&dev->dev, gsi, triggering, polarity);
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-31  9:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-19  0:33 [PATCH] Fix printing when no interrupt is allocated Daniel J Blueman
2012-10-19  1:21 ` Joe Perches
2012-10-31  9:03   ` Daniel J Blueman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®