diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h
index 0d48d38..6aba0b6 100644
--- a/drivers/pci/hotplug/shpchp.h
+++ b/drivers/pci/hotplug/shpchp.h
@@ -253,7 +253,7 @@
 			return slot;
 	}
 
-	ctrl_err(ctrl, "%s: slot (device=0x%x) not found\n", __func__, device);
+	ctrl_err(ctrl, "Slot (device=0x%02x) not found\n", device);
 	return NULL;
 }
 
@@ -288,8 +288,8 @@
 	perr_set = pcix_bridge_errors_reg & PERR_OBSERVED_MASK;
 	if (perr_set) {
 		ctrl_dbg(p_slot->ctrl,
-			 "%s  W1C: Bridge_Errors[ PERR_OBSERVED = %08X]\n",
-			 __func__ , perr_set);
+			 "Bridge_Errors[ PERR_OBSERVED = %08X] (W1C)\n",
+			 perr_set);
 
 		pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MISC_BRIDGE_ERRORS_OFFSET, perr_set);
 	}
@@ -298,8 +298,7 @@
 	pci_read_config_dword(p_slot->ctrl->pci_dev, PCIX_MEM_BASE_LIMIT_OFFSET, &pcix_mem_base_reg);
 	rse_set = pcix_mem_base_reg & RSE_MASK;
 	if (rse_set) {
-		ctrl_dbg(p_slot->ctrl, "%s  W1C: Memory_Base_Limit[ RSE ]\n",
-			 __func__);
+		ctrl_dbg(p_slot->ctrl, "Memory_Base_Limit[ RSE ] (W1C)\n");
 
 		pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MEM_BASE_LIMIT_OFFSET, rse_set);
 	}
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c
index 214633b..fe8d149 100644
--- a/drivers/pci/hotplug/shpchp_core.c
+++ b/drivers/pci/hotplug/shpchp_core.c
@@ -89,7 +89,7 @@
 {
 	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 @@
 		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 @@
 {
 	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 @@
 {
 	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 @@
 {
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 
 	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 @@
 	/* 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;
 	}
 
diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c
index c9049f1..b8ab279 100644
--- a/drivers/pci/hotplug/shpchp_ctrl.c
+++ b/drivers/pci/hotplug/shpchp_ctrl.c
@@ -62,7 +62,7 @@
 	u32 event_type;
 
 	/* Attention Button Change */
-	ctrl_dbg(ctrl, "Attention button interrupt received.\n");
+	ctrl_dbg(ctrl, "Attention button interrupt received\n");
 
 	p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
 	p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save));
@@ -86,13 +86,13 @@
 	u32 event_type;
 
 	/* Switch Change */
-	ctrl_dbg(ctrl, "Switch interrupt received.\n");
+	ctrl_dbg(ctrl, "Switch interrupt received\n");
 
 	p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
 	p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save));
 	p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
-	ctrl_dbg(ctrl, "%s: Card present %x Power status %x\n",
-		 __func__, p_slot->presence_save, p_slot->pwr_save);
+	ctrl_dbg(ctrl, "Card present %x Power status %x\n",
+		 p_slot->presence_save, p_slot->pwr_save);
 
 	if (getstatus) {
 		/*
@@ -123,7 +123,7 @@
 	u32 event_type;
 
 	/* Presence Change */
-	ctrl_dbg(ctrl, "Presence/Notify input change.\n");
+	ctrl_dbg(ctrl, "Presence/Notify input change\n");
 
 	p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
 
@@ -158,7 +158,7 @@
 	u32 event_type;
 
 	/* Power fault */
-	ctrl_dbg(ctrl, "Power fault interrupt received.\n");
+	ctrl_dbg(ctrl, "Power fault interrupt received\n");
 
 	p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
 
@@ -178,7 +178,7 @@
 		event_type = INT_POWER_FAULT;
 		/* set power fault status for this board */
 		p_slot->status = 0xFF;
-		ctrl_info(ctrl, "power fault bit %x set\n", hp_slot);
+		ctrl_info(ctrl, "Power fault bit %x set\n", hp_slot);
 	}
 
 	queue_interrupt_event(p_slot, event_type);
