From: mochel@linux.intel.com
To: linux-acpi@vger.kernel.org
Cc: Patrick Mochel <mochel@linux.intel.com>
Subject: [PATCH 14/24] Remove unneeded debugging macros in drivers/acpi/pci_irq.c
Date: Mon, 17 Apr 2006 18:21:54 -0700 [thread overview]
Message-ID: <1145323314280-git-send-email-mochel@linux.intel.com> (raw)
In-Reply-To: <1145323314724-git-send-email-mochel@linux.intel.com>
Signed-off-by: Patrick Mochel <mochel@linux.intel.com>
---
drivers/acpi/pci_irq.c | 72 ++++++++++++++++++------------------------------
1 files changed, 27 insertions(+), 45 deletions(-)
applies-to: a00ab78b8bcab09c3d99811aa5e191da2026aea1
fb4fe7cf714659783f58ea8512d458f92ccc2a58
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 4cabc51..f8ceab6 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -55,8 +55,6 @@ static struct acpi_prt_entry *acpi_pci_i
struct list_head *node = NULL;
struct acpi_prt_entry *entry = NULL;
- ACPI_FUNCTION_TRACE("acpi_pci_irq_find_prt_entry");
-
if (!acpi_prt.count)
return_PTR(NULL);
@@ -87,14 +85,12 @@ acpi_pci_irq_add_entry(acpi_handle handl
{
struct acpi_prt_entry *entry = NULL;
- ACPI_FUNCTION_TRACE("acpi_pci_irq_add_entry");
-
if (!prt)
- return_VALUE(-EINVAL);
+ return -EINVAL;
entry = kmalloc(sizeof(struct acpi_prt_entry), GFP_KERNEL);
if (!entry)
- return_VALUE(-ENOMEM);
+ return -ENOMEM;
memset(entry, 0, sizeof(struct acpi_prt_entry));
entry->id.segment = segment;
@@ -141,7 +137,7 @@ acpi_pci_irq_add_entry(acpi_handle handl
acpi_prt.count++;
spin_unlock(&acpi_prt_lock);
- return_VALUE(0);
+ return 0;
}
static void
@@ -163,11 +159,9 @@ int acpi_pci_irq_add_prt(acpi_handle han
struct acpi_pci_routing_table *entry = NULL;
static int first_time = 1;
- ACPI_FUNCTION_TRACE("acpi_pci_irq_add_prt");
-
pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
if (!pathname)
- return_VALUE(-ENOMEM);
+ return -ENOMEM;
memset(pathname, 0, ACPI_PATHNAME_MAX);
if (first_time) {
@@ -199,12 +193,12 @@ int acpi_pci_irq_add_prt(acpi_handle han
if (status != AE_BUFFER_OVERFLOW) {
ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRT [%s]",
acpi_format_exception(status)));
- return_VALUE(-ENODEV);
+ return -ENODEV;
}
prt = kmalloc(buffer.length, GFP_KERNEL);
if (!prt) {
- return_VALUE(-ENOMEM);
+ return -ENOMEM;
}
memset(prt, 0, buffer.length);
buffer.pointer = prt;
@@ -214,7 +208,7 @@ int acpi_pci_irq_add_prt(acpi_handle han
ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRT [%s]",
acpi_format_exception(status)));
kfree(buffer.pointer);
- return_VALUE(-ENODEV);
+ return -ENODEV;
}
entry = prt;
@@ -227,7 +221,7 @@ int acpi_pci_irq_add_prt(acpi_handle han
kfree(prt);
- return_VALUE(0);
+ return 0;
}
void acpi_pci_irq_del_prt(int segment, int bus)
@@ -262,8 +256,6 @@ acpi_pci_allocate_irq(struct acpi_prt_en
{
int irq;
- ACPI_FUNCTION_TRACE("acpi_pci_allocate_irq");
-
if (entry->link.handle) {
irq = acpi_pci_link_allocate_irq(entry->link.handle,
entry->link.index, triggering,
@@ -271,7 +263,7 @@ acpi_pci_allocate_irq(struct acpi_prt_en
if (irq < 0) {
ACPI_WARNING((AE_INFO,
"Invalid IRQ link routing entry"));
- return_VALUE(-1);
+ return -1;
}
} else {
irq = entry->link.index;
@@ -280,7 +272,7 @@ acpi_pci_allocate_irq(struct acpi_prt_en
}
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found IRQ %d\n", irq));
- return_VALUE(irq);
+ return irq;
}
static int
@@ -289,13 +281,12 @@ acpi_pci_free_irq(struct acpi_prt_entry
{
int irq;
- ACPI_FUNCTION_TRACE("acpi_pci_free_irq");
if (entry->link.handle) {
irq = acpi_pci_link_free_irq(entry->link.handle);
} else {
irq = entry->link.index;
}
- return_VALUE(irq);
+ return irq;
}
/*
@@ -315,8 +306,6 @@ acpi_pci_irq_lookup(struct pci_bus *bus,
int bus_nr = bus->number;
int ret;
- ACPI_FUNCTION_TRACE("acpi_pci_irq_lookup");
-
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Searching for PRT entry for %02x:%02x:%02x[%c]\n",
segment, bus_nr, device, ('A' + pin)));
@@ -324,11 +313,11 @@ acpi_pci_irq_lookup(struct pci_bus *bus,
entry = acpi_pci_irq_find_prt_entry(segment, bus_nr, device, pin);
if (!entry) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "PRT entry not found\n"));
- return_VALUE(-1);
+ return -1;
}
ret = func(entry, triggering, polarity, link);
- return_VALUE(ret);
+ return ret;
}
/*
@@ -346,10 +335,8 @@ acpi_pci_irq_derive(struct pci_dev *dev,
int irq = -1;
u8 bridge_pin = 0;
- ACPI_FUNCTION_TRACE("acpi_pci_irq_derive");
-
if (!dev)
- return_VALUE(-EINVAL);
+ return -EINVAL;
/*
* Attempt to derive an IRQ for this device from a parent bridge's
@@ -366,7 +353,7 @@ acpi_pci_irq_derive(struct pci_dev *dev,
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"No interrupt pin configured for device %s\n",
pci_name(bridge)));
- return_VALUE(-1);
+ return -1;
}
/* Pin is from 0 to 3 */
bridge_pin--;
@@ -381,13 +368,13 @@ acpi_pci_irq_derive(struct pci_dev *dev,
if (irq < 0) {
ACPI_WARNING((AE_INFO, "Unable to derive IRQ for device %s",
pci_name(dev)));
- return_VALUE(-1);
+ return -1;
}
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Derive IRQ %d for device %s from %s\n",
irq, pci_name(dev), pci_name(bridge)));
- return_VALUE(irq);
+ return irq;
}
/*
@@ -405,23 +392,21 @@ int acpi_pci_irq_enable(struct pci_dev *
char *link = NULL;
int rc;
- ACPI_FUNCTION_TRACE("acpi_pci_irq_enable");
-
if (!dev)
- return_VALUE(-EINVAL);
+ return -EINVAL;
pin = dev->pin;
if (!pin) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"No interrupt pin configured for device %s\n",
pci_name(dev)));
- return_VALUE(0);
+ return 0;
}
pin--;
if (!dev->bus) {
ACPI_ERROR((AE_INFO, "Invalid (NULL) 'bus' field"));
- return_VALUE(-ENODEV);
+ return -ENODEV;
}
/*
@@ -453,10 +438,10 @@ int acpi_pci_irq_enable(struct pci_dev *
printk(" - using IRQ %d\n", dev->irq);
acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE,
ACPI_ACTIVE_LOW);
- return_VALUE(0);
+ return 0;
} else {
printk("\n");
- return_VALUE(0);
+ return 0;
}
}
@@ -464,7 +449,7 @@ int acpi_pci_irq_enable(struct pci_dev *
if (rc < 0) {
printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: failed "
"to register GSI\n", pci_name(dev), ('A' + pin));
- return_VALUE(rc);
+ return rc;
}
dev->irq = rc;
@@ -478,7 +463,7 @@ int acpi_pci_irq_enable(struct pci_dev *
(triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge",
(polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq);
- return_VALUE(0);
+ return 0;
}
EXPORT_SYMBOL(acpi_pci_irq_enable);
@@ -495,14 +480,12 @@ void acpi_pci_irq_disable(struct pci_dev
int triggering = ACPI_LEVEL_SENSITIVE;
int polarity = ACPI_ACTIVE_LOW;
- ACPI_FUNCTION_TRACE("acpi_pci_irq_disable");
-
if (!dev || !dev->bus)
- return_VOID;
+ return;
pin = dev->pin;
if (!pin)
- return_VOID;
+ return;
pin--;
/*
@@ -520,7 +503,7 @@ void acpi_pci_irq_disable(struct pci_dev
&triggering, &polarity, NULL,
acpi_pci_free_irq);
if (gsi < 0)
- return_VOID;
+ return;
/*
* TBD: It might be worth clearing dev->irq by magic constant
@@ -532,5 +515,4 @@ void acpi_pci_irq_disable(struct pci_dev
acpi_unregister_gsi(gsi);
- return_VOID;
}
---
0.99.9.GIT
next prev parent reply other threads:[~2006-04-18 1:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-18 1:21 [PATCH 1/24] Remove unneeded debugging macros in drivers/acpi/ac.c mochel
2006-04-18 1:21 ` [PATCH 2/24] Remove unneeded debugging macros in drivers/acpi/acpi_memhotplug.c mochel
2006-04-18 1:21 ` [PATCH 3/24] Remove unneeded debugging macros in drivers/acpi/battery.c mochel
2006-04-18 1:21 ` [PATCH 4/24] Remove unneeded debugging macros in drivers/acpi/bus.c mochel
2006-04-18 1:21 ` [PATCH 5/24] Remove unneeded debugging macros in drivers/acpi/button.c mochel
2006-04-18 1:21 ` [PATCH 6/24] Remove unneeded debugging macros in drivers/acpi/container.c mochel
2006-04-18 1:21 ` [PATCH 7/24] Remove unneeded debugging macros in drivers/acpi/debug.c mochel
2006-04-18 1:21 ` [PATCH 8/24] Remove unneeded debugging macros in drivers/acpi/ec.c mochel
2006-04-18 1:21 ` [PATCH 9/24] Remove unneeded debugging macros in drivers/acpi/event.c mochel
2006-04-18 1:21 ` [PATCH 10/24] Remove unneeded debugging macros in drivers/acpi/fan.c mochel
2006-04-18 1:21 ` [PATCH 11/24] Remove unneeded debugging macros in drivers/acpi/hotkey.c mochel
2006-04-18 1:21 ` [PATCH 12/24] Remove unneeded debugging macros in drivers/acpi/motherboard.c mochel
2006-04-18 1:21 ` [PATCH 13/24] Remove unneeded debugging macros in drivers/acpi/pci_bind.c mochel
2006-04-18 1:21 ` mochel [this message]
2006-04-18 1:21 ` [PATCH 15/24] Remove unneeded debugging macros in drivers/acpi/pci_link.c mochel
2006-04-18 1:21 ` [PATCH 16/24] Remove unneeded debugging macros in drivers/acpi/pci_root.c mochel
2006-04-18 1:21 ` [PATCH 17/24] Remove unneeded debugging macros in drivers/acpi/power.c mochel
2006-04-18 1:21 ` [PATCH 18/24] Remove unneeded debugging macros in drivers/acpi/processor_core.c mochel
2006-04-18 1:21 ` [PATCH 19/24] Remove unneeded debugging macros in drivers/acpi/processor_idle.c mochel
2006-04-18 1:21 ` [PATCH 20/24] Remove unneeded debugging macros in drivers/acpi/processor_perflib.c mochel
2006-04-18 1:21 ` [PATCH 21/24] Remove unneeded debugging macros in drivers/acpi/processor_thermal.c mochel
2006-04-18 1:21 ` [PATCH 22/24] Remove unneeded debugging macros in drivers/acpi/processor_throttling.c mochel
2006-04-18 1:21 ` [PATCH 23/24] Remove unneeded debugging macros in drivers/acpi/system.c mochel
2006-04-18 1:21 ` [PATCH 24/24] Remove unneeded debugging macros in drivers/acpi/thermal.c mochel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1145323314280-git-send-email-mochel@linux.intel.com \
--to=mochel@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.