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

PCI: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Harvey Harrison and committed by
Greg Kroah-Hartman
66bef8c0 ca99eb8c

+487 -487
+12 -12
drivers/pci/hotplug/acpi_pcihp.c
··· 36 36 37 37 #define MY_NAME "acpi_pcihp" 38 38 39 - #define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __FUNCTION__ , ## arg); } while (0) 39 + #define dbg(fmt, arg...) do { if (debug_acpi) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __func__ , ## arg); } while (0) 40 40 #define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg) 41 41 #define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg) 42 42 #define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg) ··· 71 71 default: 72 72 printk(KERN_WARNING 73 73 "%s: Type 0 Revision %d record not supported\n", 74 - __FUNCTION__, revision); 74 + __func__, revision); 75 75 return AE_ERROR; 76 76 } 77 77 return AE_OK; ··· 100 100 default: 101 101 printk(KERN_WARNING 102 102 "%s: Type 1 Revision %d record not supported\n", 103 - __FUNCTION__, revision); 103 + __func__, revision); 104 104 return AE_ERROR; 105 105 } 106 106 return AE_OK; ··· 142 142 default: 143 143 printk(KERN_WARNING 144 144 "%s: Type 2 Revision %d record not supported\n", 145 - __FUNCTION__, revision); 145 + __func__, revision); 146 146 return AE_ERROR; 147 147 } 148 148 return AE_OK; ··· 203 203 break; 204 204 default: 205 205 printk(KERN_ERR "%s: Type %d record not supported\n", 206 - __FUNCTION__, type); 206 + __func__, type); 207 207 status = AE_ERROR; 208 208 goto exit; 209 209 } ··· 235 235 ret_buf.pointer = kmalloc (ret_buf.length, GFP_KERNEL); 236 236 if (!ret_buf.pointer) { 237 237 printk(KERN_ERR "%s:%s alloc for _HPP fail\n", 238 - __FUNCTION__, (char *)string.pointer); 238 + __func__, (char *)string.pointer); 239 239 kfree(string.pointer); 240 240 return AE_NO_MEMORY; 241 241 } ··· 245 245 break; 246 246 default: 247 247 if (ACPI_FAILURE(status)) { 248 - pr_debug("%s:%s _HPP fail=0x%x\n", __FUNCTION__, 248 + pr_debug("%s:%s _HPP fail=0x%x\n", __func__, 249 249 (char *)string.pointer, status); 250 250 kfree(string.pointer); 251 251 return status; ··· 254 254 255 255 ext_obj = (union acpi_object *) ret_buf.pointer; 256 256 if (ext_obj->type != ACPI_TYPE_PACKAGE) { 257 - printk(KERN_ERR "%s:%s _HPP obj not a package\n", __FUNCTION__, 257 + printk(KERN_ERR "%s:%s _HPP obj not a package\n", __func__, 258 258 (char *)string.pointer); 259 259 status = AE_ERROR; 260 260 goto free_and_return; ··· 270 270 break; 271 271 default: 272 272 printk(KERN_ERR "%s:%s _HPP obj type incorrect\n", 273 - __FUNCTION__, (char *)string.pointer); 273 + __func__, (char *)string.pointer); 274 274 status = AE_ERROR; 275 275 goto free_and_return; 276 276 } ··· 311 311 if (ACPI_FAILURE(status)) 312 312 if (status != AE_NOT_FOUND) 313 313 printk(KERN_ERR "%s:%s OSHP fails=0x%x\n", 314 - __FUNCTION__, (char *)string.pointer, status); 314 + __func__, (char *)string.pointer, status); 315 315 else 316 316 dbg("%s:%s OSHP not found\n", 317 - __FUNCTION__, (char *)string.pointer); 317 + __func__, (char *)string.pointer); 318 318 else 319 - pr_debug("%s:%s OSHP passes\n", __FUNCTION__, 319 + pr_debug("%s:%s OSHP passes\n", __func__, 320 320 (char *)string.pointer); 321 321 322 322 kfree(string.pointer);
+9 -9
drivers/pci/hotplug/acpiphp_core.c
··· 138 138 { 139 139 struct slot *slot = hotplug_slot->private; 140 140 141 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 141 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 142 142 143 143 /* enable the specified slot */ 144 144 return acpiphp_enable_slot(slot->acpi_slot); ··· 156 156 struct slot *slot = hotplug_slot->private; 157 157 int retval; 158 158 159 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 159 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 160 160 161 161 /* disable the specified slot */ 162 162 retval = acpiphp_disable_slot(slot->acpi_slot); ··· 179 179 { 180 180 int retval = -ENODEV; 181 181 182 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 182 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 183 183 184 184 if (attention_info && try_module_get(attention_info->owner)) { 185 185 retval = attention_info->set_attn(hotplug_slot, status); ··· 202 202 { 203 203 struct slot *slot = hotplug_slot->private; 204 204 205 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 205 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 206 206 207 207 *value = acpiphp_get_power_status(slot->acpi_slot); 208 208 ··· 224 224 { 225 225 int retval = -EINVAL; 226 226 227 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 227 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 228 228 229 229 if (attention_info && try_module_get(attention_info->owner)) { 230 230 retval = attention_info->get_attn(hotplug_slot, value); ··· 247 247 { 248 248 struct slot *slot = hotplug_slot->private; 249 249 250 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 250 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 251 251 252 252 *value = acpiphp_get_latch_status(slot->acpi_slot); 253 253 ··· 267 267 { 268 268 struct slot *slot = hotplug_slot->private; 269 269 270 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 270 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 271 271 272 272 *value = acpiphp_get_adapter_status(slot->acpi_slot); 273 273 ··· 284 284 { 285 285 struct slot *slot = hotplug_slot->private; 286 286 287 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 287 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 288 288 289 289 *value = acpiphp_get_address(slot->acpi_slot); 290 290 ··· 318 318 { 319 319 struct slot *slot = hotplug_slot->private; 320 320 321 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 321 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 322 322 323 323 kfree(slot->hotplug_slot); 324 324 kfree(slot);
+19 -19
drivers/pci/hotplug/acpiphp_glue.c
··· 352 352 /* use default numbers */ 353 353 printk(KERN_WARNING 354 354 "%s: Could not get hotplug parameters. Use defaults\n", 355 - __FUNCTION__); 355 + __func__); 356 356 bridge->hpp.t0 = &bridge->hpp.type0_data; 357 357 bridge->hpp.t0->revision = 0; 358 358 bridge->hpp.t0->cache_line_size = 0x10; ··· 534 534 535 535 status = acpi_evaluate_integer(handle, "_ADR", NULL, &tmp); 536 536 if (ACPI_FAILURE(status)) { 537 - dbg("%s: _ADR evaluation failure\n", __FUNCTION__); 537 + dbg("%s: _ADR evaluation failure\n", __func__); 538 538 return AE_OK; 539 539 } 540 540 ··· 578 578 if (ACPI_SUCCESS(status)) { 579 579 status = acpi_evaluate_integer(handle, "_STA", NULL, &tmp); 580 580 if (ACPI_FAILURE(status)) { 581 - dbg("%s: _STA evaluation failure\n", __FUNCTION__); 581 + dbg("%s: _STA evaluation failure\n", __func__); 582 582 return 0; 583 583 } 584 584 if ((tmp & ACPI_STA_FUNCTIONING) == 0) ··· 928 928 func = list_entry(l, struct acpiphp_func, sibling); 929 929 930 930 if (func->flags & FUNC_HAS_PS0) { 931 - dbg("%s: executing _PS0\n", __FUNCTION__); 931 + dbg("%s: executing _PS0\n", __func__); 932 932 status = acpi_evaluate_object(func->handle, "_PS0", NULL, NULL); 933 933 if (ACPI_FAILURE(status)) { 934 - warn("%s: _PS0 failed\n", __FUNCTION__); 934 + warn("%s: _PS0 failed\n", __func__); 935 935 retval = -1; 936 936 goto err_exit; 937 937 } else ··· 966 966 if (func->flags & FUNC_HAS_PS3) { 967 967 status = acpi_evaluate_object(func->handle, "_PS3", NULL, NULL); 968 968 if (ACPI_FAILURE(status)) { 969 - warn("%s: _PS3 failed\n", __FUNCTION__); 969 + warn("%s: _PS3 failed\n", __func__); 970 970 retval = -1; 971 971 goto err_exit; 972 972 } else ··· 1300 1300 1301 1301 status = acpi_evaluate_object(func->handle, "_EJ0", &arg_list, NULL); 1302 1302 if (ACPI_FAILURE(status)) { 1303 - warn("%s: _EJ0 failed\n", __FUNCTION__); 1303 + warn("%s: _EJ0 failed\n", __func__); 1304 1304 return -1; 1305 1305 } else 1306 1306 break; ··· 1349 1349 } 1350 1350 } 1351 1351 1352 - dbg("%s: %d enabled, %d disabled\n", __FUNCTION__, enabled, disabled); 1352 + dbg("%s: %d enabled, %d disabled\n", __func__, enabled, disabled); 1353 1353 1354 1354 err_exit: 1355 1355 return retval; ··· 1527 1527 if (bridge) { 1528 1528 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); 1529 1529 dbg("%s: re-enumerating slots under %s\n", 1530 - __FUNCTION__, objname); 1530 + __func__, objname); 1531 1531 acpiphp_check_bridge(bridge); 1532 1532 } 1533 1533 return AE_OK ; ··· 1572 1572 switch (type) { 1573 1573 case ACPI_NOTIFY_BUS_CHECK: 1574 1574 /* bus re-enumerate */ 1575 - dbg("%s: Bus check notify on %s\n", __FUNCTION__, objname); 1575 + dbg("%s: Bus check notify on %s\n", __func__, objname); 1576 1576 if (bridge) { 1577 1577 dbg("%s: re-enumerating slots under %s\n", 1578 - __FUNCTION__, objname); 1578 + __func__, objname); 1579 1579 acpiphp_check_bridge(bridge); 1580 1580 } 1581 1581 if (num_sub_bridges) ··· 1585 1585 1586 1586 case ACPI_NOTIFY_DEVICE_CHECK: 1587 1587 /* device check */ 1588 - dbg("%s: Device check notify on %s\n", __FUNCTION__, objname); 1588 + dbg("%s: Device check notify on %s\n", __func__, objname); 1589 1589 acpiphp_check_bridge(bridge); 1590 1590 break; 1591 1591 1592 1592 case ACPI_NOTIFY_DEVICE_WAKE: 1593 1593 /* wake event */ 1594 - dbg("%s: Device wake notify on %s\n", __FUNCTION__, objname); 1594 + dbg("%s: Device wake notify on %s\n", __func__, objname); 1595 1595 break; 1596 1596 1597 1597 case ACPI_NOTIFY_EJECT_REQUEST: 1598 1598 /* request device eject */ 1599 - dbg("%s: Device eject notify on %s\n", __FUNCTION__, objname); 1599 + dbg("%s: Device eject notify on %s\n", __func__, objname); 1600 1600 if ((bridge->type != BRIDGE_TYPE_HOST) && 1601 1601 (bridge->flags & BRIDGE_HAS_EJ0)) { 1602 1602 struct acpiphp_slot *slot; ··· 1649 1649 switch (type) { 1650 1650 case ACPI_NOTIFY_BUS_CHECK: 1651 1651 /* bus re-enumerate */ 1652 - dbg("%s: Bus check notify on %s\n", __FUNCTION__, objname); 1652 + dbg("%s: Bus check notify on %s\n", __func__, objname); 1653 1653 acpiphp_enable_slot(func->slot); 1654 1654 break; 1655 1655 1656 1656 case ACPI_NOTIFY_DEVICE_CHECK: 1657 1657 /* device check : re-enumerate from parent bus */ 1658 - dbg("%s: Device check notify on %s\n", __FUNCTION__, objname); 1658 + dbg("%s: Device check notify on %s\n", __func__, objname); 1659 1659 acpiphp_check_bridge(func->slot->bridge); 1660 1660 break; 1661 1661 1662 1662 case ACPI_NOTIFY_DEVICE_WAKE: 1663 1663 /* wake event */ 1664 - dbg("%s: Device wake notify on %s\n", __FUNCTION__, objname); 1664 + dbg("%s: Device wake notify on %s\n", __func__, objname); 1665 1665 break; 1666 1666 1667 1667 case ACPI_NOTIFY_EJECT_REQUEST: 1668 1668 /* request device eject */ 1669 - dbg("%s: Device eject notify on %s\n", __FUNCTION__, objname); 1669 + dbg("%s: Device eject notify on %s\n", __func__, objname); 1670 1670 if (!(acpiphp_disable_slot(func->slot))) 1671 1671 acpiphp_eject_slot(func->slot); 1672 1672 break; ··· 1796 1796 if (retval) 1797 1797 power_off_slot(slot); 1798 1798 } else { 1799 - dbg("%s: Slot status is not ACPI_STA_ALL\n", __FUNCTION__); 1799 + dbg("%s: Slot status is not ACPI_STA_ALL\n", __func__); 1800 1800 power_off_slot(slot); 1801 1801 } 1802 1802
+18 -18
drivers/pci/hotplug/acpiphp_ibm.c
··· 186 186 187 187 ibm_slot = ibm_slot_from_id(hpslot_to_sun(slot)); 188 188 189 - dbg("%s: set slot %d (%d) attention status to %d\n", __FUNCTION__, 189 + dbg("%s: set slot %d (%d) attention status to %d\n", __func__, 190 190 ibm_slot->slot.slot_num, ibm_slot->slot.slot_id, 191 191 (status ? 1 : 0)); 192 192 ··· 231 231 else 232 232 *status = 0; 233 233 234 - dbg("%s: get slot %d (%d) attention status is %d\n", __FUNCTION__, 234 + dbg("%s: get slot %d (%d) attention status is %d\n", __func__, 235 235 ibm_slot->slot.slot_num, ibm_slot->slot.slot_id, 236 236 *status); 237 237 ··· 263 263 u8 subevent = event & 0xf0; 264 264 struct notification *note = context; 265 265 266 - dbg("%s: Received notification %02x\n", __FUNCTION__, event); 266 + dbg("%s: Received notification %02x\n", __func__, event); 267 267 268 268 if (subevent == 0x80) { 269 - dbg("%s: generationg bus event\n", __FUNCTION__); 269 + dbg("%s: generationg bus event\n", __func__); 270 270 acpi_bus_generate_proc_event(note->device, note->event, detail); 271 271 acpi_bus_generate_netlink_event(note->device->pnp.device_class, 272 272 note->device->dev.bus_id, ··· 299 299 300 300 status = acpi_evaluate_object(ibm_acpi_handle, "APCI", NULL, &buffer); 301 301 if (ACPI_FAILURE(status)) { 302 - err("%s: APCI evaluation failed\n", __FUNCTION__); 302 + err("%s: APCI evaluation failed\n", __func__); 303 303 return -ENODEV; 304 304 } 305 305 ··· 307 307 if (!(package) || 308 308 (package->type != ACPI_TYPE_PACKAGE) || 309 309 !(package->package.elements)) { 310 - err("%s: Invalid APCI object\n", __FUNCTION__); 310 + err("%s: Invalid APCI object\n", __func__); 311 311 goto read_table_done; 312 312 } 313 313 314 314 for(size = 0, i = 0; i < package->package.count; i++) { 315 315 if (package->package.elements[i].type != ACPI_TYPE_BUFFER) { 316 - err("%s: Invalid APCI element %d\n", __FUNCTION__, i); 316 + err("%s: Invalid APCI element %d\n", __func__, i); 317 317 goto read_table_done; 318 318 } 319 319 size += package->package.elements[i].buffer.length; ··· 324 324 325 325 lbuf = kzalloc(size, GFP_KERNEL); 326 326 dbg("%s: element count: %i, ASL table size: %i, &table = 0x%p\n", 327 - __FUNCTION__, package->package.count, size, lbuf); 327 + __func__, package->package.count, size, lbuf); 328 328 329 329 if (lbuf) { 330 330 *bufp = lbuf; ··· 368 368 int bytes_read = -EINVAL; 369 369 char *table = NULL; 370 370 371 - dbg("%s: pos = %d, size = %zd\n", __FUNCTION__, (int)pos, size); 371 + dbg("%s: pos = %d, size = %zd\n", __func__, (int)pos, size); 372 372 373 373 if (pos == 0) { 374 374 bytes_read = ibm_get_table_from_acpi(&table); ··· 402 402 status = acpi_get_object_info(handle, &info_buffer); 403 403 if (ACPI_FAILURE(status)) { 404 404 err("%s: Failed to get device information status=0x%x\n", 405 - __FUNCTION__, status); 405 + __func__, status); 406 406 return retval; 407 407 } 408 408 info = info_buffer.pointer; ··· 432 432 struct acpi_device *device; 433 433 struct kobject *sysdir = &pci_hotplug_slots_kset->kobj; 434 434 435 - dbg("%s\n", __FUNCTION__); 435 + dbg("%s\n", __func__); 436 436 437 437 if (acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, 438 438 ACPI_UINT32_MAX, ibm_find_acpi_device, 439 439 &ibm_acpi_handle, NULL) != FOUND_APCI) { 440 - err("%s: acpi_walk_namespace failed\n", __FUNCTION__); 440 + err("%s: acpi_walk_namespace failed\n", __func__); 441 441 retval = -ENODEV; 442 442 goto init_return; 443 443 } 444 - dbg("%s: found IBM aPCI device\n", __FUNCTION__); 444 + dbg("%s: found IBM aPCI device\n", __func__); 445 445 if (acpi_bus_get_device(ibm_acpi_handle, &device)) { 446 - err("%s: acpi_bus_get_device failed\n", __FUNCTION__); 446 + err("%s: acpi_bus_get_device failed\n", __func__); 447 447 retval = -ENODEV; 448 448 goto init_return; 449 449 } ··· 458 458 &ibm_note); 459 459 if (ACPI_FAILURE(status)) { 460 460 err("%s: Failed to register notification handler\n", 461 - __FUNCTION__); 461 + __func__); 462 462 retval = -EBUSY; 463 463 goto init_cleanup; 464 464 } ··· 479 479 acpi_status status; 480 480 struct kobject *sysdir = &pci_hotplug_slots_kset->kobj; 481 481 482 - dbg("%s\n", __FUNCTION__); 482 + dbg("%s\n", __func__); 483 483 484 484 if (acpiphp_unregister_attention(&ibm_attention_info)) 485 - err("%s: attention info deregistration failed", __FUNCTION__); 485 + err("%s: attention info deregistration failed", __func__); 486 486 487 487 status = acpi_remove_notify_handler( 488 488 ibm_acpi_handle, 489 489 ACPI_DEVICE_NOTIFY, 490 490 ibm_handle_events); 491 491 if (ACPI_FAILURE(status)) 492 - err("%s: Notification handler removal failed\n", __FUNCTION__); 492 + err("%s: Notification handler removal failed\n", __func__); 493 493 /* remove the /sys entries */ 494 494 sysfs_remove_bin_file(sysdir, &ibm_apci_table_attr); 495 495 }
+30 -30
drivers/pci/hotplug/cpci_hotplug_core.c
··· 108 108 struct slot *slot = hotplug_slot->private; 109 109 int retval = 0; 110 110 111 - dbg("%s - physical_slot = %s", __FUNCTION__, hotplug_slot->name); 111 + dbg("%s - physical_slot = %s", __func__, hotplug_slot->name); 112 112 113 113 if (controller->ops->set_power) 114 114 retval = controller->ops->set_power(slot, 1); ··· 121 121 struct slot *slot = hotplug_slot->private; 122 122 int retval = 0; 123 123 124 - dbg("%s - physical_slot = %s", __FUNCTION__, hotplug_slot->name); 124 + dbg("%s - physical_slot = %s", __func__, hotplug_slot->name); 125 125 126 126 down_write(&list_rwsem); 127 127 128 128 /* Unconfigure device */ 129 129 dbg("%s - unconfiguring slot %s", 130 - __FUNCTION__, slot->hotplug_slot->name); 130 + __func__, slot->hotplug_slot->name); 131 131 if ((retval = cpci_unconfigure_slot(slot))) { 132 132 err("%s - could not unconfigure slot %s", 133 - __FUNCTION__, slot->hotplug_slot->name); 133 + __func__, slot->hotplug_slot->name); 134 134 goto disable_error; 135 135 } 136 136 dbg("%s - finished unconfiguring slot %s", 137 - __FUNCTION__, slot->hotplug_slot->name); 137 + __func__, slot->hotplug_slot->name); 138 138 139 139 /* Clear EXT (by setting it) */ 140 140 if (cpci_clear_ext(slot)) { 141 141 err("%s - could not clear EXT for slot %s", 142 - __FUNCTION__, slot->hotplug_slot->name); 142 + __func__, slot->hotplug_slot->name); 143 143 retval = -ENODEV; 144 144 goto disable_error; 145 145 } ··· 372 372 struct slot *slot; 373 373 struct pci_dev* dev; 374 374 375 - dbg("%s - enter", __FUNCTION__); 375 + dbg("%s - enter", __func__); 376 376 down_read(&list_rwsem); 377 377 if (!slots) { 378 378 up_read(&list_rwsem); ··· 380 380 } 381 381 list_for_each_entry(slot, &slot_list, slot_list) { 382 382 dbg("%s - looking at slot %s", 383 - __FUNCTION__, slot->hotplug_slot->name); 383 + __func__, slot->hotplug_slot->name); 384 384 if (clear_ins && cpci_check_and_clear_ins(slot)) 385 385 dbg("%s - cleared INS for slot %s", 386 - __FUNCTION__, slot->hotplug_slot->name); 386 + __func__, slot->hotplug_slot->name); 387 387 dev = pci_get_slot(slot->bus, PCI_DEVFN(slot->number, 0)); 388 388 if (dev) { 389 389 if (update_adapter_status(slot->hotplug_slot, 1)) ··· 394 394 } 395 395 } 396 396 up_read(&list_rwsem); 397 - dbg("%s - exit", __FUNCTION__); 397 + dbg("%s - exit", __func__); 398 398 return 0; 399 399 } 400 400 ··· 415 415 extracted = inserted = 0; 416 416 list_for_each_entry(slot, &slot_list, slot_list) { 417 417 dbg("%s - looking at slot %s", 418 - __FUNCTION__, slot->hotplug_slot->name); 418 + __func__, slot->hotplug_slot->name); 419 419 if (cpci_check_and_clear_ins(slot)) { 420 420 /* 421 421 * Some broken hardware (e.g. PLX 9054AB) asserts ··· 430 430 431 431 /* Process insertion */ 432 432 dbg("%s - slot %s inserted", 433 - __FUNCTION__, slot->hotplug_slot->name); 433 + __func__, slot->hotplug_slot->name); 434 434 435 435 /* GSM, debug */ 436 436 hs_csr = cpci_get_hs_csr(slot); 437 437 dbg("%s - slot %s HS_CSR (1) = %04x", 438 - __FUNCTION__, slot->hotplug_slot->name, hs_csr); 438 + __func__, slot->hotplug_slot->name, hs_csr); 439 439 440 440 /* Configure device */ 441 441 dbg("%s - configuring slot %s", 442 - __FUNCTION__, slot->hotplug_slot->name); 442 + __func__, slot->hotplug_slot->name); 443 443 if (cpci_configure_slot(slot)) { 444 444 err("%s - could not configure slot %s", 445 - __FUNCTION__, slot->hotplug_slot->name); 445 + __func__, slot->hotplug_slot->name); 446 446 continue; 447 447 } 448 448 dbg("%s - finished configuring slot %s", 449 - __FUNCTION__, slot->hotplug_slot->name); 449 + __func__, slot->hotplug_slot->name); 450 450 451 451 /* GSM, debug */ 452 452 hs_csr = cpci_get_hs_csr(slot); 453 453 dbg("%s - slot %s HS_CSR (2) = %04x", 454 - __FUNCTION__, slot->hotplug_slot->name, hs_csr); 454 + __func__, slot->hotplug_slot->name, hs_csr); 455 455 456 456 if (update_latch_status(slot->hotplug_slot, 1)) 457 457 warn("failure to update latch file"); ··· 464 464 /* GSM, debug */ 465 465 hs_csr = cpci_get_hs_csr(slot); 466 466 dbg("%s - slot %s HS_CSR (3) = %04x", 467 - __FUNCTION__, slot->hotplug_slot->name, hs_csr); 467 + __func__, slot->hotplug_slot->name, hs_csr); 468 468 469 469 inserted++; 470 470 } else if (cpci_check_ext(slot)) { 471 471 /* Process extraction request */ 472 472 dbg("%s - slot %s extracted", 473 - __FUNCTION__, slot->hotplug_slot->name); 473 + __func__, slot->hotplug_slot->name); 474 474 475 475 /* GSM, debug */ 476 476 hs_csr = cpci_get_hs_csr(slot); 477 477 dbg("%s - slot %s HS_CSR = %04x", 478 - __FUNCTION__, slot->hotplug_slot->name, hs_csr); 478 + __func__, slot->hotplug_slot->name, hs_csr); 479 479 480 480 if (!slot->extracting) { 481 481 if (update_latch_status(slot->hotplug_slot, 0)) { ··· 519 519 { 520 520 int rc; 521 521 522 - dbg("%s - event thread started", __FUNCTION__); 522 + dbg("%s - event thread started", __func__); 523 523 while (1) { 524 524 dbg("event thread sleeping"); 525 525 set_current_state(TASK_INTERRUPTIBLE); ··· 532 532 /* Give userspace a chance to handle extraction */ 533 533 msleep(500); 534 534 } else if (rc < 0) { 535 - dbg("%s - error checking slots", __FUNCTION__); 535 + dbg("%s - error checking slots", __func__); 536 536 thread_finished = 1; 537 537 goto out; 538 538 } ··· 541 541 break; 542 542 543 543 /* Re-enable ENUM# interrupt */ 544 - dbg("%s - re-enabling irq", __FUNCTION__); 544 + dbg("%s - re-enabling irq", __func__); 545 545 controller->ops->enable_irq(); 546 546 } 547 547 out: ··· 564 564 /* Give userspace a chance to handle extraction */ 565 565 msleep(500); 566 566 } else if (rc < 0) { 567 - dbg("%s - error checking slots", __FUNCTION__); 567 + dbg("%s - error checking slots", __func__); 568 568 thread_finished = 1; 569 569 goto out; 570 570 } ··· 621 621 status = -ENODEV; 622 622 } 623 623 dbg("%s - acquired controller irq %d", 624 - __FUNCTION__, new_controller->irq); 624 + __func__, new_controller->irq); 625 625 } 626 626 if (!status) 627 627 controller = new_controller; ··· 673 673 static int first = 1; 674 674 int status; 675 675 676 - dbg("%s - enter", __FUNCTION__); 676 + dbg("%s - enter", __func__); 677 677 if (!controller) 678 678 return -ENODEV; 679 679 ··· 693 693 status = cpci_start_thread(); 694 694 if (status) 695 695 return status; 696 - dbg("%s - thread started", __FUNCTION__); 696 + dbg("%s - thread started", __func__); 697 697 698 698 if (controller->irq) { 699 699 /* Start enum interrupt processing */ 700 - dbg("%s - enabling irq", __FUNCTION__); 700 + dbg("%s - enabling irq", __func__); 701 701 controller->ops->enable_irq(); 702 702 } 703 - dbg("%s - exit", __FUNCTION__); 703 + dbg("%s - exit", __func__); 704 704 return 0; 705 705 } 706 706 ··· 711 711 return -ENODEV; 712 712 if (controller->irq) { 713 713 /* Stop enum interrupt processing */ 714 - dbg("%s - disabling irq", __FUNCTION__); 714 + dbg("%s - disabling irq", __func__); 715 715 controller->ops->disable_irq(); 716 716 } 717 717 cpci_stop_thread();
+5 -5
drivers/pci/hotplug/cpci_hotplug_pci.c
··· 255 255 struct pci_bus *parent; 256 256 int fn; 257 257 258 - dbg("%s - enter", __FUNCTION__); 258 + dbg("%s - enter", __func__); 259 259 260 260 if (slot->dev == NULL) { 261 261 dbg("pci_dev null, finding %02x:%02x:%x", ··· 273 273 * we will only call this case when lookup fails. 274 274 */ 275 275 n = pci_scan_slot(slot->bus, slot->devfn); 276 - dbg("%s: pci_scan_slot returned %d", __FUNCTION__, n); 276 + dbg("%s: pci_scan_slot returned %d", __func__, n); 277 277 slot->dev = pci_get_slot(slot->bus, slot->devfn); 278 278 if (slot->dev == NULL) { 279 279 err("Could not find PCI device for slot %02x", slot->number); ··· 322 322 pci_bus_add_devices(parent); 323 323 pci_enable_bridges(parent); 324 324 325 - dbg("%s - exit", __FUNCTION__); 325 + dbg("%s - exit", __func__); 326 326 return 0; 327 327 } 328 328 ··· 331 331 int i; 332 332 struct pci_dev *dev; 333 333 334 - dbg("%s - enter", __FUNCTION__); 334 + dbg("%s - enter", __func__); 335 335 if (!slot->dev) { 336 336 err("No device for slot %02x\n", slot->number); 337 337 return -ENODEV; ··· 348 348 pci_dev_put(slot->dev); 349 349 slot->dev = NULL; 350 350 351 - dbg("%s - exit", __FUNCTION__); 351 + dbg("%s - exit", __func__); 352 352 return 0; 353 353 }
+3 -3
drivers/pci/hotplug/cpqphp.h
··· 674 674 675 675 hp_slot = slot->device - ctrl->slot_device_offset; 676 676 dbg("%s: slot->device = %d, ctrl->slot_device_offset = %d \n", 677 - __FUNCTION__, slot->device, ctrl->slot_device_offset); 677 + __func__, slot->device, ctrl->slot_device_offset); 678 678 679 679 status = (readl(ctrl->hpc_reg + INT_INPUT_CLEAR) & (0x01L << hp_slot)); 680 680 ··· 709 709 DECLARE_WAITQUEUE(wait, current); 710 710 int retval = 0; 711 711 712 - dbg("%s - start\n", __FUNCTION__); 712 + dbg("%s - start\n", __func__); 713 713 add_wait_queue(&ctrl->queue, &wait); 714 714 /* Sleep for up to 1 second to wait for the LED to change. */ 715 715 msleep_interruptible(1000); ··· 717 717 if (signal_pending(current)) 718 718 retval = -EINTR; 719 719 720 - dbg("%s - end\n", __FUNCTION__); 720 + dbg("%s - end\n", __func__); 721 721 return retval; 722 722 } 723 723
+19 -19
drivers/pci/hotplug/cpqphp_core.c
··· 315 315 { 316 316 struct slot *slot = hotplug_slot->private; 317 317 318 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 318 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 319 319 320 320 kfree(slot->hotplug_slot->info); 321 321 kfree(slot->hotplug_slot->name); ··· 338 338 void __iomem *slot_entry= NULL; 339 339 int result = -ENOMEM; 340 340 341 - dbg("%s\n", __FUNCTION__); 341 + dbg("%s\n", __func__); 342 342 343 343 tempdword = readl(ctrl->hpc_reg + INT_INPUT_CLEAR); 344 344 ··· 513 513 514 514 u8 tbus, tdevice, tslot, bridgeSlot; 515 515 516 - dbg("%s: %p, %d, %d, %p\n", __FUNCTION__, bus, bus_num, dev_num, slot); 516 + dbg("%s: %p, %d, %d, %p\n", __func__, bus, bus_num, dev_num, slot); 517 517 518 518 bridgeSlot = 0xFF; 519 519 ··· 636 636 u8 device; 637 637 u8 function; 638 638 639 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 639 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 640 640 641 641 if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1) 642 642 return -ENODEV; ··· 663 663 u8 device; 664 664 u8 function; 665 665 666 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 666 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 667 667 668 668 if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1) 669 669 return -ENODEV; ··· 695 695 u8 device; 696 696 u8 function; 697 697 698 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 698 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 699 699 700 700 if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1) 701 701 return -ENODEV; ··· 708 708 if (!slot_func) 709 709 return -ENODEV; 710 710 711 - dbg("In %s, slot_func = %p, ctrl = %p\n", __FUNCTION__, slot_func, ctrl); 711 + dbg("In %s, slot_func = %p, ctrl = %p\n", __func__, slot_func, ctrl); 712 712 return cpqhp_process_SS(ctrl, slot_func); 713 713 } 714 714 ··· 718 718 struct slot *slot = hotplug_slot->private; 719 719 struct controller *ctrl = slot->ctrl; 720 720 721 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 721 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 722 722 723 723 return cpqhp_hardware_test(ctrl, value); 724 724 } ··· 729 729 struct slot *slot = hotplug_slot->private; 730 730 struct controller *ctrl = slot->ctrl; 731 731 732 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 732 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 733 733 734 734 *value = get_slot_enabled(ctrl, slot); 735 735 return 0; ··· 740 740 struct slot *slot = hotplug_slot->private; 741 741 struct controller *ctrl = slot->ctrl; 742 742 743 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 743 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 744 744 745 745 *value = cpq_get_attention_status(ctrl, slot); 746 746 return 0; ··· 751 751 struct slot *slot = hotplug_slot->private; 752 752 struct controller *ctrl = slot->ctrl; 753 753 754 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 754 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 755 755 756 756 *value = cpq_get_latch_status(ctrl, slot); 757 757 ··· 763 763 struct slot *slot = hotplug_slot->private; 764 764 struct controller *ctrl = slot->ctrl; 765 765 766 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 766 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 767 767 768 768 *value = get_presence_status(ctrl, slot); 769 769 ··· 775 775 struct slot *slot = hotplug_slot->private; 776 776 struct controller *ctrl = slot->ctrl; 777 777 778 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 778 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 779 779 780 780 *value = ctrl->speed_capability; 781 781 ··· 787 787 struct slot *slot = hotplug_slot->private; 788 788 struct controller *ctrl = slot->ctrl; 789 789 790 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 790 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 791 791 792 792 *value = ctrl->speed; 793 793 ··· 841 841 // TODO: This code can be made to support non-Compaq or Intel subsystem IDs 842 842 rc = pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vid); 843 843 if (rc) { 844 - err("%s : pci_read_config_word failed\n", __FUNCTION__); 844 + err("%s : pci_read_config_word failed\n", __func__); 845 845 goto err_disable_device; 846 846 } 847 847 dbg("Subsystem Vendor ID: %x\n", subsystem_vid); ··· 853 853 854 854 ctrl = kzalloc(sizeof(struct controller), GFP_KERNEL); 855 855 if (!ctrl) { 856 - err("%s : out of memory\n", __FUNCTION__); 856 + err("%s : out of memory\n", __func__); 857 857 rc = -ENOMEM; 858 858 goto err_disable_device; 859 859 } 860 860 861 861 rc = pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &subsystem_deviceid); 862 862 if (rc) { 863 - err("%s : pci_read_config_word failed\n", __FUNCTION__); 863 + err("%s : pci_read_config_word failed\n", __func__); 864 864 goto err_free_ctrl; 865 865 } 866 866 ··· 1142 1142 rc = cpqhp_save_config(ctrl, ctrl->bus, readb(ctrl->hpc_reg + SLOT_MASK)); 1143 1143 if (rc) { 1144 1144 err("%s: unable to save PCI configuration data, error %d\n", 1145 - __FUNCTION__, rc); 1145 + __func__, rc); 1146 1146 goto err_iounmap; 1147 1147 } 1148 1148 ··· 1180 1180 if (rc) { 1181 1181 err(msg_initialization_err, 6); 1182 1182 err("%s: unable to save PCI configuration data, error %d\n", 1183 - __FUNCTION__, rc); 1183 + __func__, rc); 1184 1184 goto err_iounmap; 1185 1185 } 1186 1186
+32 -32
drivers/pci/hotplug/cpqphp_ctrl.c
··· 737 737 738 738 for (node = *head; node; node = node->next) { 739 739 dbg("%s: req_size =%x node=%p, base=%x, length=%x\n", 740 - __FUNCTION__, size, node, node->base, node->length); 740 + __func__, size, node, node->base, node->length); 741 741 if (node->length < size) 742 742 continue; 743 743 744 744 if (node->base & (size - 1)) { 745 - dbg("%s: not aligned\n", __FUNCTION__); 745 + dbg("%s: not aligned\n", __func__); 746 746 /* this one isn't base aligned properly 747 747 * so we'll make a new entry and split it up */ 748 748 temp_dword = (node->base | (size-1)) + 1; ··· 767 767 768 768 /* Don't need to check if too small since we already did */ 769 769 if (node->length > size) { 770 - dbg("%s: too big\n", __FUNCTION__); 770 + dbg("%s: too big\n", __func__); 771 771 /* this one is longer than we need 772 772 * so we'll make a new entry and split it up */ 773 773 split_node = kmalloc(sizeof(*split_node), GFP_KERNEL); ··· 784 784 node->next = split_node; 785 785 } /* End of too big on top end */ 786 786 787 - dbg("%s: got one!!!\n", __FUNCTION__); 787 + dbg("%s: got one!!!\n", __func__); 788 788 /* If we got here, then it is the right size 789 789 * Now take it out of the list */ 790 790 if (*head == node) { ··· 819 819 struct pci_resource *node2; 820 820 int out_of_order = 1; 821 821 822 - dbg("%s: head = %p, *head = %p\n", __FUNCTION__, head, *head); 822 + dbg("%s: head = %p, *head = %p\n", __func__, head, *head); 823 823 824 824 if (!(*head)) 825 825 return 1; ··· 907 907 /* Read to clear posted writes */ 908 908 misc = readw(ctrl->hpc_reg + MISC); 909 909 910 - dbg ("%s - waking up\n", __FUNCTION__); 910 + dbg ("%s - waking up\n", __func__); 911 911 wake_up_interruptible(&ctrl->queue); 912 912 } 913 913 ··· 1421 1421 1422 1422 hp_slot = func->device - ctrl->slot_device_offset; 1423 1423 dbg("%s: func->device, slot_offset, hp_slot = %d, %d ,%d\n", 1424 - __FUNCTION__, func->device, ctrl->slot_device_offset, hp_slot); 1424 + __func__, func->device, ctrl->slot_device_offset, hp_slot); 1425 1425 1426 1426 mutex_lock(&ctrl->crit_sect); 1427 1427 ··· 1466 1466 1467 1467 /* turn on board and blink green LED */ 1468 1468 1469 - dbg("%s: before down\n", __FUNCTION__); 1469 + dbg("%s: before down\n", __func__); 1470 1470 mutex_lock(&ctrl->crit_sect); 1471 - dbg("%s: after down\n", __FUNCTION__); 1471 + dbg("%s: after down\n", __func__); 1472 1472 1473 - dbg("%s: before slot_enable\n", __FUNCTION__); 1473 + dbg("%s: before slot_enable\n", __func__); 1474 1474 slot_enable (ctrl, hp_slot); 1475 1475 1476 - dbg("%s: before green_LED_blink\n", __FUNCTION__); 1476 + dbg("%s: before green_LED_blink\n", __func__); 1477 1477 green_LED_blink (ctrl, hp_slot); 1478 1478 1479 - dbg("%s: before amber_LED_blink\n", __FUNCTION__); 1479 + dbg("%s: before amber_LED_blink\n", __func__); 1480 1480 amber_LED_off (ctrl, hp_slot); 1481 1481 1482 - dbg("%s: before set_SOGO\n", __FUNCTION__); 1482 + dbg("%s: before set_SOGO\n", __func__); 1483 1483 set_SOGO(ctrl); 1484 1484 1485 1485 /* Wait for SOBS to be unset */ 1486 - dbg("%s: before wait_for_ctrl_irq\n", __FUNCTION__); 1486 + dbg("%s: before wait_for_ctrl_irq\n", __func__); 1487 1487 wait_for_ctrl_irq (ctrl); 1488 - dbg("%s: after wait_for_ctrl_irq\n", __FUNCTION__); 1488 + dbg("%s: after wait_for_ctrl_irq\n", __func__); 1489 1489 1490 - dbg("%s: before up\n", __FUNCTION__); 1490 + dbg("%s: before up\n", __func__); 1491 1491 mutex_unlock(&ctrl->crit_sect); 1492 - dbg("%s: after up\n", __FUNCTION__); 1492 + dbg("%s: after up\n", __func__); 1493 1493 1494 1494 /* Wait for ~1 second because of hot plug spec */ 1495 - dbg("%s: before long_delay\n", __FUNCTION__); 1495 + dbg("%s: before long_delay\n", __func__); 1496 1496 long_delay(1*HZ); 1497 - dbg("%s: after long_delay\n", __FUNCTION__); 1497 + dbg("%s: after long_delay\n", __func__); 1498 1498 1499 - dbg("%s: func status = %x\n", __FUNCTION__, func->status); 1499 + dbg("%s: func status = %x\n", __func__, func->status); 1500 1500 /* Check for a power fault */ 1501 1501 if (func->status == 0xFF) { 1502 1502 /* power fault occurred, but it was benign */ 1503 1503 temp_register = 0xFFFFFFFF; 1504 - dbg("%s: temp register set to %x by power fault\n", __FUNCTION__, temp_register); 1504 + dbg("%s: temp register set to %x by power fault\n", __func__, temp_register); 1505 1505 rc = POWER_FAILURE; 1506 1506 func->status = 0; 1507 1507 } else { 1508 1508 /* Get vendor/device ID u32 */ 1509 1509 ctrl->pci_bus->number = func->bus; 1510 1510 rc = pci_bus_read_config_dword (ctrl->pci_bus, PCI_DEVFN(func->device, func->function), PCI_VENDOR_ID, &temp_register); 1511 - dbg("%s: pci_read_config_dword returns %d\n", __FUNCTION__, rc); 1512 - dbg("%s: temp_register is %x\n", __FUNCTION__, temp_register); 1511 + dbg("%s: pci_read_config_dword returns %d\n", __func__, rc); 1512 + dbg("%s: temp_register is %x\n", __func__, temp_register); 1513 1513 1514 1514 if (rc != 0) { 1515 1515 /* Something's wrong here */ 1516 1516 temp_register = 0xFFFFFFFF; 1517 - dbg("%s: temp register set to %x by error\n", __FUNCTION__, temp_register); 1517 + dbg("%s: temp register set to %x by error\n", __func__, temp_register); 1518 1518 } 1519 1519 /* Preset return code. It will be changed later if things go okay. */ 1520 1520 rc = NO_ADAPTER_PRESENT; ··· 1530 1530 1531 1531 rc = configure_new_device(ctrl, func, 0, &res_lists); 1532 1532 1533 - dbg("%s: back from configure_new_device\n", __FUNCTION__); 1533 + dbg("%s: back from configure_new_device\n", __func__); 1534 1534 ctrl->io_head = res_lists.io_head; 1535 1535 ctrl->mem_head = res_lists.mem_head; 1536 1536 ctrl->p_mem_head = res_lists.p_mem_head; ··· 1566 1566 1567 1567 /* next, we will instantiate the linux pci_dev structures (with 1568 1568 * appropriate driver notification, if already present) */ 1569 - dbg("%s: configure linux pci_dev structure\n", __FUNCTION__); 1569 + dbg("%s: configure linux pci_dev structure\n", __func__); 1570 1570 index = 0; 1571 1571 do { 1572 1572 new_slot = cpqhp_slot_find(ctrl->bus, func->device, index++); ··· 1628 1628 device = func->device; 1629 1629 1630 1630 hp_slot = func->device - ctrl->slot_device_offset; 1631 - dbg("In %s, hp_slot = %d\n", __FUNCTION__, hp_slot); 1631 + dbg("In %s, hp_slot = %d\n", __func__, hp_slot); 1632 1632 1633 1633 /* When we get here, it is safe to change base address registers. 1634 1634 * We will attempt to save the base address register lengths */ ··· 1928 1928 func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0); 1929 1929 dbg("In power_down_board, func = %p, ctrl = %p\n", func, ctrl); 1930 1930 if (!func) { 1931 - dbg("Error! func NULL in %s\n", __FUNCTION__); 1931 + dbg("Error! func NULL in %s\n", __func__); 1932 1932 return ; 1933 1933 } 1934 1934 ··· 1950 1950 func = cpqhp_slot_find(p_slot->bus, p_slot->device, 0); 1951 1951 dbg("In add_board, func = %p, ctrl = %p\n", func, ctrl); 1952 1952 if (!func) { 1953 - dbg("Error! func NULL in %s\n", __FUNCTION__); 1953 + dbg("Error! func NULL in %s\n", __func__); 1954 1954 return ; 1955 1955 } 1956 1956 ··· 2058 2058 } 2059 2059 2060 2060 if (rc) { 2061 - dbg("%s: rc = %d\n", __FUNCTION__, rc); 2061 + dbg("%s: rc = %d\n", __func__, rc); 2062 2062 } 2063 2063 2064 2064 if (p_slot) ··· 2269 2269 2270 2270 new_slot = func; 2271 2271 2272 - dbg("%s\n", __FUNCTION__); 2272 + dbg("%s\n", __func__); 2273 2273 /* Check for Multi-function device */ 2274 2274 ctrl->pci_bus->number = func->bus; 2275 2275 rc = pci_bus_read_config_byte (ctrl->pci_bus, PCI_DEVFN(func->device, func->function), 0x0E, &temp_byte); 2276 2276 if (rc) { 2277 - dbg("%s: rc = %d\n", __FUNCTION__, rc); 2277 + dbg("%s: rc = %d\n", __func__, rc); 2278 2278 return rc; 2279 2279 } 2280 2280
+1 -1
drivers/pci/hotplug/cpqphp_nvram.c
··· 160 160 (temp6 == 'Q')) { 161 161 result = 1; 162 162 } 163 - dbg ("%s - returned %d\n", __FUNCTION__, result); 163 + dbg ("%s - returned %d\n", __func__, result); 164 164 return result; 165 165 } 166 166
+4 -4
drivers/pci/hotplug/cpqphp_pci.c
··· 120 120 { 121 121 int j; 122 122 123 - dbg("%s: bus/dev/func = %x/%x/%x\n", __FUNCTION__, func->bus, func->device, func->function); 123 + dbg("%s: bus/dev/func = %x/%x/%x\n", __func__, func->bus, func->device, func->function); 124 124 125 125 for (j=0; j<8 ; j++) { 126 126 struct pci_dev* temp = pci_find_slot(func->bus, PCI_DEVFN(func->device, j)); ··· 170 170 fakedev->bus = fakebus; 171 171 fakebus->number = bus_num; 172 172 dbg("%s: dev %d, bus %d, pin %d, num %d\n", 173 - __FUNCTION__, dev_num, bus_num, int_pin, irq_num); 173 + __func__, dev_num, bus_num, int_pin, irq_num); 174 174 rc = pcibios_set_irq_routing(fakedev, int_pin - 0x0a, irq_num); 175 175 kfree(fakedev); 176 176 kfree(fakebus); 177 - dbg("%s: rc %d\n", __FUNCTION__, rc); 177 + dbg("%s: rc %d\n", __func__, rc); 178 178 if (!rc) 179 179 return !rc; 180 180 ··· 1423 1423 int rc = 0; 1424 1424 struct pci_resource *node; 1425 1425 struct pci_resource *t_node; 1426 - dbg("%s\n", __FUNCTION__); 1426 + dbg("%s\n", __func__); 1427 1427 1428 1428 if (!func) 1429 1429 return 1;
+1 -1
drivers/pci/hotplug/fakephp.c
··· 320 320 return -ENODEV; 321 321 dslot = slot->private; 322 322 323 - dbg("%s - physical_slot = %s\n", __FUNCTION__, slot->name); 323 + dbg("%s - physical_slot = %s\n", __func__, slot->name); 324 324 325 325 /* don't disable bridged devices just yet, we can't handle them easily... */ 326 326 if (dslot->dev->subordinate) {
+12 -12
drivers/pci/hotplug/ibmphp_core.c
··· 399 399 struct slot *pslot; 400 400 u8 mode = 0; 401 401 402 - debug("%s - Entry hotplug_slot[%p] pvalue[%p]\n", __FUNCTION__, 402 + debug("%s - Entry hotplug_slot[%p] pvalue[%p]\n", __func__, 403 403 hotplug_slot, value); 404 404 405 405 ibmphp_lock_operations(); ··· 429 429 } 430 430 431 431 ibmphp_unlock_operations(); 432 - debug("%s - Exit rc[%d] value[%x]\n", __FUNCTION__, rc, *value); 432 + debug("%s - Exit rc[%d] value[%x]\n", __func__, rc, *value); 433 433 return rc; 434 434 } 435 435 ··· 439 439 struct slot *pslot; 440 440 u8 mode = 0; 441 441 442 - debug("%s - Entry hotplug_slot[%p] pvalue[%p]\n", __FUNCTION__, 442 + debug("%s - Entry hotplug_slot[%p] pvalue[%p]\n", __func__, 443 443 hotplug_slot, value); 444 444 445 445 ibmphp_lock_operations(); ··· 475 475 } 476 476 477 477 ibmphp_unlock_operations(); 478 - debug("%s - Exit rc[%d] value[%x]\n", __FUNCTION__, rc, *value); 478 + debug("%s - Exit rc[%d] value[%x]\n", __func__, rc, *value); 479 479 return rc; 480 480 } 481 481 ··· 745 745 struct list_head * tmp; 746 746 struct list_head * next; 747 747 748 - debug("%s -- enter\n", __FUNCTION__); 748 + debug("%s -- enter\n", __func__); 749 749 750 750 list_for_each_safe(tmp, next, &ibmphp_slot_head) { 751 751 slot_cur = list_entry(tmp, struct slot, ibm_slot_list); 752 752 pci_hp_deregister(slot_cur->hotplug_slot); 753 753 } 754 - debug("%s -- exit\n", __FUNCTION__); 754 + debug("%s -- exit\n", __func__); 755 755 } 756 756 757 757 static void ibm_unconfigure_device(struct pci_func *func) ··· 759 759 struct pci_dev *temp; 760 760 u8 j; 761 761 762 - debug("inside %s\n", __FUNCTION__); 762 + debug("inside %s\n", __func__); 763 763 debug("func->device = %x, func->function = %x\n", 764 764 func->device, func->function); 765 765 debug("func->device << 3 | 0x0 = %x\n", func->device << 3 | 0x0); ··· 790 790 791 791 bus = kmalloc(sizeof(*bus), GFP_KERNEL); 792 792 if (!bus) { 793 - err("%s - out of memory\n", __FUNCTION__); 793 + err("%s - out of memory\n", __func__); 794 794 return 1; 795 795 } 796 796 dev = kmalloc(sizeof(*dev), GFP_KERNEL); 797 797 if (!dev) { 798 798 kfree(bus); 799 - err("%s - out of memory\n", __FUNCTION__); 799 + err("%s - out of memory\n", __func__); 800 800 return 1; 801 801 } 802 802 ··· 807 807 if (!pci_read_config_word(dev, PCI_VENDOR_ID, &l) && 808 808 (l != 0x0000) && (l != 0xffff)) { 809 809 debug("%s - Inside bus_struture_fixup()\n", 810 - __FUNCTION__); 810 + __func__); 811 811 pci_scan_bus(busno, ibmphp_pci_bus->ops, NULL); 812 812 break; 813 813 } ··· 904 904 { }, 905 905 }; 906 906 907 - debug("%s - entry slot # %d\n", __FUNCTION__, slot_cur->number); 907 + debug("%s - entry slot # %d\n", __func__, slot_cur->number); 908 908 if (SET_BUS_STATUS(slot_cur->ctrl) && is_bus_empty(slot_cur)) { 909 909 rc = slot_update(&slot_cur); 910 910 if (rc) ··· 979 979 /* This is for x440, once Brandon fixes the firmware, 980 980 will not need this delay */ 981 981 msleep(1000); 982 - debug("%s -Exit\n", __FUNCTION__); 982 + debug("%s -Exit\n", __func__); 983 983 return 0; 984 984 } 985 985
+46 -46
drivers/pci/hotplug/ibmphp_ebda.c
··· 127 127 128 128 list_for_each (ptr1, &bus_info_head) { 129 129 ptr = list_entry (ptr1, struct bus_info, bus_info_list); 130 - debug ("%s - slot_min = %x\n", __FUNCTION__, ptr->slot_min); 131 - debug ("%s - slot_max = %x\n", __FUNCTION__, ptr->slot_max); 132 - debug ("%s - slot_count = %x\n", __FUNCTION__, ptr->slot_count); 133 - debug ("%s - bus# = %x\n", __FUNCTION__, ptr->busno); 134 - debug ("%s - current_speed = %x\n", __FUNCTION__, ptr->current_speed); 135 - debug ("%s - controller_id = %x\n", __FUNCTION__, ptr->controller_id); 130 + debug ("%s - slot_min = %x\n", __func__, ptr->slot_min); 131 + debug ("%s - slot_max = %x\n", __func__, ptr->slot_max); 132 + debug ("%s - slot_count = %x\n", __func__, ptr->slot_count); 133 + debug ("%s - bus# = %x\n", __func__, ptr->busno); 134 + debug ("%s - current_speed = %x\n", __func__, ptr->current_speed); 135 + debug ("%s - controller_id = %x\n", __func__, ptr->controller_id); 136 136 137 - debug ("%s - slots_at_33_conv = %x\n", __FUNCTION__, ptr->slots_at_33_conv); 138 - debug ("%s - slots_at_66_conv = %x\n", __FUNCTION__, ptr->slots_at_66_conv); 139 - debug ("%s - slots_at_66_pcix = %x\n", __FUNCTION__, ptr->slots_at_66_pcix); 140 - debug ("%s - slots_at_100_pcix = %x\n", __FUNCTION__, ptr->slots_at_100_pcix); 141 - debug ("%s - slots_at_133_pcix = %x\n", __FUNCTION__, ptr->slots_at_133_pcix); 137 + debug ("%s - slots_at_33_conv = %x\n", __func__, ptr->slots_at_33_conv); 138 + debug ("%s - slots_at_66_conv = %x\n", __func__, ptr->slots_at_66_conv); 139 + debug ("%s - slots_at_66_pcix = %x\n", __func__, ptr->slots_at_66_pcix); 140 + debug ("%s - slots_at_100_pcix = %x\n", __func__, ptr->slots_at_100_pcix); 141 + debug ("%s - slots_at_133_pcix = %x\n", __func__, ptr->slots_at_133_pcix); 142 142 143 143 } 144 144 } ··· 150 150 debug ("print_lo_info ----\n"); 151 151 list_for_each (ptr1, &rio_lo_head) { 152 152 ptr = list_entry (ptr1, struct rio_detail, rio_detail_list); 153 - debug ("%s - rio_node_id = %x\n", __FUNCTION__, ptr->rio_node_id); 154 - debug ("%s - rio_type = %x\n", __FUNCTION__, ptr->rio_type); 155 - debug ("%s - owner_id = %x\n", __FUNCTION__, ptr->owner_id); 156 - debug ("%s - first_slot_num = %x\n", __FUNCTION__, ptr->first_slot_num); 157 - debug ("%s - wpindex = %x\n", __FUNCTION__, ptr->wpindex); 158 - debug ("%s - chassis_num = %x\n", __FUNCTION__, ptr->chassis_num); 153 + debug ("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id); 154 + debug ("%s - rio_type = %x\n", __func__, ptr->rio_type); 155 + debug ("%s - owner_id = %x\n", __func__, ptr->owner_id); 156 + debug ("%s - first_slot_num = %x\n", __func__, ptr->first_slot_num); 157 + debug ("%s - wpindex = %x\n", __func__, ptr->wpindex); 158 + debug ("%s - chassis_num = %x\n", __func__, ptr->chassis_num); 159 159 160 160 } 161 161 } ··· 164 164 { 165 165 struct rio_detail *ptr; 166 166 struct list_head *ptr1; 167 - debug ("%s ---\n", __FUNCTION__); 167 + debug ("%s ---\n", __func__); 168 168 list_for_each (ptr1, &rio_vg_head) { 169 169 ptr = list_entry (ptr1, struct rio_detail, rio_detail_list); 170 - debug ("%s - rio_node_id = %x\n", __FUNCTION__, ptr->rio_node_id); 171 - debug ("%s - rio_type = %x\n", __FUNCTION__, ptr->rio_type); 172 - debug ("%s - owner_id = %x\n", __FUNCTION__, ptr->owner_id); 173 - debug ("%s - first_slot_num = %x\n", __FUNCTION__, ptr->first_slot_num); 174 - debug ("%s - wpindex = %x\n", __FUNCTION__, ptr->wpindex); 175 - debug ("%s - chassis_num = %x\n", __FUNCTION__, ptr->chassis_num); 170 + debug ("%s - rio_node_id = %x\n", __func__, ptr->rio_node_id); 171 + debug ("%s - rio_type = %x\n", __func__, ptr->rio_type); 172 + debug ("%s - owner_id = %x\n", __func__, ptr->owner_id); 173 + debug ("%s - first_slot_num = %x\n", __func__, ptr->first_slot_num); 174 + debug ("%s - wpindex = %x\n", __func__, ptr->wpindex); 175 + debug ("%s - chassis_num = %x\n", __func__, ptr->chassis_num); 176 176 177 177 } 178 178 } ··· 185 185 list_for_each (ptr1, &ibmphp_ebda_pci_rsrc_head) { 186 186 ptr = list_entry (ptr1, struct ebda_pci_rsrc, ebda_pci_rsrc_list); 187 187 debug ("%s - rsrc type: %x bus#: %x dev_func: %x start addr: %x end addr: %x\n", 188 - __FUNCTION__, ptr->rsrc_type ,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr); 188 + __func__, ptr->rsrc_type ,ptr->bus_num, ptr->dev_fun,ptr->start_addr, ptr->end_addr); 189 189 } 190 190 } 191 191 ··· 196 196 197 197 list_for_each (ptr1, &ibmphp_slot_head) { 198 198 ptr = list_entry (ptr1, struct slot, ibm_slot_list); 199 - debug ("%s - slot_number: %x\n", __FUNCTION__, ptr->number); 199 + debug ("%s - slot_number: %x\n", __func__, ptr->number); 200 200 } 201 201 } 202 202 ··· 204 204 { 205 205 struct opt_rio *ptr; 206 206 struct list_head *ptr1; 207 - debug ("%s ---\n", __FUNCTION__); 207 + debug ("%s ---\n", __func__); 208 208 list_for_each (ptr1, &opt_vg_head) { 209 209 ptr = list_entry (ptr1, struct opt_rio, opt_rio_list); 210 - debug ("%s - rio_type %x\n", __FUNCTION__, ptr->rio_type); 211 - debug ("%s - chassis_num: %x\n", __FUNCTION__, ptr->chassis_num); 212 - debug ("%s - first_slot_num: %x\n", __FUNCTION__, ptr->first_slot_num); 213 - debug ("%s - middle_num: %x\n", __FUNCTION__, ptr->middle_num); 210 + debug ("%s - rio_type %x\n", __func__, ptr->rio_type); 211 + debug ("%s - chassis_num: %x\n", __func__, ptr->chassis_num); 212 + debug ("%s - first_slot_num: %x\n", __func__, ptr->first_slot_num); 213 + debug ("%s - middle_num: %x\n", __func__, ptr->middle_num); 214 214 } 215 215 } 216 216 ··· 225 225 hpc_ptr = list_entry (ptr1, struct controller, ebda_hpc_list); 226 226 227 227 for (index = 0; index < hpc_ptr->slot_count; index++) { 228 - debug ("%s - physical slot#: %x\n", __FUNCTION__, hpc_ptr->slots[index].slot_num); 229 - debug ("%s - pci bus# of the slot: %x\n", __FUNCTION__, hpc_ptr->slots[index].slot_bus_num); 230 - debug ("%s - index into ctlr addr: %x\n", __FUNCTION__, hpc_ptr->slots[index].ctl_index); 231 - debug ("%s - cap of the slot: %x\n", __FUNCTION__, hpc_ptr->slots[index].slot_cap); 228 + debug ("%s - physical slot#: %x\n", __func__, hpc_ptr->slots[index].slot_num); 229 + debug ("%s - pci bus# of the slot: %x\n", __func__, hpc_ptr->slots[index].slot_bus_num); 230 + debug ("%s - index into ctlr addr: %x\n", __func__, hpc_ptr->slots[index].ctl_index); 231 + debug ("%s - cap of the slot: %x\n", __func__, hpc_ptr->slots[index].slot_cap); 232 232 } 233 233 234 234 for (index = 0; index < hpc_ptr->bus_count; index++) { 235 - debug ("%s - bus# of each bus controlled by this ctlr: %x\n", __FUNCTION__, hpc_ptr->buses[index].bus_num); 235 + debug ("%s - bus# of each bus controlled by this ctlr: %x\n", __func__, hpc_ptr->buses[index].bus_num); 236 236 } 237 237 238 - debug ("%s - type of hpc: %x\n", __FUNCTION__, hpc_ptr->ctlr_type); 238 + debug ("%s - type of hpc: %x\n", __func__, hpc_ptr->ctlr_type); 239 239 switch (hpc_ptr->ctlr_type) { 240 240 case 1: 241 - debug ("%s - bus: %x\n", __FUNCTION__, hpc_ptr->u.pci_ctlr.bus); 242 - debug ("%s - dev_fun: %x\n", __FUNCTION__, hpc_ptr->u.pci_ctlr.dev_fun); 243 - debug ("%s - irq: %x\n", __FUNCTION__, hpc_ptr->irq); 241 + debug ("%s - bus: %x\n", __func__, hpc_ptr->u.pci_ctlr.bus); 242 + debug ("%s - dev_fun: %x\n", __func__, hpc_ptr->u.pci_ctlr.dev_fun); 243 + debug ("%s - irq: %x\n", __func__, hpc_ptr->irq); 244 244 break; 245 245 246 246 case 0: 247 - debug ("%s - io_start: %x\n", __FUNCTION__, hpc_ptr->u.isa_ctlr.io_start); 248 - debug ("%s - io_end: %x\n", __FUNCTION__, hpc_ptr->u.isa_ctlr.io_end); 249 - debug ("%s - irq: %x\n", __FUNCTION__, hpc_ptr->irq); 247 + debug ("%s - io_start: %x\n", __func__, hpc_ptr->u.isa_ctlr.io_start); 248 + debug ("%s - io_end: %x\n", __func__, hpc_ptr->u.isa_ctlr.io_end); 249 + debug ("%s - irq: %x\n", __func__, hpc_ptr->irq); 250 250 break; 251 251 252 252 case 2: 253 253 case 4: 254 - debug ("%s - wpegbbar: %lx\n", __FUNCTION__, hpc_ptr->u.wpeg_ctlr.wpegbbar); 255 - debug ("%s - i2c_addr: %x\n", __FUNCTION__, hpc_ptr->u.wpeg_ctlr.i2c_addr); 256 - debug ("%s - irq: %x\n", __FUNCTION__, hpc_ptr->irq); 254 + debug ("%s - wpegbbar: %lx\n", __func__, hpc_ptr->u.wpeg_ctlr.wpegbbar); 255 + debug ("%s - i2c_addr: %x\n", __func__, hpc_ptr->u.wpeg_ctlr.i2c_addr); 256 + debug ("%s - irq: %x\n", __func__, hpc_ptr->irq); 257 257 break; 258 258 } 259 259 }
+34 -34
drivers/pci/hotplug/ibmphp_hpc.c
··· 129 129 *---------------------------------------------------------------------*/ 130 130 void __init ibmphp_hpc_initvars (void) 131 131 { 132 - debug ("%s - Entry\n", __FUNCTION__); 132 + debug ("%s - Entry\n", __func__); 133 133 134 134 mutex_init(&sem_hpcaccess); 135 135 init_MUTEX (&semOperations); 136 136 init_MUTEX_LOCKED (&sem_exit); 137 137 to_debug = 0; 138 138 139 - debug ("%s - Exit\n", __FUNCTION__); 139 + debug ("%s - Exit\n", __func__); 140 140 } 141 141 142 142 /*---------------------------------------------------------------------- ··· 154 154 unsigned long ultemp; 155 155 unsigned long data; // actual data HILO format 156 156 157 - debug_polling ("%s - Entry WPGBbar[%p] index[%x] \n", __FUNCTION__, WPGBbar, index); 157 + debug_polling ("%s - Entry WPGBbar[%p] index[%x] \n", __func__, WPGBbar, index); 158 158 159 159 //-------------------------------------------------------------------- 160 160 // READ - step 1 ··· 213 213 i--; 214 214 } 215 215 if (i == 0) { 216 - debug ("%s - Error : WPG timeout\n", __FUNCTION__); 216 + debug ("%s - Error : WPG timeout\n", __func__); 217 217 return HPC_ERROR; 218 218 } 219 219 //-------------------------------------------------------------------- ··· 241 241 242 242 status = (u8) data; 243 243 244 - debug_polling ("%s - Exit index[%x] status[%x]\n", __FUNCTION__, index, status); 244 + debug_polling ("%s - Exit index[%x] status[%x]\n", __func__, index, status); 245 245 246 246 return (status); 247 247 } ··· 262 262 unsigned long data; // actual data HILO format 263 263 int i; 264 264 265 - debug_polling ("%s - Entry WPGBbar[%p] index[%x] cmd[%x]\n", __FUNCTION__, WPGBbar, index, cmd); 265 + debug_polling ("%s - Entry WPGBbar[%p] index[%x] cmd[%x]\n", __func__, WPGBbar, index, cmd); 266 266 267 267 rc = 0; 268 268 //-------------------------------------------------------------------- ··· 324 324 i--; 325 325 } 326 326 if (i == 0) { 327 - debug ("%s - Exit Error:WPG timeout\n", __FUNCTION__); 327 + debug ("%s - Exit Error:WPG timeout\n", __func__); 328 328 rc = HPC_ERROR; 329 329 } 330 330 ··· 345 345 rc = HPC_ERROR; 346 346 } 347 347 348 - debug_polling ("%s Exit rc[%x]\n", __FUNCTION__, rc); 348 + debug_polling ("%s Exit rc[%x]\n", __func__, rc); 349 349 return (rc); 350 350 } 351 351 ··· 541 541 int rc = 0; 542 542 int busindex; 543 543 544 - debug_polling ("%s - Entry pslot[%p] cmd[%x] pstatus[%p]\n", __FUNCTION__, pslot, cmd, pstatus); 544 + debug_polling ("%s - Entry pslot[%p] cmd[%x] pstatus[%p]\n", __func__, pslot, cmd, pstatus); 545 545 546 546 if ((pslot == NULL) 547 547 || ((pstatus == NULL) && (cmd != READ_ALLSTAT) && (cmd != READ_BUSSTATUS))) { 548 548 rc = -EINVAL; 549 - err ("%s - Error invalid pointer, rc[%d]\n", __FUNCTION__, rc); 549 + err ("%s - Error invalid pointer, rc[%d]\n", __func__, rc); 550 550 return rc; 551 551 } 552 552 ··· 554 554 busindex = ibmphp_get_bus_index (pslot->bus); 555 555 if (busindex < 0) { 556 556 rc = -EINVAL; 557 - err ("%s - Exit Error:invalid bus, rc[%d]\n", __FUNCTION__, rc); 557 + err ("%s - Exit Error:invalid bus, rc[%d]\n", __func__, rc); 558 558 return rc; 559 559 } else 560 560 index = (u8) busindex; ··· 565 565 566 566 if (index == HPC_ERROR) { 567 567 rc = -EINVAL; 568 - err ("%s - Exit Error:invalid index, rc[%d]\n", __FUNCTION__, rc); 568 + err ("%s - Exit Error:invalid index, rc[%d]\n", __func__, rc); 569 569 return rc; 570 570 } 571 571 ··· 641 641 ctrl_read (ctlr_ptr, wpg_bbar, 642 642 index + WPG_1ST_EXTSLOT_INDEX); 643 643 } else { 644 - err ("%s - Error ctrl_read failed\n", __FUNCTION__); 644 + err ("%s - Error ctrl_read failed\n", __func__); 645 645 rc = -EINVAL; 646 646 break; 647 647 } ··· 662 662 663 663 free_hpc_access (); 664 664 665 - debug_polling ("%s - Exit rc[%d]\n", __FUNCTION__, rc); 665 + debug_polling ("%s - Exit rc[%d]\n", __func__, rc); 666 666 return rc; 667 667 } 668 668 ··· 681 681 int rc = 0; 682 682 int timeout; 683 683 684 - debug_polling ("%s - Entry pslot[%p] cmd[%x]\n", __FUNCTION__, pslot, cmd); 684 + debug_polling ("%s - Entry pslot[%p] cmd[%x]\n", __func__, pslot, cmd); 685 685 if (pslot == NULL) { 686 686 rc = -EINVAL; 687 - err ("%s - Error Exit rc[%d]\n", __FUNCTION__, rc); 687 + err ("%s - Error Exit rc[%d]\n", __func__, rc); 688 688 return rc; 689 689 } 690 690 ··· 694 694 busindex = ibmphp_get_bus_index (pslot->bus); 695 695 if (busindex < 0) { 696 696 rc = -EINVAL; 697 - err ("%s - Exit Error:invalid bus, rc[%d]\n", __FUNCTION__, rc); 697 + err ("%s - Exit Error:invalid bus, rc[%d]\n", __func__, rc); 698 698 return rc; 699 699 } else 700 700 index = (u8) busindex; ··· 705 705 706 706 if (index == HPC_ERROR) { 707 707 rc = -EINVAL; 708 - err ("%s - Error Exit rc[%d]\n", __FUNCTION__, rc); 708 + err ("%s - Error Exit rc[%d]\n", __func__, rc); 709 709 return rc; 710 710 } 711 711 ··· 719 719 if ((ctlr_ptr->ctlr_type == 2) || (ctlr_ptr->ctlr_type == 4)) { 720 720 wpg_bbar = ioremap (ctlr_ptr->u.wpeg_ctlr.wpegbbar, WPG_I2C_IOREMAP_SIZE); 721 721 722 - debug ("%s - ctlr id[%x] physical[%lx] logical[%lx] i2c[%x]\n", __FUNCTION__, 722 + debug ("%s - ctlr id[%x] physical[%lx] logical[%lx] i2c[%x]\n", __func__, 723 723 ctlr_ptr->ctlr_id, (ulong) (ctlr_ptr->u.wpeg_ctlr.wpegbbar), (ulong) wpg_bbar, 724 724 ctlr_ptr->u.wpeg_ctlr.i2c_addr); 725 725 } ··· 750 750 msleep(1000); 751 751 if (timeout < 1) { 752 752 done = 1; 753 - err ("%s - Error command complete timeout\n", __FUNCTION__); 753 + err ("%s - Error command complete timeout\n", __func__); 754 754 rc = -EFAULT; 755 755 } else 756 756 timeout--; ··· 765 765 iounmap (wpg_bbar); 766 766 free_hpc_access (); 767 767 768 - debug_polling ("%s - Exit rc[%d]\n", __FUNCTION__, rc); 768 + debug_polling ("%s - Exit rc[%d]\n", __func__, rc); 769 769 return rc; 770 770 } 771 771 ··· 803 803 *---------------------------------------------------------------------*/ 804 804 void ibmphp_unlock_operations (void) 805 805 { 806 - debug ("%s - Entry\n", __FUNCTION__); 806 + debug ("%s - Entry\n", __func__); 807 807 up (&semOperations); 808 808 to_debug = 0; 809 - debug ("%s - Exit\n", __FUNCTION__); 809 + debug ("%s - Exit\n", __func__); 810 810 } 811 811 812 812 /*---------------------------------------------------------------------- ··· 827 827 int poll_count = 0; 828 828 u8 ctrl_count = 0x00; 829 829 830 - debug ("%s - Entry\n", __FUNCTION__); 830 + debug ("%s - Entry\n", __func__); 831 831 832 832 while (!kthread_should_stop()) { 833 833 /* try to get the lock to do some kind of hardware access */ ··· 907 907 msleep(100); 908 908 } 909 909 up (&sem_exit); 910 - debug ("%s - Exit\n", __FUNCTION__); 910 + debug ("%s - Exit\n", __func__); 911 911 return 0; 912 912 } 913 913 ··· 999 999 ibmphp_update_slot_info (pslot); 1000 1000 } 1001 1001 1002 - debug ("%s - Exit rc[%d] disable[%x] update[%x]\n", __FUNCTION__, rc, disable, update); 1002 + debug ("%s - Exit rc[%d] disable[%x] update[%x]\n", __func__, rc, disable, update); 1003 1003 1004 1004 return rc; 1005 1005 } ··· 1021 1021 u8 mask; 1022 1022 int rc = 0; 1023 1023 1024 - debug ("%s - Entry old[%x], new[%x]\n", __FUNCTION__, old, new); 1024 + debug ("%s - Entry old[%x], new[%x]\n", __func__, old, new); 1025 1025 // bit 0 reserved, 0 is LSB, check bit 1-6 for 6 slots 1026 1026 1027 1027 for (i = ctrl->starting_slot_num; i <= ctrl->ending_slot_num; i++) { ··· 1031 1031 if (pslot) { 1032 1032 memcpy ((void *) &myslot, (void *) pslot, sizeof (struct slot)); 1033 1033 rc = ibmphp_hpc_readslot (pslot, READ_ALLSTAT, NULL); 1034 - debug ("%s - call process_changeinstatus for slot[%d]\n", __FUNCTION__, i); 1034 + debug ("%s - call process_changeinstatus for slot[%d]\n", __func__, i); 1035 1035 process_changeinstatus (pslot, &myslot); 1036 1036 } else { 1037 1037 rc = -EINVAL; 1038 - err ("%s - Error bad pointer for slot[%d]\n", __FUNCTION__, i); 1038 + err ("%s - Error bad pointer for slot[%d]\n", __func__, i); 1039 1039 } 1040 1040 } 1041 1041 } 1042 - debug ("%s - Exit rc[%d]\n", __FUNCTION__, rc); 1042 + debug ("%s - Exit rc[%d]\n", __func__, rc); 1043 1043 return rc; 1044 1044 } 1045 1045 ··· 1050 1050 *---------------------------------------------------------------------*/ 1051 1051 int __init ibmphp_hpc_start_poll_thread (void) 1052 1052 { 1053 - debug ("%s - Entry\n", __FUNCTION__); 1053 + debug ("%s - Entry\n", __func__); 1054 1054 1055 1055 ibmphp_poll_thread = kthread_run(poll_hpc, NULL, "hpc_poll"); 1056 1056 if (IS_ERR(ibmphp_poll_thread)) { 1057 - err ("%s - Error, thread not started\n", __FUNCTION__); 1057 + err ("%s - Error, thread not started\n", __func__); 1058 1058 return PTR_ERR(ibmphp_poll_thread); 1059 1059 } 1060 1060 return 0; ··· 1067 1067 *---------------------------------------------------------------------*/ 1068 1068 void __exit ibmphp_hpc_stop_poll_thread (void) 1069 1069 { 1070 - debug ("%s - Entry\n", __FUNCTION__); 1070 + debug ("%s - Entry\n", __func__); 1071 1071 1072 1072 kthread_stop(ibmphp_poll_thread); 1073 1073 debug ("before locking operations \n"); ··· 1088 1088 up (&sem_exit); 1089 1089 debug ("after sem exit up\n"); 1090 1090 1091 - debug ("%s - Exit\n", __FUNCTION__); 1091 + debug ("%s - Exit\n", __func__); 1092 1092 } 1093 1093 1094 1094 /*----------------------------------------------------------------------
+9 -9
drivers/pci/hotplug/ibmphp_pci.c
··· 364 364 struct resource_node *pfmem[6]; 365 365 unsigned int devfn; 366 366 367 - debug ("%s - inside\n", __FUNCTION__); 367 + debug ("%s - inside\n", __func__); 368 368 369 369 devfn = PCI_DEVFN(func->device, func->function); 370 370 ibmphp_pci_bus->number = func->busno; ··· 595 595 u8 irq; 596 596 int retval; 597 597 598 - debug ("%s - enter\n", __FUNCTION__); 598 + debug ("%s - enter\n", __func__); 599 599 600 600 devfn = PCI_DEVFN(func->function, func->device); 601 601 ibmphp_pci_bus->number = func->busno; ··· 1234 1234 u32 tmp_address; 1235 1235 unsigned int devfn; 1236 1236 1237 - debug ("%s - enter\n", __FUNCTION__); 1237 + debug ("%s - enter\n", __func__); 1238 1238 1239 1239 bus = ibmphp_find_res_bus (busno); 1240 1240 if (!bus) { ··· 1351 1351 bus_no = (int) busno; 1352 1352 debug ("busno is %x\n", busno); 1353 1353 pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_PRIMARY_BUS, &pri_number); 1354 - debug ("%s - busno = %x, primary_number = %x\n", __FUNCTION__, busno, pri_number); 1354 + debug ("%s - busno = %x, primary_number = %x\n", __func__, busno, pri_number); 1355 1355 1356 1356 pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number); 1357 1357 debug ("sec_number is %x\n", sec_number); ··· 1437 1437 } 1438 1438 } /* end of mem */ 1439 1439 } /* end of for */ 1440 - debug ("%s - exiting, returning success\n", __FUNCTION__); 1440 + debug ("%s - exiting, returning success\n", __func__); 1441 1441 return 0; 1442 1442 } 1443 1443 ··· 1453 1453 unsigned int devfn; 1454 1454 u8 valid_device = 0x00; /* To see if we are ever able to find valid device and read it */ 1455 1455 1456 - debug ("%s - enter\n", __FUNCTION__); 1456 + debug ("%s - enter\n", __func__); 1457 1457 1458 1458 device = slot_cur->device; 1459 1459 busno = slot_cur->bus; ··· 1470 1470 /* found correct device!!! */ 1471 1471 ++valid_device; 1472 1472 1473 - debug ("%s - found correct device\n", __FUNCTION__); 1473 + debug ("%s - found correct device\n", __func__); 1474 1474 1475 1475 /* header: x x x x x x x x 1476 1476 * | |___________|=> 1=PPB bridge, 0=normal device, 2=CardBus Bridge ··· 1573 1573 struct pci_func *cur_func = NULL; 1574 1574 struct pci_func *temp_func; 1575 1575 1576 - debug ("%s - enter\n", __FUNCTION__); 1576 + debug ("%s - enter\n", __func__); 1577 1577 1578 1578 if (!the_end) { 1579 1579 /* Need to unconfigure the card */ ··· 1624 1624 1625 1625 sl->func = NULL; 1626 1626 *slot_cur = sl; 1627 - debug ("%s - exit\n", __FUNCTION__); 1627 + debug ("%s - exit\n", __func__); 1628 1628 return 0; 1629 1629 } 1630 1630
+6 -6
drivers/pci/hotplug/ibmphp_res.c
··· 563 563 struct range_node *range; 564 564 struct resource_node *res; 565 565 566 - debug ("%s - bus_cur->busno = %d\n", __FUNCTION__, bus_cur->busno); 566 + debug ("%s - bus_cur->busno = %d\n", __func__, bus_cur->busno); 567 567 568 568 if (bus_cur->needIOUpdate) { 569 569 res = bus_cur->firstIO; ··· 599 599 struct range_node *range_cur = NULL; 600 600 struct resource_node *res_start = NULL; 601 601 602 - debug ("%s - enter\n", __FUNCTION__); 602 + debug ("%s - enter\n", __func__); 603 603 604 604 if (!res) { 605 605 err ("NULL passed to add\n"); ··· 762 762 } 763 763 } 764 764 765 - debug ("%s - exit\n", __FUNCTION__); 765 + debug ("%s - exit\n", __func__); 766 766 return 0; 767 767 } 768 768 ··· 1001 1001 return -EINVAL; 1002 1002 } 1003 1003 1004 - debug ("%s - enter\n", __FUNCTION__); 1004 + debug ("%s - enter\n", __func__); 1005 1005 debug ("bus_cur->busno is %d\n", bus_cur->busno); 1006 1006 1007 1007 /* This is a quick fix to not mess up with the code very much. i.e., ··· 1029 1029 1030 1030 while (res_cur) { 1031 1031 range = find_range (bus_cur, res_cur); 1032 - debug ("%s - rangeno = %d\n", __FUNCTION__, res_cur->rangeno); 1032 + debug ("%s - rangeno = %d\n", __func__, res_cur->rangeno); 1033 1033 1034 1034 if (!range) { 1035 1035 err ("no range for the device exists... bailing out...\n"); ··· 1942 1942 return -ENODEV; 1943 1943 ibmphp_pci_bus->number = bus_cur->busno; 1944 1944 1945 - debug ("inside %s\n", __FUNCTION__); 1945 + debug ("inside %s\n", __func__); 1946 1946 debug ("bus_cur->busno = %x\n", bus_cur->busno); 1947 1947 1948 1948 for (device = 0; device < 32; device++) {
+1 -1
drivers/pci/hotplug/pci_hotplug_core.c
··· 43 43 44 44 #define MY_NAME "pci_hotplug" 45 45 46 - #define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __FUNCTION__ , ## arg); } while (0) 46 + #define dbg(fmt, arg...) do { if (debug) printk(KERN_DEBUG "%s: %s: " fmt , MY_NAME , __func__ , ## arg); } while (0) 47 47 #define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg) 48 48 #define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg) 49 49 #define warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg)
+1 -1
drivers/pci/hotplug/pciehp.h
··· 168 168 return slot; 169 169 } 170 170 171 - err("%s: slot (device=0x%x) not found\n", __FUNCTION__, device); 171 + err("%s: slot (device=0x%x) not found\n", __func__, device); 172 172 return NULL; 173 173 } 174 174
+16 -16
drivers/pci/hotplug/pciehp_core.c
··· 184 184 { 185 185 struct slot *slot = hotplug_slot->private; 186 186 187 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 187 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 188 188 189 189 kfree(slot->hotplug_slot->info); 190 190 kfree(slot->hotplug_slot); ··· 301 301 { 302 302 struct slot *slot = hotplug_slot->private; 303 303 304 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 304 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 305 305 306 306 hotplug_slot->info->attention_status = status; 307 307 ··· 316 316 { 317 317 struct slot *slot = hotplug_slot->private; 318 318 319 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 319 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 320 320 321 321 return pciehp_sysfs_enable_slot(slot); 322 322 } ··· 326 326 { 327 327 struct slot *slot = hotplug_slot->private; 328 328 329 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 329 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 330 330 331 331 return pciehp_sysfs_disable_slot(slot); 332 332 } ··· 336 336 struct slot *slot = hotplug_slot->private; 337 337 int retval; 338 338 339 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 339 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 340 340 341 341 retval = slot->hpc_ops->get_power_status(slot, value); 342 342 if (retval < 0) ··· 350 350 struct slot *slot = hotplug_slot->private; 351 351 int retval; 352 352 353 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 353 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 354 354 355 355 retval = slot->hpc_ops->get_attention_status(slot, value); 356 356 if (retval < 0) ··· 364 364 struct slot *slot = hotplug_slot->private; 365 365 int retval; 366 366 367 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 367 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 368 368 369 369 retval = slot->hpc_ops->get_latch_status(slot, value); 370 370 if (retval < 0) ··· 378 378 struct slot *slot = hotplug_slot->private; 379 379 int retval; 380 380 381 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 381 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 382 382 383 383 retval = slot->hpc_ops->get_adapter_status(slot, value); 384 384 if (retval < 0) ··· 392 392 struct slot *slot = hotplug_slot->private; 393 393 struct pci_bus *bus = slot->ctrl->pci_dev->subordinate; 394 394 395 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 395 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 396 396 397 397 *value = (pci_domain_nr(bus) << 16) | (slot->bus << 8) | slot->device; 398 398 ··· 404 404 struct slot *slot = hotplug_slot->private; 405 405 int retval; 406 406 407 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 407 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 408 408 409 409 retval = slot->hpc_ops->get_max_bus_speed(slot, value); 410 410 if (retval < 0) ··· 418 418 struct slot *slot = hotplug_slot->private; 419 419 int retval; 420 420 421 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 421 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 422 422 423 423 retval = slot->hpc_ops->get_cur_bus_speed(slot, value); 424 424 if (retval < 0) ··· 437 437 438 438 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL); 439 439 if (!ctrl) { 440 - err("%s : out of memory\n", __FUNCTION__); 440 + err("%s : out of memory\n", __func__); 441 441 goto err_out_none; 442 442 } 443 443 INIT_LIST_HEAD(&ctrl->slot_list); ··· 454 454 pci_set_drvdata(pdev, ctrl); 455 455 456 456 dbg("%s: ctrl bus=0x%x, device=%x, function=%x, irq=%x\n", 457 - __FUNCTION__, pdev->bus->number, PCI_SLOT(pdev->devfn), 457 + __func__, pdev->bus->number, PCI_SLOT(pdev->devfn), 458 458 PCI_FUNC(pdev->devfn), pdev->irq); 459 459 460 460 /* Setup the slot information structures */ ··· 503 503 #ifdef CONFIG_PM 504 504 static int pciehp_suspend (struct pcie_device *dev, pm_message_t state) 505 505 { 506 - printk("%s ENTRY\n", __FUNCTION__); 506 + printk("%s ENTRY\n", __func__); 507 507 return 0; 508 508 } 509 509 510 510 static int pciehp_resume (struct pcie_device *dev) 511 511 { 512 - printk("%s ENTRY\n", __FUNCTION__); 512 + printk("%s ENTRY\n", __func__); 513 513 if (pciehp_force) { 514 514 struct pci_dev *pdev = dev->port; 515 515 struct controller *ctrl = pci_get_drvdata(pdev); ··· 563 563 dbg("pcie_port_service_register = %d\n", retval); 564 564 info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); 565 565 if (retval) 566 - dbg("%s: Failure to register service\n", __FUNCTION__); 566 + dbg("%s: Failure to register service\n", __func__); 567 567 return retval; 568 568 } 569 569
+17 -17
drivers/pci/hotplug/pciehp_ctrl.c
··· 181 181 if (POWER_CTRL(ctrl->ctrlcap)) { 182 182 if (pslot->hpc_ops->power_off_slot(pslot)) { 183 183 err("%s: Issue of Slot Power Off command failed\n", 184 - __FUNCTION__); 184 + __func__); 185 185 return; 186 186 } 187 187 } ··· 192 192 if (ATTN_LED(ctrl->ctrlcap)) { 193 193 if (pslot->hpc_ops->set_attention_status(pslot, 1)) { 194 194 err("%s: Issue of Set Attention Led command failed\n", 195 - __FUNCTION__); 195 + __func__); 196 196 return; 197 197 } 198 198 } ··· 211 211 struct controller *ctrl = p_slot->ctrl; 212 212 213 213 dbg("%s: slot device, slot offset, hp slot = %d, %d ,%d\n", 214 - __FUNCTION__, p_slot->device, 214 + __func__, p_slot->device, 215 215 ctrl->slot_device_offset, p_slot->hp_slot); 216 216 217 217 if (POWER_CTRL(ctrl->ctrlcap)) { ··· 230 230 /* Check link training status */ 231 231 retval = p_slot->hpc_ops->check_lnk_status(ctrl); 232 232 if (retval) { 233 - err("%s: Failed to check link status\n", __FUNCTION__); 233 + err("%s: Failed to check link status\n", __func__); 234 234 set_slot_off(ctrl, p_slot); 235 235 return retval; 236 236 } 237 237 238 238 /* Check for a power fault */ 239 239 if (p_slot->hpc_ops->query_power_fault(p_slot)) { 240 - dbg("%s: power fault detected\n", __FUNCTION__); 240 + dbg("%s: power fault detected\n", __func__); 241 241 retval = POWER_FAILURE; 242 242 goto err_exit; 243 243 } ··· 277 277 if (retval) 278 278 return retval; 279 279 280 - dbg("In %s, hp_slot = %d\n", __FUNCTION__, p_slot->hp_slot); 280 + dbg("In %s, hp_slot = %d\n", __func__, p_slot->hp_slot); 281 281 282 282 if (POWER_CTRL(ctrl->ctrlcap)) { 283 283 /* power off slot */ 284 284 retval = p_slot->hpc_ops->power_off_slot(p_slot); 285 285 if (retval) { 286 286 err("%s: Issue of Slot Disable command failed\n", 287 - __FUNCTION__); 287 + __func__); 288 288 return retval; 289 289 } 290 290 } ··· 319 319 case POWEROFF_STATE: 320 320 mutex_unlock(&p_slot->lock); 321 321 dbg("%s: disabling bus:device(%x:%x)\n", 322 - __FUNCTION__, p_slot->bus, p_slot->device); 322 + __func__, p_slot->bus, p_slot->device); 323 323 pciehp_disable_slot(p_slot); 324 324 mutex_lock(&p_slot->lock); 325 325 p_slot->state = STATIC_STATE; ··· 347 347 348 348 info = kmalloc(sizeof(*info), GFP_KERNEL); 349 349 if (!info) { 350 - err("%s: Cannot allocate memory\n", __FUNCTION__); 350 + err("%s: Cannot allocate memory\n", __func__); 351 351 return; 352 352 } 353 353 info->p_slot = p_slot; ··· 424 424 * expires to cancel hot-add or hot-remove 425 425 */ 426 426 info("Button cancel on Slot(%s)\n", p_slot->name); 427 - dbg("%s: button cancel\n", __FUNCTION__); 427 + dbg("%s: button cancel\n", __func__); 428 428 cancel_delayed_work(&p_slot->work); 429 429 if (p_slot->state == BLINKINGOFF_STATE) { 430 430 if (PWR_LED(ctrl->ctrlcap)) ··· 465 465 466 466 info = kmalloc(sizeof(*info), GFP_KERNEL); 467 467 if (!info) { 468 - err("%s: Cannot allocate memory\n", __FUNCTION__); 468 + err("%s: Cannot allocate memory\n", __func__); 469 469 return; 470 470 } 471 471 info->p_slot = p_slot; ··· 526 526 527 527 rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); 528 528 if (rc || !getstatus) { 529 - info("%s: no adapter on slot(%s)\n", __FUNCTION__, 529 + info("%s: no adapter on slot(%s)\n", __func__, 530 530 p_slot->name); 531 531 mutex_unlock(&p_slot->ctrl->crit_sect); 532 532 return -ENODEV; ··· 534 534 if (MRL_SENS(p_slot->ctrl->ctrlcap)) { 535 535 rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); 536 536 if (rc || getstatus) { 537 - info("%s: latch open on slot(%s)\n", __FUNCTION__, 537 + info("%s: latch open on slot(%s)\n", __func__, 538 538 p_slot->name); 539 539 mutex_unlock(&p_slot->ctrl->crit_sect); 540 540 return -ENODEV; ··· 544 544 if (POWER_CTRL(p_slot->ctrl->ctrlcap)) { 545 545 rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); 546 546 if (rc || getstatus) { 547 - info("%s: already enabled on slot(%s)\n", __FUNCTION__, 547 + info("%s: already enabled on slot(%s)\n", __func__, 548 548 p_slot->name); 549 549 mutex_unlock(&p_slot->ctrl->crit_sect); 550 550 return -EINVAL; ··· 579 579 if (!HP_SUPR_RM(p_slot->ctrl->ctrlcap)) { 580 580 ret = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); 581 581 if (ret || !getstatus) { 582 - info("%s: no adapter on slot(%s)\n", __FUNCTION__, 582 + info("%s: no adapter on slot(%s)\n", __func__, 583 583 p_slot->name); 584 584 mutex_unlock(&p_slot->ctrl->crit_sect); 585 585 return -ENODEV; ··· 589 589 if (MRL_SENS(p_slot->ctrl->ctrlcap)) { 590 590 ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); 591 591 if (ret || getstatus) { 592 - info("%s: latch open on slot(%s)\n", __FUNCTION__, 592 + info("%s: latch open on slot(%s)\n", __func__, 593 593 p_slot->name); 594 594 mutex_unlock(&p_slot->ctrl->crit_sect); 595 595 return -ENODEV; ··· 599 599 if (POWER_CTRL(p_slot->ctrl->ctrlcap)) { 600 600 ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); 601 601 if (ret || !getstatus) { 602 - info("%s: already disabled slot(%s)\n", __FUNCTION__, 602 + info("%s: already disabled slot(%s)\n", __func__, 603 603 p_slot->name); 604 604 mutex_unlock(&p_slot->ctrl->crit_sect); 605 605 return -EINVAL;
+72 -72
drivers/pci/hotplug/pciehp_hpc.c
··· 258 258 259 259 retval = pciehp_readw(ctrl, SLOTSTATUS, &slot_status); 260 260 if (retval) { 261 - err("%s: Cannot read SLOTSTATUS register\n", __FUNCTION__); 261 + err("%s: Cannot read SLOTSTATUS register\n", __func__); 262 262 goto out; 263 263 } 264 264 ··· 267 267 proceed forward to issue the next command according 268 268 to spec. Just print out the error message */ 269 269 dbg("%s: CMD_COMPLETED not clear after 1 sec.\n", 270 - __FUNCTION__); 270 + __func__); 271 271 } 272 272 273 273 spin_lock_irqsave(&ctrl->lock, flags); 274 274 retval = pciehp_readw(ctrl, SLOTCTRL, &slot_ctrl); 275 275 if (retval) { 276 - err("%s: Cannot read SLOTCTRL register\n", __FUNCTION__); 276 + err("%s: Cannot read SLOTCTRL register\n", __func__); 277 277 goto out_spin_unlock; 278 278 } 279 279 ··· 283 283 ctrl->cmd_busy = 1; 284 284 retval = pciehp_writew(ctrl, SLOTCTRL, slot_ctrl); 285 285 if (retval) 286 - err("%s: Cannot write to SLOTCTRL register\n", __FUNCTION__); 286 + err("%s: Cannot write to SLOTCTRL register\n", __func__); 287 287 288 288 out_spin_unlock: 289 289 spin_unlock_irqrestore(&ctrl->lock, flags); ··· 305 305 306 306 retval = pciehp_readw(ctrl, LNKSTATUS, &lnk_status); 307 307 if (retval) { 308 - err("%s: Cannot read LNKSTATUS register\n", __FUNCTION__); 308 + err("%s: Cannot read LNKSTATUS register\n", __func__); 309 309 return retval; 310 310 } 311 311 312 - dbg("%s: lnk_status = %x\n", __FUNCTION__, lnk_status); 312 + dbg("%s: lnk_status = %x\n", __func__, lnk_status); 313 313 if ( (lnk_status & LNK_TRN) || (lnk_status & LNK_TRN_ERR) || 314 314 !(lnk_status & NEG_LINK_WD)) { 315 - err("%s : Link Training Error occurs \n", __FUNCTION__); 315 + err("%s : Link Training Error occurs \n", __func__); 316 316 retval = -1; 317 317 return retval; 318 318 } ··· 329 329 330 330 retval = pciehp_readw(ctrl, SLOTCTRL, &slot_ctrl); 331 331 if (retval) { 332 - err("%s: Cannot read SLOTCTRL register\n", __FUNCTION__); 332 + err("%s: Cannot read SLOTCTRL register\n", __func__); 333 333 return retval; 334 334 } 335 335 336 336 dbg("%s: SLOTCTRL %x, value read %x\n", 337 - __FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_ctrl); 337 + __func__, ctrl->cap_base + SLOTCTRL, slot_ctrl); 338 338 339 339 atten_led_state = (slot_ctrl & ATTN_LED_CTRL) >> 6; 340 340 ··· 368 368 369 369 retval = pciehp_readw(ctrl, SLOTCTRL, &slot_ctrl); 370 370 if (retval) { 371 - err("%s: Cannot read SLOTCTRL register\n", __FUNCTION__); 371 + err("%s: Cannot read SLOTCTRL register\n", __func__); 372 372 return retval; 373 373 } 374 374 dbg("%s: SLOTCTRL %x value read %x\n", 375 - __FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_ctrl); 375 + __func__, ctrl->cap_base + SLOTCTRL, slot_ctrl); 376 376 377 377 pwr_state = (slot_ctrl & PWR_CTRL) >> 10; 378 378 ··· 399 399 400 400 retval = pciehp_readw(ctrl, SLOTSTATUS, &slot_status); 401 401 if (retval) { 402 - err("%s: Cannot read SLOTSTATUS register\n", __FUNCTION__); 402 + err("%s: Cannot read SLOTSTATUS register\n", __func__); 403 403 return retval; 404 404 } 405 405 ··· 417 417 418 418 retval = pciehp_readw(ctrl, SLOTSTATUS, &slot_status); 419 419 if (retval) { 420 - err("%s: Cannot read SLOTSTATUS register\n", __FUNCTION__); 420 + err("%s: Cannot read SLOTSTATUS register\n", __func__); 421 421 return retval; 422 422 } 423 423 card_state = (u8)((slot_status & PRSN_STATE) >> 6); ··· 435 435 436 436 retval = pciehp_readw(ctrl, SLOTSTATUS, &slot_status); 437 437 if (retval) { 438 - err("%s: Cannot check for power fault\n", __FUNCTION__); 438 + err("%s: Cannot check for power fault\n", __func__); 439 439 return retval; 440 440 } 441 441 pwr_fault = (u8)((slot_status & PWR_FAULT_DETECTED) >> 1); ··· 451 451 452 452 retval = pciehp_readw(ctrl, SLOTSTATUS, &slot_status); 453 453 if (retval) { 454 - err("%s : Cannot check EMI status\n", __FUNCTION__); 454 + err("%s : Cannot check EMI status\n", __func__); 455 455 return retval; 456 456 } 457 457 *status = (slot_status & EMI_STATE) >> EMI_STATUS_BIT; ··· 506 506 507 507 rc = pcie_write_cmd(slot, slot_cmd, cmd_mask); 508 508 dbg("%s: SLOTCTRL %x write cmd %x\n", 509 - __FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_cmd); 509 + __func__, ctrl->cap_base + SLOTCTRL, slot_cmd); 510 510 511 511 return rc; 512 512 } ··· 527 527 pcie_write_cmd(slot, slot_cmd, cmd_mask); 528 528 529 529 dbg("%s: SLOTCTRL %x write cmd %x\n", 530 - __FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_cmd); 530 + __func__, ctrl->cap_base + SLOTCTRL, slot_cmd); 531 531 } 532 532 533 533 static void hpc_set_green_led_off(struct slot *slot) ··· 545 545 546 546 pcie_write_cmd(slot, slot_cmd, cmd_mask); 547 547 dbg("%s: SLOTCTRL %x write cmd %x\n", 548 - __FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_cmd); 548 + __func__, ctrl->cap_base + SLOTCTRL, slot_cmd); 549 549 } 550 550 551 551 static void hpc_set_green_led_blink(struct slot *slot) ··· 564 564 pcie_write_cmd(slot, slot_cmd, cmd_mask); 565 565 566 566 dbg("%s: SLOTCTRL %x write cmd %x\n", 567 - __FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_cmd); 567 + __func__, ctrl->cap_base + SLOTCTRL, slot_cmd); 568 568 } 569 569 570 570 static void hpc_release_ctlr(struct controller *ctrl) ··· 590 590 u16 slot_status; 591 591 int retval = 0; 592 592 593 - dbg("%s: slot->hp_slot %x\n", __FUNCTION__, slot->hp_slot); 593 + dbg("%s: slot->hp_slot %x\n", __func__, slot->hp_slot); 594 594 595 595 /* Clear sticky power-fault bit from previous power failures */ 596 596 retval = pciehp_readw(ctrl, SLOTSTATUS, &slot_status); 597 597 if (retval) { 598 - err("%s: Cannot read SLOTSTATUS register\n", __FUNCTION__); 598 + err("%s: Cannot read SLOTSTATUS register\n", __func__); 599 599 return retval; 600 600 } 601 601 slot_status &= PWR_FAULT_DETECTED; ··· 603 603 retval = pciehp_writew(ctrl, SLOTSTATUS, slot_status); 604 604 if (retval) { 605 605 err("%s: Cannot write to SLOTSTATUS register\n", 606 - __FUNCTION__); 606 + __func__); 607 607 return retval; 608 608 } 609 609 } ··· 627 627 retval = pcie_write_cmd(slot, slot_cmd, cmd_mask); 628 628 629 629 if (retval) { 630 - err("%s: Write %x command failed!\n", __FUNCTION__, slot_cmd); 630 + err("%s: Write %x command failed!\n", __func__, slot_cmd); 631 631 return -1; 632 632 } 633 633 dbg("%s: SLOTCTRL %x write cmd %x\n", 634 - __FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_cmd); 634 + __func__, ctrl->cap_base + SLOTCTRL, slot_cmd); 635 635 636 636 return retval; 637 637 } ··· 677 677 int retval = 0; 678 678 int changed; 679 679 680 - dbg("%s: slot->hp_slot %x\n", __FUNCTION__, slot->hp_slot); 680 + dbg("%s: slot->hp_slot %x\n", __func__, slot->hp_slot); 681 681 682 682 /* 683 683 * Set Bad DLLP Mask bit in Correctable Error Mask ··· 710 710 711 711 retval = pcie_write_cmd(slot, slot_cmd, cmd_mask); 712 712 if (retval) { 713 - err("%s: Write command failed!\n", __FUNCTION__); 713 + err("%s: Write command failed!\n", __func__); 714 714 retval = -1; 715 715 goto out; 716 716 } 717 717 dbg("%s: SLOTCTRL %x write cmd %x\n", 718 - __FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_cmd); 718 + __func__, ctrl->cap_base + SLOTCTRL, slot_cmd); 719 719 720 720 /* 721 721 * After turning power off, we must wait for at least 1 second ··· 741 741 742 742 rc = pciehp_readw(ctrl, SLOTSTATUS, &slot_status); 743 743 if (rc) { 744 - err("%s: Cannot read SLOTSTATUS register\n", __FUNCTION__); 744 + err("%s: Cannot read SLOTSTATUS register\n", __func__); 745 745 return IRQ_NONE; 746 746 } 747 747 ··· 754 754 if ( !intr_loc ) 755 755 return IRQ_NONE; 756 756 757 - dbg("%s: intr_loc %x\n", __FUNCTION__, intr_loc); 757 + dbg("%s: intr_loc %x\n", __func__, intr_loc); 758 758 /* Mask Hot-plug Interrupt Enable */ 759 759 if (!pciehp_poll_mode) { 760 760 spin_lock_irqsave(&ctrl->lock, flags); 761 761 rc = pciehp_readw(ctrl, SLOTCTRL, &temp_word); 762 762 if (rc) { 763 763 err("%s: Cannot read SLOT_CTRL register\n", 764 - __FUNCTION__); 764 + __func__); 765 765 spin_unlock_irqrestore(&ctrl->lock, flags); 766 766 return IRQ_NONE; 767 767 } 768 768 769 769 dbg("%s: pciehp_readw(SLOTCTRL) with value %x\n", 770 - __FUNCTION__, temp_word); 770 + __func__, temp_word); 771 771 temp_word = (temp_word & ~HP_INTR_ENABLE & 772 772 ~CMD_CMPL_INTR_ENABLE) | 0x00; 773 773 rc = pciehp_writew(ctrl, SLOTCTRL, temp_word); 774 774 if (rc) { 775 775 err("%s: Cannot write to SLOTCTRL register\n", 776 - __FUNCTION__); 776 + __func__); 777 777 spin_unlock_irqrestore(&ctrl->lock, flags); 778 778 return IRQ_NONE; 779 779 } ··· 782 782 rc = pciehp_readw(ctrl, SLOTSTATUS, &slot_status); 783 783 if (rc) { 784 784 err("%s: Cannot read SLOT_STATUS register\n", 785 - __FUNCTION__); 785 + __func__); 786 786 return IRQ_NONE; 787 787 } 788 788 dbg("%s: pciehp_readw(SLOTSTATUS) with value %x\n", 789 - __FUNCTION__, slot_status); 789 + __func__, slot_status); 790 790 791 791 /* Clear command complete interrupt caused by this write */ 792 792 temp_word = 0x1f; 793 793 rc = pciehp_writew(ctrl, SLOTSTATUS, temp_word); 794 794 if (rc) { 795 795 err("%s: Cannot write to SLOTSTATUS register\n", 796 - __FUNCTION__); 796 + __func__); 797 797 return IRQ_NONE; 798 798 } 799 799 } ··· 822 822 temp_word = 0x1F; 823 823 rc = pciehp_writew(ctrl, SLOTSTATUS, temp_word); 824 824 if (rc) { 825 - err("%s: Cannot write to SLOTSTATUS register\n", __FUNCTION__); 825 + err("%s: Cannot write to SLOTSTATUS register\n", __func__); 826 826 return IRQ_NONE; 827 827 } 828 828 /* Unmask Hot-plug Interrupt Enable */ ··· 831 831 rc = pciehp_readw(ctrl, SLOTCTRL, &temp_word); 832 832 if (rc) { 833 833 err("%s: Cannot read SLOTCTRL register\n", 834 - __FUNCTION__); 834 + __func__); 835 835 spin_unlock_irqrestore(&ctrl->lock, flags); 836 836 return IRQ_NONE; 837 837 } 838 838 839 - dbg("%s: Unmask Hot-plug Interrupt Enable\n", __FUNCTION__); 839 + dbg("%s: Unmask Hot-plug Interrupt Enable\n", __func__); 840 840 temp_word = (temp_word & ~HP_INTR_ENABLE) | HP_INTR_ENABLE; 841 841 842 842 rc = pciehp_writew(ctrl, SLOTCTRL, temp_word); 843 843 if (rc) { 844 844 err("%s: Cannot write to SLOTCTRL register\n", 845 - __FUNCTION__); 845 + __func__); 846 846 spin_unlock_irqrestore(&ctrl->lock, flags); 847 847 return IRQ_NONE; 848 848 } ··· 851 851 rc = pciehp_readw(ctrl, SLOTSTATUS, &slot_status); 852 852 if (rc) { 853 853 err("%s: Cannot read SLOT_STATUS register\n", 854 - __FUNCTION__); 854 + __func__); 855 855 return IRQ_NONE; 856 856 } 857 857 ··· 860 860 rc = pciehp_writew(ctrl, SLOTSTATUS, temp_word); 861 861 if (rc) { 862 862 err("%s: Cannot write to SLOTSTATUS failed\n", 863 - __FUNCTION__); 863 + __func__); 864 864 return IRQ_NONE; 865 865 } 866 866 dbg("%s: pciehp_writew(SLOTSTATUS) with value %x\n", 867 - __FUNCTION__, temp_word); 867 + __func__, temp_word); 868 868 } 869 869 870 870 return IRQ_HANDLED; ··· 879 879 880 880 retval = pciehp_readl(ctrl, LNKCAP, &lnk_cap); 881 881 if (retval) { 882 - err("%s: Cannot read LNKCAP register\n", __FUNCTION__); 882 + err("%s: Cannot read LNKCAP register\n", __func__); 883 883 return retval; 884 884 } 885 885 ··· 908 908 909 909 retval = pciehp_readl(ctrl, LNKCAP, &lnk_cap); 910 910 if (retval) { 911 - err("%s: Cannot read LNKCAP register\n", __FUNCTION__); 911 + err("%s: Cannot read LNKCAP register\n", __func__); 912 912 return retval; 913 913 } 914 914 ··· 957 957 958 958 retval = pciehp_readw(ctrl, LNKSTATUS, &lnk_status); 959 959 if (retval) { 960 - err("%s: Cannot read LNKSTATUS register\n", __FUNCTION__); 960 + err("%s: Cannot read LNKSTATUS register\n", __func__); 961 961 return retval; 962 962 } 963 963 ··· 986 986 987 987 retval = pciehp_readw(ctrl, LNKSTATUS, &lnk_status); 988 988 if (retval) { 989 - err("%s: Cannot read LNKSTATUS register\n", __FUNCTION__); 989 + err("%s: Cannot read LNKSTATUS register\n", __func__); 990 990 return retval; 991 991 } 992 992 ··· 1130 1130 1131 1131 rc = pciehp_readl(ctrl, SLOTCAP, &slot_cap); 1132 1132 if (rc) { 1133 - err("%s: Cannot read SLOTCAP register\n", __FUNCTION__); 1133 + err("%s: Cannot read SLOTCAP register\n", __func__); 1134 1134 return -1; 1135 1135 } 1136 1136 1137 1137 /* Mask Hot-plug Interrupt Enable */ 1138 1138 rc = pciehp_readw(ctrl, SLOTCTRL, &temp_word); 1139 1139 if (rc) { 1140 - err("%s: Cannot read SLOTCTRL register\n", __FUNCTION__); 1140 + err("%s: Cannot read SLOTCTRL register\n", __func__); 1141 1141 return -1; 1142 1142 } 1143 1143 1144 1144 dbg("%s: SLOTCTRL %x value read %x\n", 1145 - __FUNCTION__, ctrl->cap_base + SLOTCTRL, temp_word); 1145 + __func__, ctrl->cap_base + SLOTCTRL, temp_word); 1146 1146 temp_word = (temp_word & ~HP_INTR_ENABLE & ~CMD_CMPL_INTR_ENABLE) | 1147 1147 0x00; 1148 1148 1149 1149 rc = pciehp_writew(ctrl, SLOTCTRL, temp_word); 1150 1150 if (rc) { 1151 - err("%s: Cannot write to SLOTCTRL register\n", __FUNCTION__); 1151 + err("%s: Cannot write to SLOTCTRL register\n", __func__); 1152 1152 return -1; 1153 1153 } 1154 1154 1155 1155 rc = pciehp_readw(ctrl, SLOTSTATUS, &slot_status); 1156 1156 if (rc) { 1157 - err("%s: Cannot read SLOTSTATUS register\n", __FUNCTION__); 1157 + err("%s: Cannot read SLOTSTATUS register\n", __func__); 1158 1158 return -1; 1159 1159 } 1160 1160 1161 1161 temp_word = 0x1F; /* Clear all events */ 1162 1162 rc = pciehp_writew(ctrl, SLOTSTATUS, temp_word); 1163 1163 if (rc) { 1164 - err("%s: Cannot write to SLOTSTATUS register\n", __FUNCTION__); 1164 + err("%s: Cannot write to SLOTSTATUS register\n", __func__); 1165 1165 return -1; 1166 1166 } 1167 1167 return 0; ··· 1177 1177 1178 1178 rc = pciehp_readw(ctrl, SLOTCTRL, &temp_word); 1179 1179 if (rc) { 1180 - err("%s: Cannot read SLOTCTRL register\n", __FUNCTION__); 1180 + err("%s: Cannot read SLOTCTRL register\n", __func__); 1181 1181 goto abort; 1182 1182 } 1183 1183 ··· 1185 1185 1186 1186 rc = pciehp_readl(ctrl, SLOTCAP, &slot_cap); 1187 1187 if (rc) { 1188 - err("%s: Cannot read SLOTCAP register\n", __FUNCTION__); 1188 + err("%s: Cannot read SLOTCAP register\n", __func__); 1189 1189 goto abort; 1190 1190 } 1191 1191 ··· 1212 1212 */ 1213 1213 rc = pciehp_writew(ctrl, SLOTCTRL, temp_word); 1214 1214 if (rc) { 1215 - err("%s: Cannot write to SLOTCTRL register\n", __FUNCTION__); 1215 + err("%s: Cannot write to SLOTCTRL register\n", __func__); 1216 1216 goto abort; 1217 1217 } 1218 1218 rc = pciehp_readw(ctrl, SLOTSTATUS, &slot_status); 1219 1219 if (rc) { 1220 - err("%s: Cannot read SLOTSTATUS register\n", __FUNCTION__); 1220 + err("%s: Cannot read SLOTSTATUS register\n", __func__); 1221 1221 goto abort_disable_intr; 1222 1222 } 1223 1223 1224 1224 temp_word = 0x1F; /* Clear all events */ 1225 1225 rc = pciehp_writew(ctrl, SLOTSTATUS, temp_word); 1226 1226 if (rc) { 1227 - err("%s: Cannot write to SLOTSTATUS register\n", __FUNCTION__); 1227 + err("%s: Cannot write to SLOTSTATUS register\n", __func__); 1228 1228 goto abort_disable_intr; 1229 1229 } 1230 1230 ··· 1247 1247 rc = pciehp_writew(ctrl, SLOTCTRL, temp_word); 1248 1248 } 1249 1249 if (rc) 1250 - err("%s : disabling interrupts failed\n", __FUNCTION__); 1250 + err("%s : disabling interrupts failed\n", __func__); 1251 1251 abort: 1252 1252 return -1; 1253 1253 } ··· 1265 1265 ctrl->pci_dev = pdev; /* save pci_dev in context */ 1266 1266 1267 1267 dbg("%s: hotplug controller vendor id 0x%x device id 0x%x\n", 1268 - __FUNCTION__, pdev->vendor, pdev->device); 1268 + __func__, pdev->vendor, pdev->device); 1269 1269 1270 1270 cap_base = pci_find_capability(pdev, PCI_CAP_ID_EXP); 1271 1271 if (cap_base == 0) { 1272 - dbg("%s: Can't find PCI_CAP_ID_EXP (0x10)\n", __FUNCTION__); 1272 + dbg("%s: Can't find PCI_CAP_ID_EXP (0x10)\n", __func__); 1273 1273 goto abort; 1274 1274 } 1275 1275 1276 1276 ctrl->cap_base = cap_base; 1277 1277 1278 - dbg("%s: pcie_cap_base %x\n", __FUNCTION__, cap_base); 1278 + dbg("%s: pcie_cap_base %x\n", __func__, cap_base); 1279 1279 1280 1280 rc = pciehp_readw(ctrl, CAPREG, &cap_reg); 1281 1281 if (rc) { 1282 - err("%s: Cannot read CAPREG register\n", __FUNCTION__); 1282 + err("%s: Cannot read CAPREG register\n", __func__); 1283 1283 goto abort; 1284 1284 } 1285 1285 dbg("%s: CAPREG offset %x cap_reg %x\n", 1286 - __FUNCTION__, ctrl->cap_base + CAPREG, cap_reg); 1286 + __func__, ctrl->cap_base + CAPREG, cap_reg); 1287 1287 1288 1288 if (((cap_reg & SLOT_IMPL) == 0) || 1289 1289 (((cap_reg & DEV_PORT_TYPE) != 0x0040) 1290 1290 && ((cap_reg & DEV_PORT_TYPE) != 0x0060))) { 1291 1291 dbg("%s : This is not a root port or the port is not " 1292 - "connected to a slot\n", __FUNCTION__); 1292 + "connected to a slot\n", __func__); 1293 1293 goto abort; 1294 1294 } 1295 1295 1296 1296 rc = pciehp_readl(ctrl, SLOTCAP, &slot_cap); 1297 1297 if (rc) { 1298 - err("%s: Cannot read SLOTCAP register\n", __FUNCTION__); 1298 + err("%s: Cannot read SLOTCAP register\n", __func__); 1299 1299 goto abort; 1300 1300 } 1301 1301 dbg("%s: SLOTCAP offset %x slot_cap %x\n", 1302 - __FUNCTION__, ctrl->cap_base + SLOTCAP, slot_cap); 1302 + __func__, ctrl->cap_base + SLOTCAP, slot_cap); 1303 1303 1304 1304 if (!(slot_cap & HP_CAP)) { 1305 - dbg("%s : This slot is not hot-plug capable\n", __FUNCTION__); 1305 + dbg("%s : This slot is not hot-plug capable\n", __func__); 1306 1306 goto abort; 1307 1307 } 1308 1308 /* For debugging purpose */ 1309 1309 rc = pciehp_readw(ctrl, SLOTSTATUS, &slot_status); 1310 1310 if (rc) { 1311 - err("%s: Cannot read SLOTSTATUS register\n", __FUNCTION__); 1311 + err("%s: Cannot read SLOTSTATUS register\n", __func__); 1312 1312 goto abort; 1313 1313 } 1314 1314 dbg("%s: SLOTSTATUS offset %x slot_status %x\n", 1315 - __FUNCTION__, ctrl->cap_base + SLOTSTATUS, slot_status); 1315 + __func__, ctrl->cap_base + SLOTSTATUS, slot_status); 1316 1316 1317 1317 rc = pciehp_readw(ctrl, SLOTCTRL, &slot_ctrl); 1318 1318 if (rc) { 1319 - err("%s: Cannot read SLOTCTRL register\n", __FUNCTION__); 1319 + err("%s: Cannot read SLOTCTRL register\n", __func__); 1320 1320 goto abort; 1321 1321 } 1322 1322 dbg("%s: SLOTCTRL offset %x slot_ctrl %x\n", 1323 - __FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_ctrl); 1323 + __func__, ctrl->cap_base + SLOTCTRL, slot_ctrl); 1324 1324 1325 1325 for (rc = 0; rc < DEVICE_COUNT_RESOURCE; rc++) 1326 1326 if (pci_resource_len(pdev, rc) > 0) ··· 1358 1358 rc = request_irq(ctrl->pci_dev->irq, pcie_isr, IRQF_SHARED, 1359 1359 MY_NAME, (void *)ctrl); 1360 1360 dbg("%s: request_irq %d for hpc%d (returns %d)\n", 1361 - __FUNCTION__, ctrl->pci_dev->irq, 1361 + __func__, ctrl->pci_dev->irq, 1362 1362 atomic_read(&pciehp_num_controllers), rc); 1363 1363 if (rc) { 1364 1364 err("Can't get irq %d for the hotplug controller\n",
+4 -4
drivers/pci/hotplug/pciehp_pci.c
··· 40 40 41 41 if (hpp->revision > 1) { 42 42 printk(KERN_WARNING "%s: Rev.%d type0 record not supported\n", 43 - __FUNCTION__, hpp->revision); 43 + __func__, hpp->revision); 44 44 return; 45 45 } 46 46 ··· 82 82 83 83 if (hpp->revision > 1) { 84 84 printk(KERN_WARNING "%s: Rev.%d type2 record not supported\n", 85 - __FUNCTION__, hpp->revision); 85 + __func__, hpp->revision); 86 86 return; 87 87 } 88 88 ··· 150 150 151 151 if (pciehp_get_hp_params_from_firmware(dev, &hpp)) { 152 152 printk(KERN_WARNING "%s: Could not get hotplug parameters\n", 153 - __FUNCTION__); 153 + __func__); 154 154 return; 155 155 } 156 156 ··· 245 245 struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate; 246 246 u16 command; 247 247 248 - dbg("%s: bus/dev = %x/%x\n", __FUNCTION__, p_slot->bus, 248 + dbg("%s: bus/dev = %x/%x\n", __func__, p_slot->bus, 249 249 p_slot->device); 250 250 ret = p_slot->hpc_ops->get_adapter_status(p_slot, &presence); 251 251 if (ret)
+9 -9
drivers/pci/hotplug/pcihp_skeleton.c
··· 98 98 struct slot *slot = hotplug_slot->private; 99 99 int retval = 0; 100 100 101 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 101 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 102 102 103 103 /* 104 104 * Fill in code here to enable the specified slot ··· 112 112 struct slot *slot = hotplug_slot->private; 113 113 int retval = 0; 114 114 115 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 115 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 116 116 117 117 /* 118 118 * Fill in code here to disable the specified slot ··· 126 126 struct slot *slot = hotplug_slot->private; 127 127 int retval = 0; 128 128 129 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 129 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 130 130 131 131 switch (status) { 132 132 case 0: ··· 151 151 struct slot *slot = hotplug_slot->private; 152 152 int retval = 0; 153 153 154 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 154 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 155 155 156 156 switch (value) { 157 157 case 0: ··· 170 170 struct slot *slot = hotplug_slot->private; 171 171 int retval = 0; 172 172 173 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 173 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 174 174 175 175 /* 176 176 * Fill in logic to get the current power status of the specific ··· 185 185 struct slot *slot = hotplug_slot->private; 186 186 int retval = 0; 187 187 188 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 188 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 189 189 190 190 /* 191 191 * Fill in logic to get the current attention status of the specific ··· 200 200 struct slot *slot = hotplug_slot->private; 201 201 int retval = 0; 202 202 203 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 203 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 204 204 205 205 /* 206 206 * Fill in logic to get the current latch status of the specific ··· 215 215 struct slot *slot = hotplug_slot->private; 216 216 int retval = 0; 217 217 218 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 218 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 219 219 220 220 /* 221 221 * Fill in logic to get the current adapter status of the specific ··· 229 229 { 230 230 struct slot *slot = hotplug_slot->private; 231 231 232 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 232 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 233 233 kfree(slot->hotplug_slot->info); 234 234 kfree(slot->hotplug_slot); 235 235 kfree(slot);
+10 -10
drivers/pci/hotplug/rpadlpar_core.c
··· 147 147 dev = of_create_pci_dev(dn, phb->bus, pdn->devfn); 148 148 if (!dev) { 149 149 printk(KERN_ERR "%s: failed to create pci dev for %s\n", 150 - __FUNCTION__, dn->full_name); 150 + __func__, dn->full_name); 151 151 return; 152 152 } 153 153 ··· 183 183 dev = dlpar_find_new_dev(phb->bus, dn); 184 184 185 185 if (!dev) { 186 - printk(KERN_ERR "%s: unable to add bus %s\n", __FUNCTION__, 186 + printk(KERN_ERR "%s: unable to add bus %s\n", __func__, 187 187 drc_name); 188 188 return -EIO; 189 189 } 190 190 191 191 if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) { 192 192 printk(KERN_ERR "%s: unexpected header type %d, unable to add bus %s\n", 193 - __FUNCTION__, dev->hdr_type, drc_name); 193 + __func__, dev->hdr_type, drc_name); 194 194 return -EIO; 195 195 } 196 196 197 197 /* Add hotplug slot */ 198 198 if (rpaphp_add_slot(dn)) { 199 199 printk(KERN_ERR "%s: unable to add hotplug slot %s\n", 200 - __FUNCTION__, drc_name); 200 + __func__, drc_name); 201 201 return -EIO; 202 202 } 203 203 return 0; ··· 239 239 if (rpaphp_deregister_slot(slot)) { 240 240 printk(KERN_ERR 241 241 "%s: unable to remove hotplug slot %s\n", 242 - __FUNCTION__, drc_name); 242 + __func__, drc_name); 243 243 return -EIO; 244 244 } 245 245 } ··· 270 270 271 271 if (rpaphp_add_slot(dn)) { 272 272 printk(KERN_ERR "%s: unable to add hotplug slot %s\n", 273 - __FUNCTION__, drc_name); 273 + __func__, drc_name); 274 274 return -EIO; 275 275 } 276 276 return 0; ··· 284 284 if (!vio_register_device_node(dn)) { 285 285 printk(KERN_ERR 286 286 "%s: failed to register vio node %s\n", 287 - __FUNCTION__, drc_name); 287 + __func__, drc_name); 288 288 return -EIO; 289 289 } 290 290 return 0; ··· 384 384 if (rpaphp_deregister_slot(slot)) { 385 385 printk(KERN_ERR 386 386 "%s: unable to remove hotplug slot %s\n", 387 - __FUNCTION__, drc_name); 387 + __func__, drc_name); 388 388 return -EIO; 389 389 } 390 390 } else ··· 392 392 393 393 if (pcibios_unmap_io_space(bus)) { 394 394 printk(KERN_ERR "%s: failed to unmap bus range\n", 395 - __FUNCTION__); 395 + __func__); 396 396 return -ERANGE; 397 397 } 398 398 ··· 458 458 459 459 if (!is_dlpar_capable()) { 460 460 printk(KERN_WARNING "%s: partition not DLPAR capable\n", 461 - __FUNCTION__); 461 + __func__); 462 462 return -EPERM; 463 463 } 464 464
+3 -3
drivers/pci/hotplug/rpaphp_core.c
··· 317 317 if (!is_php_dn(dn, &indexes, &names, &types, &power_domains)) 318 318 return 0; 319 319 320 - dbg("Entry %s: dn->full_name=%s\n", __FUNCTION__, dn->full_name); 320 + dbg("Entry %s: dn->full_name=%s\n", __func__, dn->full_name); 321 321 322 322 /* register PCI devices */ 323 323 name = (char *) &names[1]; ··· 343 343 name += strlen(name) + 1; 344 344 type += strlen(type) + 1; 345 345 } 346 - dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval); 346 + dbg("%s - Exit: rc[%d]\n", __func__, retval); 347 347 348 348 /* XXX FIXME: reports a failure only if last entry in loop failed */ 349 349 return retval; ··· 404 404 } else if (state == EMPTY) { 405 405 slot->state = EMPTY; 406 406 } else { 407 - err("%s: slot[%s] is in invalid state\n", __FUNCTION__, slot->name); 407 + err("%s: slot[%s] is in invalid state\n", __func__, slot->name); 408 408 slot->state = NOT_VALID; 409 409 return -EINVAL; 410 410 }
+7 -7
drivers/pci/hotplug/rpaphp_pci.c
··· 42 42 if (rc < 0) { 43 43 if (rc == -EFAULT || rc == -EEXIST) { 44 44 dbg("%s: slot must be power up to get sensor-state\n", 45 - __FUNCTION__); 45 + __func__); 46 46 47 47 /* some slots have to be powered up 48 48 * before get-sensor will succeed. ··· 51 51 &setlevel); 52 52 if (rc < 0) { 53 53 dbg("%s: power on slot[%s] failed rc=%d.\n", 54 - __FUNCTION__, slot->name, rc); 54 + __func__, slot->name, rc); 55 55 } else { 56 56 rc = rtas_get_sensor(DR_ENTITY_SENSE, 57 57 slot->index, state); 58 58 } 59 59 } else if (rc == -ENODEV) 60 - info("%s: slot is unusable\n", __FUNCTION__); 60 + info("%s: slot is unusable\n", __func__); 61 61 else 62 - err("%s failed to get sensor state\n", __FUNCTION__); 62 + err("%s failed to get sensor state\n", __func__); 63 63 } 64 64 return rc; 65 65 } ··· 95 95 96 96 bus = pcibios_find_pci_bus(slot->dn); 97 97 if (!bus) { 98 - err("%s: no pci_bus for dn %s\n", __FUNCTION__, slot->dn->full_name); 98 + err("%s: no pci_bus for dn %s\n", __func__, slot->dn->full_name); 99 99 return -EINVAL; 100 100 } 101 101 ··· 111 111 /* non-empty slot has to have child */ 112 112 if (!slot->dn->child) { 113 113 err("%s: slot[%s]'s device_node doesn't have child for adapter\n", 114 - __FUNCTION__, slot->name); 114 + __func__, slot->name); 115 115 return -EINVAL; 116 116 } 117 117 ··· 125 125 126 126 if (debug) { 127 127 struct pci_dev *dev; 128 - dbg("%s: pci_devs of slot[%s]\n", __FUNCTION__, slot->dn->full_name); 128 + dbg("%s: pci_devs of slot[%s]\n", __func__, slot->dn->full_name); 129 129 list_for_each_entry (dev, &bus->devices, bus_list) 130 130 dbg("\t%s\n", pci_name(dev)); 131 131 }
+3 -3
drivers/pci/hotplug/rpaphp_slot.c
··· 131 131 struct hotplug_slot *php_slot = slot->hotplug_slot; 132 132 133 133 dbg("%s - Entry: deregistering slot=%s\n", 134 - __FUNCTION__, slot->name); 134 + __func__, slot->name); 135 135 136 136 list_del(&slot->rpaphp_slot_list); 137 137 ··· 142 142 if (retval) 143 143 err("Problem unregistering a slot %s\n", slot->name); 144 144 145 - dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval); 145 + dbg("%s - Exit: rc[%d]\n", __func__, retval); 146 146 return retval; 147 147 } 148 148 EXPORT_SYMBOL_GPL(rpaphp_deregister_slot); ··· 153 153 int retval; 154 154 155 155 dbg("%s registering slot:path[%s] index[%x], name[%s] pdomain[%x] type[%d]\n", 156 - __FUNCTION__, slot->dn->full_name, slot->index, slot->name, 156 + __func__, slot->dn->full_name, slot->index, slot->name, 157 157 slot->power_domain, slot->type); 158 158 159 159 /* should not try to register the same slot twice */
+4 -4
drivers/pci/hotplug/sgi_hotplug.c
··· 367 367 ret = acpi_load_table((struct acpi_table_header *)ssdt); 368 368 if (ACPI_FAILURE(ret)) { 369 369 printk(KERN_ERR "%s: acpi_load_table failed (0x%x)\n", 370 - __FUNCTION__, ret); 370 + __func__, ret); 371 371 /* try to continue on */ 372 372 } 373 373 } ··· 459 459 if (ACPI_FAILURE(ret)) { 460 460 printk(KERN_ERR "%s: acpi_bus_add " 461 461 "failed (0x%x) for slot %d " 462 - "func %d\n", __FUNCTION__, 462 + "func %d\n", __func__, 463 463 ret, (int)(adr>>16), 464 464 (int)(adr&0xffff)); 465 465 /* try to continue on */ ··· 570 570 if (ACPI_FAILURE(ret)) { 571 571 printk(KERN_ERR "%s: acpi_unload_table_id " 572 572 "failed (0x%x) for id %d\n", 573 - __FUNCTION__, ret, ssdt_id); 573 + __func__, ret, ssdt_id); 574 574 /* try to continue on */ 575 575 } 576 576 } ··· 689 689 690 690 if (!sn_prom_feature_available(PRF_HOTPLUG_SUPPORT)) { 691 691 printk(KERN_ERR "%s: PROM version does not support hotplug.\n", 692 - __FUNCTION__); 692 + __func__); 693 693 return -EPERM; 694 694 } 695 695
+3 -3
drivers/pci/hotplug/shpchp.h
··· 234 234 return slot; 235 235 } 236 236 237 - err("%s: slot (device=0x%x) not found\n", __FUNCTION__, device); 237 + err("%s: slot (device=0x%x) not found\n", __func__, device); 238 238 return NULL; 239 239 } 240 240 ··· 268 268 pci_read_config_dword(p_slot->ctrl->pci_dev, PCIX_MISC_BRIDGE_ERRORS_OFFSET, &pcix_bridge_errors_reg); 269 269 perr_set = pcix_bridge_errors_reg & PERR_OBSERVED_MASK; 270 270 if (perr_set) { 271 - dbg ("%s W1C: Bridge_Errors[ PERR_OBSERVED = %08X]\n",__FUNCTION__ , perr_set); 271 + dbg ("%s W1C: Bridge_Errors[ PERR_OBSERVED = %08X]\n",__func__ , perr_set); 272 272 273 273 pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MISC_BRIDGE_ERRORS_OFFSET, perr_set); 274 274 } ··· 277 277 pci_read_config_dword(p_slot->ctrl->pci_dev, PCIX_MEM_BASE_LIMIT_OFFSET, &pcix_mem_base_reg); 278 278 rse_set = pcix_mem_base_reg & RSE_MASK; 279 279 if (rse_set) { 280 - dbg ("%s W1C: Memory_Base_Limit[ RSE ]\n",__FUNCTION__ ); 280 + dbg ("%s W1C: Memory_Base_Limit[ RSE ]\n",__func__ ); 281 281 282 282 pci_write_config_dword(p_slot->ctrl->pci_dev, PCIX_MEM_BASE_LIMIT_OFFSET, rse_set); 283 283 }
+13 -13
drivers/pci/hotplug/shpchp_core.c
··· 91 91 { 92 92 struct slot *slot = hotplug_slot->private; 93 93 94 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 94 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 95 95 96 96 kfree(slot->hotplug_slot->info); 97 97 kfree(slot->hotplug_slot); ··· 195 195 { 196 196 struct slot *slot = get_slot(hotplug_slot); 197 197 198 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 198 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 199 199 200 200 hotplug_slot->info->attention_status = status; 201 201 slot->hpc_ops->set_attention_status(slot, status); ··· 207 207 { 208 208 struct slot *slot = get_slot(hotplug_slot); 209 209 210 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 210 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 211 211 212 212 return shpchp_sysfs_enable_slot(slot); 213 213 } ··· 216 216 { 217 217 struct slot *slot = get_slot(hotplug_slot); 218 218 219 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 219 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 220 220 221 221 return shpchp_sysfs_disable_slot(slot); 222 222 } ··· 226 226 struct slot *slot = get_slot(hotplug_slot); 227 227 int retval; 228 228 229 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 229 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 230 230 231 231 retval = slot->hpc_ops->get_power_status(slot, value); 232 232 if (retval < 0) ··· 240 240 struct slot *slot = get_slot(hotplug_slot); 241 241 int retval; 242 242 243 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 243 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 244 244 245 245 retval = slot->hpc_ops->get_attention_status(slot, value); 246 246 if (retval < 0) ··· 254 254 struct slot *slot = get_slot(hotplug_slot); 255 255 int retval; 256 256 257 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 257 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 258 258 259 259 retval = slot->hpc_ops->get_latch_status(slot, value); 260 260 if (retval < 0) ··· 268 268 struct slot *slot = get_slot(hotplug_slot); 269 269 int retval; 270 270 271 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 271 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 272 272 273 273 retval = slot->hpc_ops->get_adapter_status(slot, value); 274 274 if (retval < 0) ··· 282 282 struct slot *slot = get_slot(hotplug_slot); 283 283 struct pci_bus *bus = slot->ctrl->pci_dev->subordinate; 284 284 285 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 285 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 286 286 287 287 *value = (pci_domain_nr(bus) << 16) | (slot->bus << 8) | slot->device; 288 288 ··· 294 294 struct slot *slot = get_slot(hotplug_slot); 295 295 int retval; 296 296 297 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 297 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 298 298 299 299 retval = slot->hpc_ops->get_max_bus_speed(slot, value); 300 300 if (retval < 0) ··· 308 308 struct slot *slot = get_slot(hotplug_slot); 309 309 int retval; 310 310 311 - dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 311 + dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name); 312 312 313 313 retval = slot->hpc_ops->get_cur_bus_speed(slot, value); 314 314 if (retval < 0) ··· 338 338 339 339 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL); 340 340 if (!ctrl) { 341 - err("%s : out of memory\n", __FUNCTION__); 341 + err("%s : out of memory\n", __func__); 342 342 goto err_out_none; 343 343 } 344 344 INIT_LIST_HEAD(&ctrl->slot_list); ··· 402 402 int retval = 0; 403 403 404 404 retval = pci_register_driver(&shpc_driver); 405 - dbg("%s: pci_register_driver = %d\n", __FUNCTION__, retval); 405 + dbg("%s: pci_register_driver = %d\n", __func__, retval); 406 406 info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); 407 407 return retval; 408 408 }
+23 -23
drivers/pci/hotplug/shpchp_ctrl.c
··· 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 - dbg("%s: Card present %x Power status %x\n", __FUNCTION__, 94 + dbg("%s: Card present %x Power status %x\n", __func__, 95 95 p_slot->presence_save, p_slot->pwr_save); 96 96 97 97 if (getstatus) { ··· 191 191 { 192 192 int rc = 0; 193 193 194 - dbg("%s: change to speed %d\n", __FUNCTION__, speed); 194 + dbg("%s: change to speed %d\n", __func__, speed); 195 195 if ((rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, speed))) { 196 196 err("%s: Issue of set bus speed mode command failed\n", 197 - __FUNCTION__); 197 + __func__); 198 198 return WRONG_BUS_FREQUENCY; 199 199 } 200 200 return rc; ··· 213 213 if (flag) { 214 214 if (asp < bsp) { 215 215 err("%s: speed of bus %x and adapter %x mismatch\n", 216 - __FUNCTION__, bsp, asp); 216 + __func__, bsp, asp); 217 217 rc = WRONG_BUS_FREQUENCY; 218 218 } 219 219 return rc; ··· 247 247 hp_slot = p_slot->device - ctrl->slot_device_offset; 248 248 249 249 dbg("%s: p_slot->device, slot_offset, hp_slot = %d, %d ,%d\n", 250 - __FUNCTION__, p_slot->device, 250 + __func__, p_slot->device, 251 251 ctrl->slot_device_offset, hp_slot); 252 252 253 253 /* Power on slot without connecting to bus */ 254 254 rc = p_slot->hpc_ops->power_on_slot(p_slot); 255 255 if (rc) { 256 - err("%s: Failed to power on slot\n", __FUNCTION__); 256 + err("%s: Failed to power on slot\n", __func__); 257 257 return -1; 258 258 } 259 259 ··· 262 262 return WRONG_BUS_FREQUENCY; 263 263 264 264 if ((rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, PCI_SPEED_33MHz))) { 265 - err("%s: Issue of set bus speed mode command failed\n", __FUNCTION__); 265 + err("%s: Issue of set bus speed mode command failed\n", __func__); 266 266 return WRONG_BUS_FREQUENCY; 267 267 } 268 268 269 269 /* turn on board, blink green LED, turn off Amber LED */ 270 270 if ((rc = p_slot->hpc_ops->slot_enable(p_slot))) { 271 - err("%s: Issue of Slot Enable command failed\n", __FUNCTION__); 271 + err("%s: Issue of Slot Enable command failed\n", __func__); 272 272 return rc; 273 273 } 274 274 } ··· 276 276 rc = p_slot->hpc_ops->get_adapter_speed(p_slot, &asp); 277 277 if (rc) { 278 278 err("%s: Can't get adapter speed or bus mode mismatch\n", 279 - __FUNCTION__); 279 + __func__); 280 280 return WRONG_BUS_FREQUENCY; 281 281 } 282 282 283 283 rc = p_slot->hpc_ops->get_cur_bus_speed(p_slot, &bsp); 284 284 if (rc) { 285 - err("%s: Can't get bus operation speed\n", __FUNCTION__); 285 + err("%s: Can't get bus operation speed\n", __func__); 286 286 return WRONG_BUS_FREQUENCY; 287 287 } 288 288 289 289 rc = p_slot->hpc_ops->get_max_bus_speed(p_slot, &msp); 290 290 if (rc) { 291 - err("%s: Can't get max bus operation speed\n", __FUNCTION__); 291 + err("%s: Can't get max bus operation speed\n", __func__); 292 292 msp = bsp; 293 293 } 294 294 ··· 297 297 slots_not_empty = 1; 298 298 299 299 dbg("%s: slots_not_empty %d, adapter_speed %d, bus_speed %d, " 300 - "max_bus_speed %d\n", __FUNCTION__, slots_not_empty, asp, 300 + "max_bus_speed %d\n", __func__, slots_not_empty, asp, 301 301 bsp, msp); 302 302 303 303 rc = fix_bus_speed(ctrl, p_slot, slots_not_empty, asp, bsp, msp); ··· 306 306 307 307 /* turn on board, blink green LED, turn off Amber LED */ 308 308 if ((rc = p_slot->hpc_ops->slot_enable(p_slot))) { 309 - err("%s: Issue of Slot Enable command failed\n", __FUNCTION__); 309 + err("%s: Issue of Slot Enable command failed\n", __func__); 310 310 return rc; 311 311 } 312 312 313 313 /* Wait for ~1 second */ 314 314 msleep(1000); 315 315 316 - dbg("%s: slot status = %x\n", __FUNCTION__, p_slot->status); 316 + dbg("%s: slot status = %x\n", __func__, p_slot->status); 317 317 /* Check for a power fault */ 318 318 if (p_slot->status == 0xFF) { 319 319 /* power fault occurred, but it was benign */ 320 - dbg("%s: power fault\n", __FUNCTION__); 320 + dbg("%s: power fault\n", __func__); 321 321 rc = POWER_FAILURE; 322 322 p_slot->status = 0; 323 323 goto err_exit; ··· 341 341 /* turn off slot, turn on Amber LED, turn off Green LED */ 342 342 rc = p_slot->hpc_ops->slot_disable(p_slot); 343 343 if (rc) { 344 - err("%s: Issue of Slot Disable command failed\n", __FUNCTION__); 344 + err("%s: Issue of Slot Disable command failed\n", __func__); 345 345 return rc; 346 346 } 347 347 ··· 365 365 hp_slot = p_slot->device - ctrl->slot_device_offset; 366 366 p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); 367 367 368 - dbg("In %s, hp_slot = %d\n", __FUNCTION__, hp_slot); 368 + dbg("In %s, hp_slot = %d\n", __func__, hp_slot); 369 369 370 370 /* Change status to shutdown */ 371 371 if (p_slot->is_a_board) ··· 374 374 /* turn off slot, turn on Amber LED, turn off Green LED */ 375 375 rc = p_slot->hpc_ops->slot_disable(p_slot); 376 376 if (rc) { 377 - err("%s: Issue of Slot Disable command failed\n", __FUNCTION__); 377 + err("%s: Issue of Slot Disable command failed\n", __func__); 378 378 return rc; 379 379 } 380 380 381 381 rc = p_slot->hpc_ops->set_attention_status(p_slot, 0); 382 382 if (rc) { 383 - err("%s: Issue of Set Attention command failed\n", __FUNCTION__); 383 + err("%s: Issue of Set Attention command failed\n", __func__); 384 384 return rc; 385 385 } 386 386 ··· 439 439 440 440 info = kmalloc(sizeof(*info), GFP_KERNEL); 441 441 if (!info) { 442 - err("%s: Cannot allocate memory\n", __FUNCTION__); 442 + err("%s: Cannot allocate memory\n", __func__); 443 443 return; 444 444 } 445 445 info->p_slot = p_slot; ··· 513 513 * expires to cancel hot-add or hot-remove 514 514 */ 515 515 info("Button cancel on Slot(%s)\n", p_slot->name); 516 - dbg("%s: button cancel\n", __FUNCTION__); 516 + dbg("%s: button cancel\n", __func__); 517 517 cancel_delayed_work(&p_slot->work); 518 518 if (p_slot->state == BLINKINGOFF_STATE) 519 519 p_slot->hpc_ops->green_led_on(p_slot); ··· 551 551 handle_button_press_event(p_slot); 552 552 break; 553 553 case INT_POWER_FAULT: 554 - dbg("%s: power fault\n", __FUNCTION__); 554 + dbg("%s: power fault\n", __func__); 555 555 p_slot->hpc_ops->set_attention_status(p_slot, 1); 556 556 p_slot->hpc_ops->green_led_off(p_slot); 557 557 break; ··· 593 593 /* We have to save the presence info for these slots */ 594 594 p_slot->hpc_ops->get_adapter_status(p_slot, &(p_slot->presence_save)); 595 595 p_slot->hpc_ops->get_power_status(p_slot, &(p_slot->pwr_save)); 596 - dbg("%s: p_slot->pwr_save %x\n", __FUNCTION__, p_slot->pwr_save); 596 + dbg("%s: p_slot->pwr_save %x\n", __func__, p_slot->pwr_save); 597 597 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); 598 598 599 599 if(((p_slot->ctrl->pci_dev->vendor == PCI_VENDOR_ID_AMD) ||
+32 -32
drivers/pci/hotplug/shpchp_hpc.c
··· 321 321 if (!shpc_poll_ctrl_busy(ctrl)) { 322 322 /* After 1 sec and and the controller is still busy */ 323 323 err("%s : Controller is still busy after 1 sec.\n", 324 - __FUNCTION__); 324 + __func__); 325 325 retval = -EBUSY; 326 326 goto out; 327 327 } 328 328 329 329 ++t_slot; 330 330 temp_word = (t_slot << 8) | (cmd & 0xFF); 331 - dbg("%s: t_slot %x cmd %x\n", __FUNCTION__, t_slot, cmd); 331 + dbg("%s: t_slot %x cmd %x\n", __func__, t_slot, cmd); 332 332 333 333 /* To make sure the Controller Busy bit is 0 before we send out the 334 334 * command. ··· 345 345 cmd_status = hpc_check_cmd_status(slot->ctrl); 346 346 if (cmd_status) { 347 347 err("%s: Failed to issued command 0x%x (error code = %d)\n", 348 - __FUNCTION__, cmd, cmd_status); 348 + __func__, cmd, cmd_status); 349 349 retval = -EIO; 350 350 } 351 351 out: ··· 364 364 break; 365 365 case 1: 366 366 retval = SWITCH_OPEN; 367 - err("%s: Switch opened!\n", __FUNCTION__); 367 + err("%s: Switch opened!\n", __func__); 368 368 break; 369 369 case 2: 370 370 retval = INVALID_CMD; 371 - err("%s: Invalid HPC command!\n", __FUNCTION__); 371 + err("%s: Invalid HPC command!\n", __func__); 372 372 break; 373 373 case 4: 374 374 retval = INVALID_SPEED_MODE; 375 - err("%s: Invalid bus speed/mode!\n", __FUNCTION__); 375 + err("%s: Invalid bus speed/mode!\n", __func__); 376 376 break; 377 377 default: 378 378 retval = cmd_status; ··· 484 484 } 485 485 486 486 dbg("%s: slot_reg = %x, pcix_cap = %x, m66_cap = %x\n", 487 - __FUNCTION__, slot_reg, pcix_cap, m66_cap); 487 + __func__, slot_reg, pcix_cap, m66_cap); 488 488 489 489 switch (pcix_cap) { 490 490 case 0x0: ··· 629 629 630 630 retval = shpc_write_cmd(slot, slot->hp_slot, SET_SLOT_PWR); 631 631 if (retval) 632 - err("%s: Write command failed!\n", __FUNCTION__); 632 + err("%s: Write command failed!\n", __func__); 633 633 634 634 return retval; 635 635 } ··· 642 642 retval = shpc_write_cmd(slot, slot->hp_slot, 643 643 SET_SLOT_ENABLE | SET_PWR_BLINK | SET_ATTN_OFF); 644 644 if (retval) 645 - err("%s: Write command failed!\n", __FUNCTION__); 645 + err("%s: Write command failed!\n", __func__); 646 646 647 647 return retval; 648 648 } ··· 655 655 retval = shpc_write_cmd(slot, slot->hp_slot, 656 656 SET_SLOT_DISABLE | SET_PWR_OFF | SET_ATTN_ON); 657 657 if (retval) 658 - err("%s: Write command failed!\n", __FUNCTION__); 658 + err("%s: Write command failed!\n", __func__); 659 659 660 660 return retval; 661 661 } ··· 719 719 720 720 retval = shpc_write_cmd(slot, 0, cmd); 721 721 if (retval) 722 - err("%s: Write command failed!\n", __FUNCTION__); 722 + err("%s: Write command failed!\n", __func__); 723 723 724 724 return retval; 725 725 } ··· 735 735 if (!intr_loc) 736 736 return IRQ_NONE; 737 737 738 - dbg("%s: intr_loc = %x\n",__FUNCTION__, intr_loc); 738 + dbg("%s: intr_loc = %x\n",__func__, intr_loc); 739 739 740 740 if(!shpchp_poll_mode) { 741 741 /* ··· 748 748 shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int); 749 749 750 750 intr_loc2 = shpc_readl(ctrl, INTR_LOC); 751 - dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); 751 + dbg("%s: intr_loc2 = %x\n",__func__, intr_loc2); 752 752 } 753 753 754 754 if (intr_loc & CMD_INTR_PENDING) { ··· 774 774 775 775 slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); 776 776 dbg("%s: Slot %x with intr, slot register = %x\n", 777 - __FUNCTION__, hp_slot, slot_reg); 777 + __func__, hp_slot, slot_reg); 778 778 779 779 if (slot_reg & MRL_CHANGE_DETECTED) 780 780 shpchp_handle_switch_change(hp_slot, ctrl); ··· 958 958 } else { 959 959 ctrl->cap_offset = pci_find_capability(pdev, PCI_CAP_ID_SHPC); 960 960 if (!ctrl->cap_offset) { 961 - err("%s : cap_offset == 0\n", __FUNCTION__); 961 + err("%s : cap_offset == 0\n", __func__); 962 962 goto abort; 963 963 } 964 - dbg("%s: cap_offset = %x\n", __FUNCTION__, ctrl->cap_offset); 964 + dbg("%s: cap_offset = %x\n", __func__, ctrl->cap_offset); 965 965 966 966 rc = shpc_indirect_read(ctrl, 0, &shpc_base_offset); 967 967 if (rc) { 968 - err("%s: cannot read base_offset\n", __FUNCTION__); 968 + err("%s: cannot read base_offset\n", __func__); 969 969 goto abort; 970 970 } 971 971 972 972 rc = shpc_indirect_read(ctrl, 3, &tempdword); 973 973 if (rc) { 974 - err("%s: cannot read slot config\n", __FUNCTION__); 974 + err("%s: cannot read slot config\n", __func__); 975 975 goto abort; 976 976 } 977 977 num_slots = tempdword & SLOT_NUM; 978 - dbg("%s: num_slots (indirect) %x\n", __FUNCTION__, num_slots); 978 + dbg("%s: num_slots (indirect) %x\n", __func__, num_slots); 979 979 980 980 for (i = 0; i < 9 + num_slots; i++) { 981 981 rc = shpc_indirect_read(ctrl, i, &tempdword); 982 982 if (rc) { 983 983 err("%s: cannot read creg (index = %d)\n", 984 - __FUNCTION__, i); 984 + __func__, i); 985 985 goto abort; 986 986 } 987 - dbg("%s: offset %d: value %x\n", __FUNCTION__,i, 987 + dbg("%s: offset %d: value %x\n", __func__,i, 988 988 tempdword); 989 989 } 990 990 ··· 998 998 999 999 rc = pci_enable_device(pdev); 1000 1000 if (rc) { 1001 - err("%s: pci_enable_device failed\n", __FUNCTION__); 1001 + err("%s: pci_enable_device failed\n", __func__); 1002 1002 goto abort; 1003 1003 } 1004 1004 1005 1005 if (!request_mem_region(ctrl->mmio_base, ctrl->mmio_size, MY_NAME)) { 1006 - err("%s: cannot reserve MMIO region\n", __FUNCTION__); 1006 + err("%s: cannot reserve MMIO region\n", __func__); 1007 1007 rc = -1; 1008 1008 goto abort; 1009 1009 } 1010 1010 1011 1011 ctrl->creg = ioremap(ctrl->mmio_base, ctrl->mmio_size); 1012 1012 if (!ctrl->creg) { 1013 - err("%s: cannot remap MMIO region %lx @ %lx\n", __FUNCTION__, 1013 + err("%s: cannot remap MMIO region %lx @ %lx\n", __func__, 1014 1014 ctrl->mmio_size, ctrl->mmio_base); 1015 1015 release_mem_region(ctrl->mmio_base, ctrl->mmio_size); 1016 1016 rc = -1; 1017 1017 goto abort; 1018 1018 } 1019 - dbg("%s: ctrl->creg %p\n", __FUNCTION__, ctrl->creg); 1019 + dbg("%s: ctrl->creg %p\n", __func__, ctrl->creg); 1020 1020 1021 1021 mutex_init(&ctrl->crit_sect); 1022 1022 mutex_init(&ctrl->cmd_lock); ··· 1035 1035 1036 1036 /* Mask Global Interrupt Mask & Command Complete Interrupt Mask */ 1037 1037 tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); 1038 - dbg("%s: SERR_INTR_ENABLE = %x\n", __FUNCTION__, tempdword); 1038 + dbg("%s: SERR_INTR_ENABLE = %x\n", __func__, tempdword); 1039 1039 tempdword |= (GLOBAL_INTR_MASK | GLOBAL_SERR_MASK | 1040 1040 COMMAND_INTR_MASK | ARBITER_SERR_MASK); 1041 1041 tempdword &= ~SERR_INTR_RSVDZ_MASK; 1042 1042 shpc_writel(ctrl, SERR_INTR_ENABLE, tempdword); 1043 1043 tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); 1044 - dbg("%s: SERR_INTR_ENABLE = %x\n", __FUNCTION__, tempdword); 1044 + dbg("%s: SERR_INTR_ENABLE = %x\n", __func__, tempdword); 1045 1045 1046 1046 /* Mask the MRL sensor SERR Mask of individual slot in 1047 1047 * Slot SERR-INT Mask & clear all the existing event if any 1048 1048 */ 1049 1049 for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) { 1050 1050 slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); 1051 - dbg("%s: Default Logical Slot Register %d value %x\n", __FUNCTION__, 1051 + dbg("%s: Default Logical Slot Register %d value %x\n", __func__, 1052 1052 hp_slot, slot_reg); 1053 1053 slot_reg |= (PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK | 1054 1054 BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK | ··· 1073 1073 rc = request_irq(ctrl->pci_dev->irq, shpc_isr, IRQF_SHARED, 1074 1074 MY_NAME, (void *)ctrl); 1075 1075 dbg("%s: request_irq %d for hpc%d (returns %d)\n", 1076 - __FUNCTION__, ctrl->pci_dev->irq, 1076 + __func__, ctrl->pci_dev->irq, 1077 1077 atomic_read(&shpchp_num_controllers), rc); 1078 1078 if (rc) { 1079 1079 err("Can't get irq %d for the hotplug controller\n", ··· 1081 1081 goto abort_iounmap; 1082 1082 } 1083 1083 } 1084 - dbg("%s: HPC at b:d:f:irq=0x%x:%x:%x:%x\n", __FUNCTION__, 1084 + dbg("%s: HPC at b:d:f:irq=0x%x:%x:%x:%x\n", __func__, 1085 1085 pdev->bus->number, PCI_SLOT(pdev->devfn), 1086 1086 PCI_FUNC(pdev->devfn), pdev->irq); 1087 1087 get_hp_hw_control_from_firmware(pdev); ··· 1103 1103 */ 1104 1104 for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) { 1105 1105 slot_reg = shpc_readl(ctrl, SLOT_REG(hp_slot)); 1106 - dbg("%s: Default Logical Slot Register %d value %x\n", __FUNCTION__, 1106 + dbg("%s: Default Logical Slot Register %d value %x\n", __func__, 1107 1107 hp_slot, slot_reg); 1108 1108 slot_reg &= ~(PRSNT_CHANGE_INTR_MASK | ISO_PFAULT_INTR_MASK | 1109 1109 BUTTON_PRESS_INTR_MASK | MRL_CHANGE_INTR_MASK | ··· 1117 1117 SERR_INTR_RSVDZ_MASK); 1118 1118 shpc_writel(ctrl, SERR_INTR_ENABLE, tempdword); 1119 1119 tempdword = shpc_readl(ctrl, SERR_INTR_ENABLE); 1120 - dbg("%s: SERR_INTR_ENABLE = %x\n", __FUNCTION__, tempdword); 1120 + dbg("%s: SERR_INTR_ENABLE = %x\n", __func__, tempdword); 1121 1121 } 1122 1122 1123 1123 return 0;
+2 -2
drivers/pci/hotplug/shpchp_pci.c
··· 51 51 !hpp.t0 || (hpp.t0->revision > 1)) { 52 52 printk(KERN_WARNING 53 53 "%s: Could not get hotplug parameters. Use defaults\n", 54 - __FUNCTION__); 54 + __func__); 55 55 hpp.t0 = &hpp.type0_data; 56 56 hpp.t0->revision = 0; 57 57 hpp.t0->cache_line_size = 8; ··· 169 169 u8 bctl = 0; 170 170 struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate; 171 171 172 - dbg("%s: bus/dev = %x/%x\n", __FUNCTION__, p_slot->bus, p_slot->device); 172 + dbg("%s: bus/dev = %x/%x\n", __func__, p_slot->bus, p_slot->device); 173 173 174 174 for (j=0; j<8 ; j++) { 175 175 struct pci_dev* temp = pci_get_slot(parent,
+1 -1
drivers/pci/pci.c
··· 425 425 */ 426 426 if (state != PCI_D0 && dev->current_state > state) { 427 427 printk(KERN_ERR "%s(): %s: state=%d, current state=%d\n", 428 - __FUNCTION__, pci_name(dev), state, dev->current_state); 428 + __func__, pci_name(dev), state, dev->current_state); 429 429 return -EINVAL; 430 430 } else if (dev->current_state == state) 431 431 return 0; /* we're already there */
+2 -2
drivers/pci/pcie/aer/aerdrv.c
··· 220 220 /* Alloc rpc data structure */ 221 221 if (!(rpc = aer_alloc_rpc(dev))) { 222 222 printk(KERN_DEBUG "%s: Alloc rpc fails on PCIE device[%s]\n", 223 - __FUNCTION__, device->bus_id); 223 + __func__, device->bus_id); 224 224 aer_remove(dev); 225 225 return -ENOMEM; 226 226 } ··· 229 229 if ((status = request_irq(dev->irq, aer_irq, IRQF_SHARED, "aerdrv", 230 230 dev))) { 231 231 printk(KERN_DEBUG "%s: Request ISR fails on PCIE device[%s]\n", 232 - __FUNCTION__, device->bus_id); 232 + __func__, device->bus_id); 233 233 aer_remove(dev); 234 234 return status; 235 235 }
+1 -1
drivers/pci/pcie/aer/aerdrv_core.c
··· 691 691 e_info.flags |= AER_MULTI_ERROR_VALID_FLAG; 692 692 if (!(s_device = find_source_device(p_device->port, id))) { 693 693 printk(KERN_DEBUG "%s->can't find device of ID%04x\n", 694 - __FUNCTION__, id); 694 + __func__, id); 695 695 continue; 696 696 } 697 697 if (get_device_error_info(to_pci_dev(s_device), &e_info) ==
+2 -2
drivers/pci/pcie/portdrv_core.c
··· 150 150 if (pos) { 151 151 struct msix_entry msix_entries[PCIE_PORT_DEVICE_MAXSERVICES] = 152 152 {{0, 0}, {0, 1}, {0, 2}, {0, 3}}; 153 - printk("%s Found MSIX capability\n", __FUNCTION__); 153 + printk("%s Found MSIX capability\n", __func__); 154 154 status = pci_enable_msix(dev, msix_entries, nvec); 155 155 if (!status) { 156 156 int j = 0; ··· 165 165 if (status) { 166 166 pos = pci_find_capability(dev, PCI_CAP_ID_MSI); 167 167 if (pos) { 168 - printk("%s Found MSI capability\n", __FUNCTION__); 168 + printk("%s Found MSI capability\n", __func__); 169 169 status = pci_enable_msi(dev); 170 170 if (!status) { 171 171 interrupt_mode = PCIE_PORT_MSI_MODE;
+1 -1
drivers/pci/pcie/portdrv_pci.c
··· 93 93 if (!dev->irq && dev->pin) { 94 94 printk(KERN_WARNING 95 95 "%s->Dev[%04x:%04x] has invalid IRQ. Check vendor BIOS\n", 96 - __FUNCTION__, dev->vendor, dev->device); 96 + __func__, dev->vendor, dev->device); 97 97 } 98 98 if (pcie_port_device_register(dev)) { 99 99 pci_disable_device(dev);