@@ -194,7 +194,7 @@
 {
 	int rc = 0;
 
-	ctrl_dbg(ctrl, "%s: change to speed %d\n", __func__, speed);
+	ctrl_dbg(ctrl, "Change speed to %d\n", speed);
 	if ((rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, speed))) {
 		ctrl_err(ctrl, "%s: Issue of set bus speed mode command "
 			 "failed\n", __func__);
@@ -215,8 +215,8 @@
 	 */
 	if (flag) {
 		if (asp < bsp) {
-			ctrl_err(ctrl, "%s: speed of bus %x and adapter %x "
-				 "mismatch\n", __func__, bsp, asp);
+			ctrl_err(ctrl, "Speed of bus %x and adapter %x "
+				 "mismatch\n", bsp, asp);
 			rc = WRONG_BUS_FREQUENCY;
 		}
 		return rc;
@@ -246,6 +246,7 @@
 	int rc = 0;
 	enum pci_bus_speed asp, bsp, msp;
 	struct controller *ctrl = p_slot->ctrl;
+	struct pci_bus *parent = ctrl->pci_dev->subordinate;
 
 	hp_slot = p_slot->device - ctrl->slot_device_offset;
 
@@ -256,7 +257,7 @@
 	/* Power on slot without connecting to bus */
 	rc = p_slot->hpc_ops->power_on_slot(p_slot);
 	if (rc) {
-		ctrl_err(ctrl, "%s: Failed to power on slot\n", __func__);
+		ctrl_err(ctrl, "Failed to power on slot\n");
 		return -1;
 	}
 
@@ -272,29 +273,27 @@
 
 		/* turn on board, blink green LED, turn off Amber LED */
 		if ((rc = p_slot->hpc_ops->slot_enable(p_slot))) {
-			ctrl_err(ctrl, "%s: Issue of Slot Enable command"
-				 " failed\n", __func__);
+			ctrl_err(ctrl, "Issue of Slot Enable command failed\n");
 			return rc;
 		}
 	}
 
 	rc = p_slot->hpc_ops->get_adapter_speed(p_slot, &asp);
 	if (rc) {
-		ctrl_err(ctrl, "%s: Can't get adapter speed or bus mode "
-			 "mismatch\n", __func__);
+		ctrl_err(ctrl, "Can't get adapter speed or "
+			 "bus mode mismatch\n");
 		return WRONG_BUS_FREQUENCY;
 	}
 
 	rc = p_slot->hpc_ops->get_cur_bus_speed(p_slot, &bsp);
 	if (rc) {
-		ctrl_err(ctrl, "%s: Can't get bus operation speed\n", __func__);
+		ctrl_err(ctrl, "Can't get bus operation speed\n");
 		return WRONG_BUS_FREQUENCY;
 	}
 
 	rc = p_slot->hpc_ops->get_max_bus_speed(p_slot, &msp);
 	if (rc) {
-		ctrl_err(ctrl, "%s: Can't get max bus operation speed\n",
-			 __func__);
+		ctrl_err(ctrl, "Can't get max bus operation speed\n");
 		msp = bsp;
 	}
 
@@ -312,8 +311,7 @@
 
 	/* turn on board, blink green LED, turn off Amber LED */
 	if ((rc = p_slot->hpc_ops->slot_enable(p_slot))) {
-		ctrl_err(ctrl, "%s: Issue of Slot Enable command failed\n",
-			 __func__);
+		ctrl_err(ctrl, "Issue of Slot Enable command failed\n");
 		return rc;
 	}
 
@@ -324,15 +322,15 @@
 	/* Check for a power fault */
 	if (p_slot->status == 0xFF) {
 		/* power fault occurred, but it was benign */
-		ctrl_dbg(ctrl, "%s: power fault\n", __func__);
+		ctrl_dbg(ctrl, "%s: Power fault\n", __func__);
 		rc = POWER_FAILURE;
 		p_slot->status = 0;
 		goto err_exit;
 	}
 
 	if (shpchp_configure_device(p_slot)) {
-		ctrl_err(ctrl, "Cannot add device at 0x%x:0x%x\n",
-			 p_slot->bus, p_slot->device);
+		ctrl_err(ctrl, "Cannot add device at %04x:%02x:%02x\n",
+			 pci_domain_nr(parent), p_slot->bus, p_slot->device);
 		goto err_exit;
 	}
 
@@ -373,7 +371,7 @@
 	hp_slot = p_slot->device - ctrl->slot_device_offset;
 	p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
 
-	ctrl_dbg(ctrl, "In %s, hp_slot = %d\n", __func__, hp_slot);
+	ctrl_dbg(ctrl, "%s: hp_slot = %d\n", __func__, hp_slot);
 
 	/* Change status to shutdown */
 	if (p_slot->is_a_board)
@@ -389,8 +387,7 @@
 
 	rc = p_slot->hpc_ops->set_attention_status(p_slot, 0);
 	if (rc) {
-		ctrl_err(ctrl, "%s: Issue of Set Attention command failed\n",
-			 __func__);
+		ctrl_err(ctrl, "Issue of Set Attention command failed\n");
 		return rc;
 	}
 
@@ -526,7 +523,6 @@
 		 */
 		ctrl_info(ctrl, "Button cancel on Slot(%s)\n",
 			  slot_name(p_slot));
-		ctrl_dbg(ctrl, "%s: button cancel\n", __func__);
 		cancel_delayed_work(&p_slot->work);
 		if (p_slot->state == BLINKINGOFF_STATE)
 			p_slot->hpc_ops->green_led_on(p_slot);
@@ -565,7 +561,7 @@
 		handle_button_press_event(p_slot);
 		break;
 	case INT_POWER_FAULT:
-		ctrl_dbg(p_slot->ctrl, "%s: power fault\n", __func__);
+		ctrl_dbg(p_slot->ctrl, "%s: Power fault\n", __func__);
 		p_slot->hpc_ops->set_attention_status(p_slot, 1);
 		p_slot->hpc_ops->green_led_off(p_slot);
 		break;
@@ -660,7 +656,7 @@
 	}
 	rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
 	if (rc || !getstatus) {
-		ctrl_info(ctrl, "Already disabled slot(%s)\n",
+		ctrl_info(ctrl, "Already disabled on slot(%s)\n",
 			  slot_name(p_slot));
 		goto out;
 	}
diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
index 2b69a08..86dc398 100644
--- a/drivers/pci/hotplug/shpchp_hpc.c
+++ b/drivers/pci/hotplug/shpchp_hpc.c
@@ -320,8 +320,7 @@
 
 	if (!shpc_poll_ctrl_busy(ctrl)) {
 		/* After 1 sec and and the controller is still busy */
-		ctrl_err(ctrl, "%s : Controller is still busy after 1 sec.\n",
-			 __func__);
+		ctrl_err(ctrl, "Controller is still busy after 1 sec\n");
 		retval = -EBUSY;
 		goto out;
 	}
@@ -344,8 +343,9 @@
 
 	cmd_status = hpc_check_cmd_status(slot->ctrl);
 	if (cmd_status) {
-		ctrl_err(ctrl, "%s: Failed to issued command 0x%x "
-			 "(error code = %d)\n", __func__, cmd, cmd_status);
+		ctrl_err(ctrl,
+			 "Failed to issued command 0x%x (error code = %d)\n",
+			 cmd, cmd_status);
 		retval = -EIO;
 	}
  out:
@@ -364,15 +364,15 @@
 		break;
 	case 1:
 		retval = SWITCH_OPEN;
-		ctrl_err(ctrl, "%s: Switch opened!\n", __func__);
+		ctrl_err(ctrl, "Switch opened!\n");
 		break;
 	case 2:
 		retval = INVALID_CMD;
-		ctrl_err(ctrl, "%s: Invalid HPC command!\n", __func__);
+		ctrl_err(ctrl, "Invalid HPC command!\n");
 		break;
 	case 4:
 		retval = INVALID_SPEED_MODE;
-		ctrl_err(ctrl, "%s: Invalid bus speed/mode!\n", __func__);
+		ctrl_err(ctrl, "Invalid bus speed/mode!\n");
 		break;
 	default:
 		retval = cmd_status;
@@ -773,8 +773,8 @@
 			continue;
 
 		slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot));
