Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Taku Izumi and committed by
Jesse Barnes
be7bce25 f98ca311

+86 -98
+4 -5
drivers/pci/hotplug/shpchp.h
··· 253 253 return slot; 254 254 } 255 255 256 - ctrl_err(ctrl, "%s: slot (device=0x%x) not found\n", __func__, device); 256 + ctrl_err(ctrl, "Slot (device=0x%02x) not found\n", device); 257 257 return NULL; 258 258 } 259 259 ··· 288 288 perr_set = pcix_bridge_errors_reg & PERR_OBSERVED_MASK; 289 289 if (perr_set) { 290 290 ctrl_dbg(p_slot->ctrl, 291 - "%s W1C: Bridge_Errors[ PERR_OBSERVED = %08X]\n", 292 - __func__ , perr_set); 291 + "Bridge_Errors[ PERR_OBSERVED = %08X] (W1C)\n", 292 + perr_set); 293 293 294 294 pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MISC_BRIDGE_ERRORS_OFFSET, perr_set); 295 295 } ··· 298 298 pci_read_config_dword(p_slot->ctrl->pci_dev, PCIX_MEM_BASE_LIMIT_OFFSET, &pcix_mem_base_reg); 299 299 rse_set = pcix_mem_base_reg & RSE_MASK; 300 300 if (rse_set) { 301 - ctrl_dbg(p_slot->ctrl, "%s W1C: Memory_Base_Limit[ RSE ]\n", 302 - __func__); 301 + ctrl_dbg(p_slot->ctrl, "Memory_Base_Limit[ RSE ] (W1C)\n"); 303 302 304 303 pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MEM_BASE_LIMIT_OFFSET, rse_set); 305 304 }
+18 -16
drivers/pci/hotplug/shpchp_core.c
··· 89 89 { 90 90 struct slot *slot = hotplug_slot->private; 91 91 92 - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 92 + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", 93 93 __func__, slot_name(slot)); 94 94 95 95 kfree(slot->hotplug_slot->info); ··· 136 136 snprintf(name, SLOT_NAME_SIZE, "%d", slot->number); 137 137 hotplug_slot->ops = &shpchp_hotplug_slot_ops; 138 138 139 - ctrl_dbg(ctrl, "Registering bus=%x dev=%x hp_slot=%x sun=%x " 140 - "slot_device_offset=%x\n", slot->bus, slot->device, 141 - slot->hp_slot, slot->number, ctrl->slot_device_offset); 139 + ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:%02x " 140 + "hp_slot=%x sun=%x slot_device_offset=%x\n", 141 + pci_domain_nr(ctrl->pci_dev->subordinate), 142 + slot->bus, slot->device, slot->hp_slot, slot->number, 143 + ctrl->slot_device_offset); 142 144 retval = pci_hp_register(slot->hotplug_slot, 143 145 ctrl->pci_dev->subordinate, slot->device, name); 144 146 if (retval) { ··· 191 189 { 192 190 struct slot *slot = get_slot(hotplug_slot); 193 191 194 - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 192 + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", 195 193 __func__, slot_name(slot)); 196 194 197 195 hotplug_slot->info->attention_status = status; ··· 204 202 { 205 203 struct slot *slot = get_slot(hotplug_slot); 206 204 207 - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 205 + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", 208 206 __func__, slot_name(slot)); 209 207 210 208 return shpchp_sysfs_enable_slot(slot); ··· 214 212 { 215 213 struct slot *slot = get_slot(hotplug_slot); 216 214 217 - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 215 + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", 218 216 __func__, slot_name(slot)); 219 217 220 218 return shpchp_sysfs_disable_slot(slot); ··· 225 223 struct slot *slot = get_slot(hotplug_slot); 226 224 int retval; 227 225 228 - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 226 + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", 229 227 __func__, slot_name(slot)); 230 228 231 229 retval = slot->hpc_ops->get_power_status(slot, value); ··· 240 238 struct slot *slot = get_slot(hotplug_slot); 241 239 int retval; 242 240 243 - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 241 + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", 244 242 __func__, slot_name(slot)); 245 243 246 244 retval = slot->hpc_ops->get_attention_status(slot, value); ··· 255 253 struct slot *slot = get_slot(hotplug_slot); 256 254 int retval; 257 255 258 - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 256 + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", 259 257 __func__, slot_name(slot)); 260 258 261 259 retval = slot->hpc_ops->get_latch_status(slot, value); ··· 270 268 struct slot *slot = get_slot(hotplug_slot); 271 269 int retval; 272 270 273 - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 271 + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", 274 272 __func__, slot_name(slot)); 275 273 276 274 retval = slot->hpc_ops->get_adapter_status(slot, value); ··· 286 284 struct slot *slot = get_slot(hotplug_slot); 287 285 int retval; 288 286 289 - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 287 + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", 290 288 __func__, slot_name(slot)); 291 289 292 290 retval = slot->hpc_ops->get_max_bus_speed(slot, value); ··· 301 299 struct slot *slot = get_slot(hotplug_slot); 302 300 int retval; 303 301 304 - ctrl_dbg(slot->ctrl, "%s - physical_slot = %s\n", 302 + ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", 305 303 __func__, slot_name(slot)); 306 304 307 305 retval = slot->hpc_ops->get_cur_bus_speed(slot, value); ··· 333 331 334 332 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL); 335 333 if (!ctrl) { 336 - dev_err(&pdev->dev, "%s : out of memory\n", __func__); 334 + dev_err(&pdev->dev, "%s: Out of memory\n", __func__); 337 335 goto err_out_none; 338 336 } 339 337 INIT_LIST_HEAD(&ctrl->slot_list); 340 338 341 339 rc = shpc_init(ctrl, pdev); 342 340 if (rc) { 343 - ctrl_dbg(ctrl, "controller initialization failed\n"); 341 + ctrl_dbg(ctrl, "Controller initialization failed\n"); 344 342 goto err_out_free_ctrl; 345 343 } 346 344 ··· 349 347 /* Setup the slot information structures */ 350 348 rc = init_slots(ctrl); 351 349 if (rc) { 352 - ctrl_err(ctrl, "slot initialization failed\n"); 350 + ctrl_err(ctrl, "Slot initialization failed\n"); 353 351 goto err_out_release_ctlr; 354 352 } 355 353
+25 -29
drivers/pci/hotplug/shpchp_ctrl.c
··· 62 62 u32 event_type; 63 63 64 64 /* Attention Button Change */ 65 - ctrl_dbg(ctrl, "Attention button interrupt received.\n"); 65 + ctrl_dbg(ctrl, "Attention button interrupt received\n"); 66 66 67 67 p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); 68 68 p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save)); ··· 86 86 u32 event_type; 87 87 88 88 /* Switch Change */ 89 - ctrl_dbg(ctrl, "Switch interrupt received.\n"); 89 + ctrl_dbg(ctrl, "Switch interrupt received\n"); 90 90 91 91 p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); 92 92 p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save)); 93 93 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); 94 - ctrl_dbg(ctrl, "%s: Card present %x Power status %x\n", 95 - __func__, p_slot->presence_save, p_slot->pwr_save); 94 + ctrl_dbg(ctrl, "Card present %x Power status %x\n", 95 + p_slot->presence_save, p_slot->pwr_save); 96 96 97 97 if (getstatus) { 98 98 /* ··· 123 123 u32 event_type; 124 124 125 125 /* Presence Change */ 126 - ctrl_dbg(ctrl, "Presence/Notify input change.\n"); 126 + ctrl_dbg(ctrl, "Presence/Notify input change\n"); 127 127 128 128 p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); 129 129 ··· 158 158 u32 event_type; 159 159 160 160 /* Power fault */ 161 - ctrl_dbg(ctrl, "Power fault interrupt received.\n"); 161 + ctrl_dbg(ctrl, "Power fault interrupt received\n"); 162 162 163 163 p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); 164 164 ··· 178 178 event_type = INT_POWER_FAULT; 179 179 /* set power fault status for this board */ 180 180 p_slot->status = 0xFF; 181 - ctrl_info(ctrl, "power fault bit %x set\n", hp_slot); 181 + ctrl_info(ctrl, "Power fault bit %x set\n", hp_slot); 182 182 } 183 183 184 184 queue_interrupt_event(p_slot, event_type); ··· 194 194 { 195 195 int rc = 0; 196 196 197 - ctrl_dbg(ctrl, "%s: change to speed %d\n", __func__, speed); 197 + ctrl_dbg(ctrl, "Change speed to %d\n", speed); 198 198 if ((rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, speed))) { 199 199 ctrl_err(ctrl, "%s: Issue of set bus speed mode command " 200 200 "failed\n", __func__); ··· 215 215 */ 216 216 if (flag) { 217 217 if (asp < bsp) { 218 - ctrl_err(ctrl, "%s: speed of bus %x and adapter %x " 219 - "mismatch\n", __func__, bsp, asp); 218 + ctrl_err(ctrl, "Speed of bus %x and adapter %x " 219 + "mismatch\n", bsp, asp); 220 220 rc = WRONG_BUS_FREQUENCY; 221 221 } 222 222 return rc; ··· 246 246 int rc = 0; 247 247 enum pci_bus_speed asp, bsp, msp; 248 248 struct controller *ctrl = p_slot->ctrl; 249 + struct pci_bus *parent = ctrl->pci_dev->subordinate; 249 250 250 251 hp_slot = p_slot->device - ctrl->slot_device_offset; 251 252 ··· 257 256 /* Power on slot without connecting to bus */ 258 257 rc = p_slot->hpc_ops->power_on_slot(p_slot); 259 258 if (rc) { 260 - ctrl_err(ctrl, "%s: Failed to power on slot\n", __func__); 259 + ctrl_err(ctrl, "Failed to power on slot\n"); 261 260 return -1; 262 261 } 263 262 ··· 273 272 274 273 /* turn on board, blink green LED, turn off Amber LED */ 275 274 if ((rc = p_slot->hpc_ops->slot_enable(p_slot))) { 276 - ctrl_err(ctrl, "%s: Issue of Slot Enable command" 277 - " failed\n", __func__); 275 + ctrl_err(ctrl, "Issue of Slot Enable command failed\n"); 278 276 return rc; 279 277 } 280 278 } 281 279 282 280 rc = p_slot->hpc_ops->get_adapter_speed(p_slot, &asp); 283 281 if (rc) { 284 - ctrl_err(ctrl, "%s: Can't get adapter speed or bus mode " 285 - "mismatch\n", __func__); 282 + ctrl_err(ctrl, "Can't get adapter speed or " 283 + "bus mode mismatch\n"); 286 284 return WRONG_BUS_FREQUENCY; 287 285 } 288 286 289 287 rc = p_slot->hpc_ops->get_cur_bus_speed(p_slot, &bsp); 290 288 if (rc) { 291 - ctrl_err(ctrl, "%s: Can't get bus operation speed\n", __func__); 289 + ctrl_err(ctrl, "Can't get bus operation speed\n"); 292 290 return WRONG_BUS_FREQUENCY; 293 291 } 294 292 295 293 rc = p_slot->hpc_ops->get_max_bus_speed(p_slot, &msp); 296 294 if (rc) { 297 - ctrl_err(ctrl, "%s: Can't get max bus operation speed\n", 298 - __func__); 295 + ctrl_err(ctrl, "Can't get max bus operation speed\n"); 299 296 msp = bsp; 300 297 } 301 298 ··· 311 312 312 313 /* turn on board, blink green LED, turn off Amber LED */ 313 314 if ((rc = p_slot->hpc_ops->slot_enable(p_slot))) { 314 - ctrl_err(ctrl, "%s: Issue of Slot Enable command failed\n", 315 - __func__); 315 + ctrl_err(ctrl, "Issue of Slot Enable command failed\n"); 316 316 return rc; 317 317 } 318 318 ··· 322 324 /* Check for a power fault */ 323 325 if (p_slot->status == 0xFF) { 324 326 /* power fault occurred, but it was benign */ 325 - ctrl_dbg(ctrl, "%s: power fault\n", __func__); 327 + ctrl_dbg(ctrl, "%s: Power fault\n", __func__); 326 328 rc = POWER_FAILURE; 327 329 p_slot->status = 0; 328 330 goto err_exit; 329 331 } 330 332 331 333 if (shpchp_configure_device(p_slot)) { 332 - ctrl_err(ctrl, "Cannot add device at 0x%x:0x%x\n", 333 - p_slot->bus, p_slot->device); 334 + ctrl_err(ctrl, "Cannot add device at %04x:%02x:%02x\n", 335 + pci_domain_nr(parent), p_slot->bus, p_slot->device); 334 336 goto err_exit; 335 337 } 336 338 ··· 371 373 hp_slot = p_slot->device - ctrl->slot_device_offset; 372 374 p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); 373 375 374 - ctrl_dbg(ctrl, "In %s, hp_slot = %d\n", __func__, hp_slot); 376 + ctrl_dbg(ctrl, "%s: hp_slot = %d\n", __func__, hp_slot); 375 377 376 378 /* Change status to shutdown */ 377 379 if (p_slot->is_a_board) ··· 387 389 388 390 rc = p_slot->hpc_ops->set_attention_status(p_slot, 0); 389 391 if (rc) { 390 - ctrl_err(ctrl, "%s: Issue of Set Attention command failed\n", 391 - __func__); 392 + ctrl_err(ctrl, "Issue of Set Attention command failed\n"); 392 393 return rc; 393 394 } 394 395 ··· 523 526 */ 524 527 ctrl_info(ctrl, "Button cancel on Slot(%s)\n", 525 528 slot_name(p_slot)); 526 - ctrl_dbg(ctrl, "%s: button cancel\n", __func__); 527 529 cancel_delayed_work(&p_slot->work); 528 530 if (p_slot->state == BLINKINGOFF_STATE) 529 531 p_slot->hpc_ops->green_led_on(p_slot); ··· 561 565 handle_button_press_event(p_slot); 562 566 break; 563 567 case INT_POWER_FAULT: 564 - ctrl_dbg(p_slot->ctrl, "%s: power fault\n", __func__); 568 + ctrl_dbg(p_slot->ctrl, "%s: Power fault\n", __func__); 565 569 p_slot->hpc_ops->set_attention_status(p_slot, 1); 566 570 p_slot->hpc_ops->green_led_off(p_slot); 567 571 break; ··· 656 660 } 657 661 rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); 658 662 if (rc || !getstatus) { 659 - ctrl_info(ctrl, "Already disabled slot(%s)\n", 663 + ctrl_info(ctrl, "Already disabled on slot(%s)\n", 660 664 slot_name(p_slot)); 661 665 goto out; 662 666 }
+33 -40
drivers/pci/hotplug/shpchp_hpc.c
··· 320 320 321 321 if (!shpc_poll_ctrl_busy(ctrl)) { 322 322 /* After 1 sec and and the controller is still busy */ 323 - ctrl_err(ctrl, "%s : Controller is still busy after 1 sec.\n", 324 - __func__); 323 + ctrl_err(ctrl, "Controller is still busy after 1 sec\n"); 325 324 retval = -EBUSY; 326 325 goto out; 327 326 } ··· 343 344 344 345 cmd_status = hpc_check_cmd_status(slot->ctrl); 345 346 if (cmd_status) { 346 - ctrl_err(ctrl, "%s: Failed to issued command 0x%x " 347 - "(error code = %d)\n", __func__, cmd, cmd_status); 347 + ctrl_err(ctrl, 348 + "Failed to issued command 0x%x (error code = %d)\n", 349 + cmd, cmd_status); 348 350 retval = -EIO; 349 351 } 350 352 out: ··· 364 364 break; 365 365 case 1: 366 366 retval = SWITCH_OPEN; 367 - ctrl_err(ctrl, "%s: Switch opened!\n", __func__); 367 + ctrl_err(ctrl, "Switch opened!\n"); 368 368 break; 369 369 case 2: 370 370 retval = INVALID_CMD; 371 - ctrl_err(ctrl, "%s: Invalid HPC command!\n", __func__); 371 + ctrl_err(ctrl, "Invalid HPC command!\n"); 372 372 break; 373 373 case 4: 374 374 retval = INVALID_SPEED_MODE; 375 - ctrl_err(ctrl, "%s: Invalid bus speed/mode!\n", __func__); 375 + ctrl_err(ctrl, "Invalid bus speed/mode!\n"); 376 376 break; 377 377 default: 378 378 retval = cmd_status; ··· 773 773 continue; 774 774 775 775 slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); 776 - ctrl_dbg(ctrl, "%s: Slot %x with intr, slot register = %x\n", 777 - __func__, hp_slot, slot_reg); 776 + ctrl_dbg(ctrl, "Slot %x with intr, slot register = %x\n", 777 + hp_slot, slot_reg); 778 778 779 779 if (slot_reg & MRL_CHANGE_DETECTED) 780 780 shpchp_handle_switch_change(hp_slot, ctrl); ··· 949 949 u8 i; 950 950 951 951 ctrl->pci_dev = pdev; /* pci_dev of the P2P bridge */ 952 + ctrl_dbg(ctrl, "Hotplug Controller:\n"); 952 953 953 954 if ((pdev->vendor == PCI_VENDOR_ID_AMD) || (pdev->device == 954 955 PCI_DEVICE_ID_AMD_GOLAM_7450)) { ··· 959 958 } else { 960 959 ctrl->cap_offset = pci_find_capability(pdev, PCI_CAP_ID_SHPC); 961 960 if (!ctrl->cap_offset) { 962 - ctrl_err(ctrl, "%s : cap_offset == 0\n", __func__); 961 + ctrl_err(ctrl, "Cannot find PCI capability\n"); 963 962 goto abort; 964 963 } 965 - ctrl_dbg(ctrl, "%s: cap_offset = %x\n", __func__, 966 - ctrl->cap_offset); 964 + ctrl_dbg(ctrl, " cap_offset = %x\n", ctrl->cap_offset); 967 965 968 966 rc = shpc_indirect_read(ctrl, 0, &shpc_base_offset); 969 967 if (rc) { 970 - ctrl_err(ctrl, "%s: cannot read base_offset\n", 971 - __func__); 968 + ctrl_err(ctrl, "Cannot read base_offset\n"); 972 969 goto abort; 973 970 } 974 971 975 972 rc = shpc_indirect_read(ctrl, 3, &tempdword); 976 973 if (rc) { 977 - ctrl_err(ctrl, "%s: cannot read slot config\n", 978 - __func__); 974 + ctrl_err(ctrl, "Cannot read slot config\n"); 979 975 goto abort; 980 976 } 981 977 num_slots = tempdword & SLOT_NUM; 982 - ctrl_dbg(ctrl, "%s: num_slots (indirect) %x\n", 983 - __func__, num_slots); 978 + ctrl_dbg(ctrl, " num_slots (indirect) %x\n", num_slots); 984 979 985 980 for (i = 0; i < 9 + num_slots; i++) { 986 981 rc = shpc_indirect_read(ctrl, i, &tempdword); 987 982 if (rc) { 988 - ctrl_err(ctrl, "%s: cannot read creg " 989 - "(index = %d)\n", __func__, i); 983 + ctrl_err(ctrl, 984 + "Cannot read creg (index = %d)\n", i); 990 985 goto abort; 991 986 } 992 - ctrl_dbg(ctrl, "%s: offset %d: value %x\n", 993 - __func__, i, tempdword); 987 + ctrl_dbg(ctrl, " offset %d: value %x\n", i, tempdword); 994 988 } 995 989 996 990 ctrl->mmio_base = ··· 999 1003 1000 1004 rc = pci_enable_device(pdev); 1001 1005 if (rc) { 1002 - ctrl_err(ctrl, "%s: pci_enable_device failed\n", __func__); 1006 + ctrl_err(ctrl, "pci_enable_device failed\n"); 1003 1007 goto abort; 1004 1008 } 1005 1009 1006 1010 if (!request_mem_region(ctrl->mmio_base, ctrl->mmio_size, MY_NAME)) { 1007 - ctrl_err(ctrl, "%s: cannot reserve MMIO region\n", __func__); 1011 + ctrl_err(ctrl, "Cannot reserve MMIO region\n"); 1008 1012 rc = -1; 1009 1013 goto abort; 1010 1014 } 1011 1015 1012 1016 ctrl->creg = ioremap(ctrl->mmio_base, ctrl->mmio_size); 1013 1017 if (!ctrl->creg) { 1014 - ctrl_err(ctrl, "%s: cannot remap MMIO region %lx @ %lx\n", 1015 - __func__, ctrl->mmio_size, ctrl->mmio_base); 1018 + ctrl_err(ctrl, "Cannot remap MMIO region %lx @ %lx\n", 1019 + ctrl->mmio_size, ctrl->mmio_base); 1016 1020 release_mem_region(ctrl->mmio_base, ctrl->mmio_size); 1017 1021 rc = -1; 1018 1022 goto abort; 1019 1023 } 1020 - ctrl_dbg(ctrl, "%s: ctrl->creg %p\n", __func__, ctrl->creg); 1024 + ctrl_dbg(ctrl, "ctrl->creg %p\n", ctrl->creg); 1021 1025 1022 1026 mutex_init(&ctrl->crit_sect); 1023 1027 mutex_init(&ctrl->cmd_lock); ··· 1036 1040 1037 1041 /* Mask Global Interrupt Mask & Command Complete Interrupt Mask */ 1038 1042 tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); 1039 - ctrl_dbg(ctrl, "%s: SERR_INTR_ENABLE = %x\n", __func__, tempdword); 1043 + ctrl_dbg(ctrl, "SERR_INTR_ENABLE = %x\n", tempdword); 1040 1044 tempdword |= (GLOBAL_INTR_MASK | GLOBAL_SERR_MASK | 1041 1045 COMMAND_INTR_MASK | ARBITER_SERR_MASK); 1042 1046 tempdword &= ~SERR_INTR_RSVDZ_MASK; 1043 1047 shpc_writel(ctrl, SERR_INTR_ENABLE, tempdword); 1044 1048 tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); 1045 - ctrl_dbg(ctrl, "%s: SERR_INTR_ENABLE = %x\n", __func__, tempdword); 1049 + ctrl_dbg(ctrl, "SERR_INTR_ENABLE = %x\n", tempdword); 1046 1050 1047 1051 /* Mask the MRL sensor SERR Mask of individual slot in 1048 1052 * Slot SERR-INT Mask & clear all the existing event if any 1049 1053 */ 1050 1054 for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) { 1051 1055 slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); 1052 - ctrl_dbg(ctrl, "%s: Default Logical Slot Register %d " 1053 - "value %x\n", __func__, hp_slot, slot_reg); 1056 + ctrl_dbg(ctrl, "Default Logical Slot Register %d value %x\n", 1057 + hp_slot, slot_reg); 1054 1058 slot_reg |= (PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK | 1055 1059 BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK | 1056 1060 CON_PFAULT_INTR_MASK | MRL_CHANGE_SERR_MASK | ··· 1075 1079 1076 1080 rc = request_irq(ctrl->pci_dev->irq, shpc_isr, IRQF_SHARED, 1077 1081 MY_NAME, (void *)ctrl); 1078 - ctrl_dbg(ctrl, "%s: request_irq %d for hpc%d (returns %d)\n", 1079 - __func__, ctrl->pci_dev->irq, 1082 + ctrl_dbg(ctrl, "request_irq %d for hpc%d (returns %d)\n", 1083 + ctrl->pci_dev->irq, 1080 1084 atomic_read(&shpchp_num_controllers), rc); 1081 1085 if (rc) { 1082 1086 ctrl_err(ctrl, "Can't get irq %d for the hotplug " ··· 1084 1088 goto abort_iounmap; 1085 1089 } 1086 1090 } 1087 - ctrl_dbg(ctrl, "%s: HPC at b:d:f:irq=0x%x:%x:%x:%x\n", 1088 - __func__, pdev->bus->number, PCI_SLOT(pdev->devfn), 1089 - PCI_FUNC(pdev->devfn), pdev->irq); 1091 + ctrl_dbg(ctrl, "HPC at %s irq=%x\n", pci_name(pdev), pdev->irq); 1090 1092 1091 1093 /* 1092 1094 * If this is the first controller to be initialized, ··· 1103 1109 */ 1104 1110 for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) { 1105 1111 slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); 1106 - ctrl_dbg(ctrl, "%s: Default Logical Slot Register %d " 1107 - "value %x\n", __func__, hp_slot, slot_reg); 1112 + ctrl_dbg(ctrl, "Default Logical Slot Register %d value %x\n", 1113 + hp_slot, slot_reg); 1108 1114 slot_reg &= ~(PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK | 1109 1115 BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK | 1110 1116 CON_PFAULT_INTR_MASK | SLOT_REG_RSVDZ_MASK); ··· 1117 1123 SERR_INTR_RSVDZ_MASK); 1118 1124 shpc_writel(ctrl, SERR_INTR_ENABLE, tempdword); 1119 1125 tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); 1120 - ctrl_dbg(ctrl, "%s: SERR_INTR_ENABLE = %x\n", 1121 - __func__, tempdword); 1126 + ctrl_dbg(ctrl, "SERR_INTR_ENABLE = %x\n", tempdword); 1122 1127 } 1123 1128 1124 1129 return 0;
+6 -8
drivers/pci/hotplug/shpchp_pci.c
··· 49 49 /* use default values if we can't get them from firmware */ 50 50 if (get_hp_params_from_firmware(dev, &hpp) || 51 51 !hpp.t0 || (hpp.t0->revision > 1)) { 52 - printk(KERN_WARNING 53 - "%s: Could not get hotplug parameters. Use defaults\n", 54 - __func__); 52 + warn("Could not get hotplug parameters. Use defaults\n"); 55 53 hpp.t0 = &hpp.type0_data; 56 54 hpp.t0->revision = 0; 57 55 hpp.t0->cache_line_size = 8; ··· 103 105 104 106 dev = pci_get_slot(parent, PCI_DEVFN(p_slot->device, 0)); 105 107 if (dev) { 106 - ctrl_err(ctrl, 107 - "Device %s already exists at %x:%x, cannot hot-add\n", 108 - pci_name(dev), p_slot->bus, p_slot->device); 108 + ctrl_err(ctrl, "Device %s already exists " 109 + "at %04x:%02x:%02x, cannot hot-add\n", pci_name(dev), 110 + pci_domain_nr(parent), p_slot->bus, p_slot->device); 109 111 pci_dev_put(dev); 110 112 return -EINVAL; 111 113 } ··· 171 173 struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate; 172 174 struct controller *ctrl = p_slot->ctrl; 173 175 174 - ctrl_dbg(ctrl, "%s: bus/dev = %x/%x\n", 175 - __func__, p_slot->bus, p_slot->device); 176 + ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:%02x\n", 177 + __func__, pci_domain_nr(parent), p_slot->bus, p_slot->device); 176 178 177 179 for (j=0; j<8 ; j++) { 178 180 struct pci_dev* temp = pci_get_slot(parent,