diff options
author | Taku Izumi <izumi.taku@jp.fujitsu.com> | 2008-10-23 11:54:39 +0900 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-10-23 16:14:00 -0700 |
commit | be7bce250a88fbbb5a67204eb148bce8b798780a (patch) | |
tree | c30a5f7f145e4b4ab59f139b529eb170fa00f682 /drivers/pci/hotplug/shpchp_core.c | |
parent | f98ca311f3a32e2adc229fecd6bf732db07fcca3 (diff) |
PCI hotplug: shpchp: message refinement
This patch refines messages in shpchp module. The main changes are as
follows:
- remove the trailing "."
- remove __func__ as much as possible
- capitalize the first letter of messages
- show PCI device address including its domain
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug/shpchp_core.c')
-rw-r--r-- | drivers/pci/hotplug/shpchp_core.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c index 214633bf4abc..fe8d149c2293 100644 --- a/drivers/pci/hotplug/shpchp_core.c +++ b/drivers/pci/hotplug/shpchp_core.c @@ -89,7 +89,7 @@ static void release_slot(struct hotplug_slot *hotplug_slot) { struct slot *slot = hotplug_slot->private; - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", __func__, slot_name(slot)); kfree(slot->hotplug_slot->info); @@ -136,9 +136,11 @@ static int init_slots(struct controller *ctrl) snprintf(name, SLOT_NAME_SIZE, "%d", slot->number); hotplug_slot->ops = &shpchp_hotplug_slot_ops; - ctrl_dbg(ctrl, "Registering bus=%x dev=%x hp_slot=%x sun=%x " - "slot_device_offset=%x\n", slot->bus, slot->device, - slot->hp_slot, slot->number, ctrl->slot_device_offset); + ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:%02x " + "hp_slot=%x sun=%x slot_device_offset=%x\n", + pci_domain_nr(ctrl->pci_dev->subordinate), + slot->bus, slot->device, slot->hp_slot, slot->number, + ctrl->slot_device_offset); retval = pci_hp_register(slot->hotplug_slot, ctrl->pci_dev->subordinate, slot->device, name); if (retval) { @@ -189,7 +191,7 @@ static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status) { struct slot *slot = get_slot(hotplug_slot); - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", __func__, slot_name(slot)); hotplug_slot->info->attention_status = status; @@ -202,7 +204,7 @@ static int enable_slot (struct hotplug_slot *hotplug_slot) { struct slot *slot = get_slot(hotplug_slot); - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", __func__, slot_name(slot)); return shpchp_sysfs_enable_slot(slot); @@ -212,7 +214,7 @@ static int disable_slot (struct hotplug_slot *hotplug_slot) { struct slot *slot = get_slot(hotplug_slot); - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", __func__, slot_name(slot)); return shpchp_sysfs_disable_slot(slot); @@ -223,7 +225,7 @@ static int get_power_status (struct hotplug_slot *hotplug_slot, u8 *value) struct slot *slot = get_slot(hotplug_slot); int retval; - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", __func__, slot_name(slot)); retval = slot->hpc_ops->get_power_status(slot, value); @@ -238,7 +240,7 @@ static int get_attention_status (struct hotplug_slot *hotplug_slot, u8 *value) struct slot *slot = get_slot(hotplug_slot); int retval; - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", __func__, slot_name(slot)); retval = slot->hpc_ops->get_attention_status(slot, value); @@ -253,7 +255,7 @@ static int get_latch_status (struct hotplug_slot *hotplug_slot, u8 *value) struct slot *slot = get_slot(hotplug_slot); int retval; - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", __func__, slot_name(slot)); retval = slot->hpc_ops->get_latch_status(slot, value); @@ -268,7 +270,7 @@ static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value) struct slot *slot = get_slot(hotplug_slot); int retval; - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", __func__, slot_name(slot)); retval = slot->hpc_ops->get_adapter_status(slot, value); @@ -284,7 +286,7 @@ static int get_max_bus_speed(struct hotplug_slot *hotplug_slot, struct slot *slot = get_slot(hotplug_slot); int retval; - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", __func__, slot_name(slot)); retval = slot->hpc_ops->get_max_bus_speed(slot, value); @@ -299,7 +301,7 @@ static int get_cur_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_sp struct slot *slot = get_slot(hotplug_slot); int retval; - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", __func__, slot_name(slot)); retval = slot->hpc_ops->get_cur_bus_speed(slot, value); @@ -331,14 +333,14 @@ static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL); if (!ctrl) { - dev_err(&pdev->dev, "%s : out of memory\n", __func__); + dev_err(&pdev->dev, "%s: Out of memory\n", __func__); goto err_out_none; } INIT_LIST_HEAD(&ctrl->slot_list); rc = shpc_init(ctrl, pdev); if (rc) { - ctrl_dbg(ctrl, "controller initialization failed\n"); + ctrl_dbg(ctrl, "Controller initialization failed\n"); goto err_out_free_ctrl; } @@ -347,7 +349,7 @@ static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) /* Setup the slot information structures */ rc = init_slots(ctrl); if (rc) { - ctrl_err(ctrl, "slot initialization failed\n"); + ctrl_err(ctrl, "Slot initialization failed\n"); goto err_out_release_ctlr; } |