-		ctrl_dbg(ctrl, "%s: Slot %x with intr, slot register = %x\n",
-			 __func__, hp_slot, slot_reg);
+		ctrl_dbg(ctrl, "Slot %x with intr, slot register = %x\n",
+			 hp_slot, slot_reg);
 
 		if (slot_reg & MRL_CHANGE_DETECTED)
 			shpchp_handle_switch_change(hp_slot, ctrl);
@@ -949,6 +949,7 @@
 	u8 i;
 
 	ctrl->pci_dev = pdev;  /* pci_dev of the P2P bridge */
+	ctrl_dbg(ctrl, "Hotplug Controller:\n");
 
 	if ((pdev->vendor == PCI_VENDOR_ID_AMD) || (pdev->device ==
 				PCI_DEVICE_ID_AMD_GOLAM_7450)) {
@@ -958,38 +959,33 @@
 	} else {
 		ctrl->cap_offset = pci_find_capability(pdev, PCI_CAP_ID_SHPC);
 		if (!ctrl->cap_offset) {
-			ctrl_err(ctrl, "%s : cap_offset == 0\n", __func__);
+			ctrl_err(ctrl, "Cannot find PCI capability\n");
 			goto abort;
 		}
-		ctrl_dbg(ctrl, "%s: cap_offset = %x\n", __func__,
-			 ctrl->cap_offset);
+		ctrl_dbg(ctrl, " cap_offset = %x\n", ctrl->cap_offset);
 
 		rc = shpc_indirect_read(ctrl, 0, &shpc_base_offset);
 		if (rc) {
-			ctrl_err(ctrl, "%s: cannot read base_offset\n",
-				 __func__);
+			ctrl_err(ctrl, "Cannot read base_offset\n");
 			goto abort;
 		}
 
 		rc = shpc_indirect_read(ctrl, 3, &tempdword);
 		if (rc) {
-			ctrl_err(ctrl, "%s: cannot read slot config\n",
-				 __func__);
+			ctrl_err(ctrl, "Cannot read slot config\n");
 			goto abort;
 		}
 		num_slots = tempdword & SLOT_NUM;
-		ctrl_dbg(ctrl, "%s: num_slots (indirect) %x\n",
-			 __func__, num_slots);
+		ctrl_dbg(ctrl, " num_slots (indirect) %x\n", num_slots);
 
 		for (i = 0; i < 9 + num_slots; i++) {
 			rc = shpc_indirect_read(ctrl, i, &tempdword);
 			if (rc) {
-				ctrl_err(ctrl, "%s: cannot read creg "
-					 "(index = %d)\n", __func__, i);
+				ctrl_err(ctrl,
+					 "Cannot read creg (index = %d)\n", i);
 				goto abort;
 			}
-			ctrl_dbg(ctrl, "%s: offset %d: value %x\n",
-				 __func__, i, tempdword);
+			ctrl_dbg(ctrl, " offset %d: value %x\n", i, tempdword);
 		}
 
 		ctrl->mmio_base =
@@ -1003,25 +999,25 @@
 
 	rc = pci_enable_device(pdev);
 	if (rc) {
-		ctrl_err(ctrl, "%s: pci_enable_device failed\n", __func__);
+		ctrl_err(ctrl, "pci_enable_device failed\n");
 		goto abort;
 	}
 
 	if (!request_mem_region(ctrl->mmio_base, ctrl->mmio_size, MY_NAME)) {
-		ctrl_err(ctrl, "%s: cannot reserve MMIO region\n", __func__);
+		ctrl_err(ctrl, "Cannot reserve MMIO region\n");
 		rc = -1;
 		goto abort;
 	}
 
 	ctrl->creg = ioremap(ctrl->mmio_base, ctrl->mmio_size);
 	if (!ctrl->creg) {
-		ctrl_err(ctrl, "%s: cannot remap MMIO region %lx @ %lx\n",
-			 __func__, ctrl->mmio_size, ctrl->mmio_base);
+		ctrl_err(ctrl, "Cannot remap MMIO region %lx @ %lx\n",
+			 ctrl->mmio_size, ctrl->mmio_base);
 		release_mem_region(ctrl->mmio_base, ctrl->mmio_size);
 		rc = -1;
 		goto abort;
 	}
-	ctrl_dbg(ctrl, "%s: ctrl->creg %p\n", __func__, ctrl->creg);
+	ctrl_dbg(ctrl, "ctrl->creg %p\n", ctrl->creg);
 
 	mutex_init(&ctrl->crit_sect);
 	mutex_init(&ctrl->cmd_lock);
@@ -1040,21 +1036,21 @@
 
 	/* Mask Global Interrupt Mask & Command Complete Interrupt Mask */
 	tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE);
