[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47E336BF.1010200@jp.fujitsu.com>
Date: Fri, 21 Mar 2008 13:17:03 +0900
From: Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>
To: Alex Chiang <achiang@...com>, Greg KH <gregkh@...e.de>
CC: Gary Hade <garyhade@...ibm.com>,
Kristen Carlson Accardi <kristen.c.accardi@...el.com>,
Matthew Wilcox <matthew@....cx>, warthog19@...lescrag.net,
rick.jones2@...com, linux-kernel@...r.kernel.org,
linux-pci@...ey.karlin.mff.cuni.cz, linux-acpi@...r.kernel.org
Subject: [PATCH 10/16] PCI slot: Replace dbg with pr_debug (Not for mainline!)
The dbg() macro doesn't work because the 'pci_slot_debug' flag never
be set unless we manually modify drivers/pci/slots.c. So we should use
pr_debug() instead. This patch replaces dbg() with pr_debug().
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>
---
drivers/pci/slot.c | 38 +++++++++++++++-----------------------
1 file changed, 15 insertions(+), 23 deletions(-)
Index: linux-2.6.25-rc6/drivers/pci/slot.c
===================================================================
--- linux-2.6.25-rc6.orig/drivers/pci/slot.c
+++ linux-2.6.25-rc6/drivers/pci/slot.c
@@ -9,15 +9,6 @@
#include <linux/pci.h>
#include "pci.h"
-static int pci_slot_debug;
-#define MY_NAME "slot"
-#define dbg(format, arg...) \
- do { \
- if (pci_slot_debug) \
- printk(KERN_DEBUG "%s: " format, \
- MY_NAME , ## arg); \
- } while (0)
-
struct kset *pci_slots_kset;
EXPORT_SYMBOL_GPL(pci_slots_kset);
@@ -71,8 +62,8 @@ static void pci_slot_release(struct kobj
{
struct pci_slot *slot = to_pci_slot(kobj);
- dbg("%s: releasing pci_slot on %x:%d\n", __func__,
- slot->bus->number, slot->number);
+ pr_debug("%s: releasing pci_slot on %x:%d\n", __func__,
+ slot->bus->number, slot->number);
list_del(&slot->list);
@@ -109,19 +100,19 @@ int pci_slot_add_hotplug(struct pci_bus
}
if (!found) {
- dbg("%s: slot not found\n", __func__);
+ pr_debug("%s: slot not found\n", __func__);
retval = -EEXIST;
goto out;
}
if (slot->release) {
- dbg("%s: already claimed\n", __func__);
+ pr_debug("%s: already claimed\n", __func__);
retval = -EBUSY;
goto out;
}
- dbg("%s: adding release function to %x:%d\n",
- __func__, parent->number, slot_nr);
+ pr_debug("%s: adding release function to %x:%d\n",
+ __func__, parent->number, slot_nr);
slot->release = release;
out:
up_write(&pci_bus_sem);
@@ -141,9 +132,10 @@ struct pci_slot *pci_create_slot(struct
list_for_each_entry(slot, &parent->slots, list) {
if (slot->number == slot_nr) {
kobject_get(&slot->kobj);
- dbg("%s: bumped refcount to %d on %x:%d\n",
- __func__, atomic_read(&slot->kobj.kref.refcount),
- parent->number, slot_nr);
+ pr_debug("%s: bumped refcount to %d on %x:%d\n",
+ __func__,
+ atomic_read(&slot->kobj.kref.refcount),
+ parent->number, slot_nr);
goto out;
}
}
@@ -173,8 +165,8 @@ struct pci_slot *pci_create_slot(struct
INIT_LIST_HEAD(&slot->list);
list_add(&slot->list, &parent->slots);
- dbg("%s: created pci_slot on %x:%d\n",
- __func__, parent->number, slot_nr);
+ pr_debug("%s: created pci_slot on %x:%d\n",
+ __func__, parent->number, slot_nr);
out:
up_write(&pci_bus_sem);
@@ -191,9 +183,9 @@ EXPORT_SYMBOL_GPL(pci_create_slot);
int pci_destroy_slot(struct pci_slot *slot)
{
- dbg("%s: decreased refcount to %d on %x:%d\n", __func__,
- atomic_read(&slot->kobj.kref.refcount) - 1, slot->bus->number,
- slot->number);
+ pr_debug("%s: decreased refcount to %d on %x:%d\n", __func__,
+ atomic_read(&slot->kobj.kref.refcount) - 1, slot->bus->number,
+ slot->number);
down_write(&pci_bus_sem);
kobject_put(&slot->kobj);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists