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