-	ctrl_dbg(ctrl, "%s: SERR_INTR_ENABLE = %x\n", __func__, tempdword);
+	ctrl_dbg(ctrl, "SERR_INTR_ENABLE = %x\n", tempdword);
 	tempdword |= (GLOBAL_INTR_MASK  | GLOBAL_SERR_MASK |
 		      COMMAND_INTR_MASK | ARBITER_SERR_MASK);
 	tempdword &= ~SERR_INTR_RSVDZ_MASK;
 	shpc_writel(ctrl, SERR_INTR_ENABLE, tempdword);
 	tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE);
-	ctrl_dbg(ctrl, "%s: SERR_INTR_ENABLE = %x\n", __func__, tempdword);
+	ctrl_dbg(ctrl, "SERR_INTR_ENABLE = %x\n", tempdword);
 
 	/* Mask the MRL sensor SERR Mask of individual slot in
 	 * Slot SERR-INT Mask & clear all the existing event if any
 	 */
 	for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) {
 		slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot));
-		ctrl_dbg(ctrl, "%s: Default Logical Slot Register %d "
-			 "value %x\n", __func__, hp_slot, slot_reg);
+		ctrl_dbg(ctrl, "Default Logical Slot Register %d value %x\n",
+			 hp_slot, slot_reg);
 		slot_reg |= (PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK |
 			     BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK |
 			     CON_PFAULT_INTR_MASK   | MRL_CHANGE_SERR_MASK |
@@ -1079,8 +1075,8 @@
 
 		rc = request_irq(ctrl->pci_dev->irq, shpc_isr, IRQF_SHARED,
 				 MY_NAME, (void *)ctrl);
-		ctrl_dbg(ctrl, "%s: request_irq %d for hpc%d (returns %d)\n",
-			 __func__, ctrl->pci_dev->irq,
+		ctrl_dbg(ctrl, "request_irq %d for hpc%d (returns %d)\n",
+			 ctrl->pci_dev->irq,
 		    atomic_read(&shpchp_num_controllers), rc);
 		if (rc) {
 			ctrl_err(ctrl, "Can't get irq %d for the hotplug "
@@ -1088,9 +1084,7 @@
 			goto abort_iounmap;
 		}
 	}
-	ctrl_dbg(ctrl, "%s: HPC at b:d:f:irq=0x%x:%x:%x:%x\n",
-		 __func__, pdev->bus->number, PCI_SLOT(pdev->devfn),
-		 PCI_FUNC(pdev->devfn), pdev->irq);
+	ctrl_dbg(ctrl, "HPC at %s irq=%x\n", pci_name(pdev), pdev->irq);
 
 	/*
 	 * If this is the first controller to be initialized,
@@ -1109,8 +1103,8 @@
 	 */
 	for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) {
 		slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot));
-		ctrl_dbg(ctrl, "%s: Default Logical Slot Register %d "
-			 "value %x\n", __func__, hp_slot, slot_reg);
+		ctrl_dbg(ctrl, "Default Logical Slot Register %d value %x\n",
+			 hp_slot, slot_reg);
 		slot_reg &= ~(PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK |
 			      BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK |
 			      CON_PFAULT_INTR_MASK | SLOT_REG_RSVDZ_MASK);
@@ -1123,8 +1117,7 @@
 			       SERR_INTR_RSVDZ_MASK);
 		shpc_writel(ctrl, SERR_INTR_ENABLE, tempdword);
 		tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE);
-		ctrl_dbg(ctrl, "%s: SERR_INTR_ENABLE = %x\n",
-			 __func__, tempdword);
+		ctrl_dbg(ctrl, "SERR_INTR_ENABLE = %x\n", tempdword);
 	}
 
 	return 0;
diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c
index faecbfa..138f161 100644
--- a/drivers/pci/hotplug/shpchp_pci.c
+++ b/drivers/pci/hotplug/shpchp_pci.c
@@ -49,9 +49,7 @@
 	/* use default values if we can't get them from firmware */
 	if (get_hp_params_from_firmware(dev, &hpp) ||
 	    !hpp.t0 || (hpp.t0->revision > 1)) {
-		printk(KERN_WARNING
-		       "%s: Could not get hotplug parameters. Use defaults\n",
-		       __func__);
+		warn("Could not get hotplug parameters. Use defaults\n");
 		hpp.t0 = &hpp.type0_data;
 		hpp.t0->revision = 0;
 		hpp.t0->cache_line_size = 8;
@@ -105,9 +103,9 @@
 
 	dev = pci_get_slot(parent, PCI_DEVFN(p_slot->device, 0));
 	if (dev) {
-		ctrl_err(ctrl,
-			 "Device %s already exists at %x:%x, cannot hot-add\n",
-			 pci_name(dev), p_slot->bus, p_slot->device);
+		ctrl_err(ctrl, "Device %s already exists "
+			 "at %04x:%02x:%02x, cannot hot-add\n", pci_name(dev),
+			 pci_domain_nr(parent), p_slot->bus, p_slot->device);
 		pci_dev_put(dev);
 		return -EINVAL;
 	}
@@ -173,8 +171,8 @@
 	struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate;
 	struct controller *ctrl = p_slot->ctrl;
 
-	ctrl_dbg(ctrl, "%s: bus/dev = %x/%x\n",
-		 __func__, p_slot->bus, p_slot->device);
+	ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:%02x\n",
+		 __func__, pci_domain_nr(parent), p_slot->bus, p_slot->device);
 
 	for (j=0; j<8 ; j++) {
 		struct pci_dev* temp = pci_get_slot(parent,
