Skip to content

Commit 66bef8c

Browse files
hharrisongregkh
authored andcommitted
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>
1 parent ca99eb8 commit 66bef8c

39 files changed

Lines changed: 487 additions & 487 deletions

‎drivers/pci/hotplug/acpi_pcihp.c‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
#define MY_NAME "acpi_pcihp"
3838

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)
4040
#define err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg)
4141
#define info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg)
4242
#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)
7171
default:
7272
printk(KERN_WARNING
7373
"%s: Type 0 Revision %d record not supported\n",
74-
__FUNCTION__, revision);
74+
__func__, revision);
7575
return AE_ERROR;
7676
}
7777
return AE_OK;
@@ -100,7 +100,7 @@ decode_type1_hpx_record(union acpi_object *record, struct hotplug_params *hpx)
100100
default:
101101
printk(KERN_WARNING
102102
"%s: Type 1 Revision %d record not supported\n",
103-
__FUNCTION__, revision);
103+
__func__, revision);
104104
return AE_ERROR;
105105
}
106106
return AE_OK;
@@ -142,7 +142,7 @@ decode_type2_hpx_record(union acpi_object *record, struct hotplug_params *hpx)
142142
default:
143143
printk(KERN_WARNING
144144
"%s: Type 2 Revision %d record not supported\n",
145-
__FUNCTION__, revision);
145+
__func__, revision);
146146
return AE_ERROR;
147147
}
148148
return AE_OK;
@@ -203,7 +203,7 @@ acpi_run_hpx(acpi_handle handle, struct hotplug_params *hpx)
203203
break;
204204
default:
205205
printk(KERN_ERR "%s: Type %d record not supported\n",
206-
__FUNCTION__, type);
206+
__func__, type);
207207
status = AE_ERROR;
208208
goto exit;
209209
}
@@ -235,7 +235,7 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
235235
ret_buf.pointer = kmalloc (ret_buf.length, GFP_KERNEL);
236236
if (!ret_buf.pointer) {
237237
printk(KERN_ERR "%s:%s alloc for _HPP fail\n",
238-
__FUNCTION__, (char *)string.pointer);
238+
__func__, (char *)string.pointer);
239239
kfree(string.pointer);
240240
return AE_NO_MEMORY;
241241
}
@@ -245,7 +245,7 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
245245
break;
246246
default:
247247
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__,
249249
(char *)string.pointer, status);
250250
kfree(string.pointer);
251251
return status;
@@ -254,7 +254,7 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
254254

255255
ext_obj = (union acpi_object *) ret_buf.pointer;
256256
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__,
258258
(char *)string.pointer);
259259
status = AE_ERROR;
260260
goto free_and_return;
@@ -270,7 +270,7 @@ acpi_run_hpp(acpi_handle handle, struct hotplug_params *hpp)
270270
break;
271271
default:
272272
printk(KERN_ERR "%s:%s _HPP obj type incorrect\n",
273-
__FUNCTION__, (char *)string.pointer);
273+
__func__, (char *)string.pointer);
274274
status = AE_ERROR;
275275
goto free_and_return;
276276
}
@@ -311,12 +311,12 @@ acpi_status acpi_run_oshp(acpi_handle handle)
311311
if (ACPI_FAILURE(status))
312312
if (status != AE_NOT_FOUND)
313313
printk(KERN_ERR "%s:%s OSHP fails=0x%x\n",
314-
__FUNCTION__, (char *)string.pointer, status);
314+
__func__, (char *)string.pointer, status);
315315
else
316316
dbg("%s:%s OSHP not found\n",
317-
__FUNCTION__, (char *)string.pointer);
317+
__func__, (char *)string.pointer);
318318
else
319-
pr_debug("%s:%s OSHP passes\n", __FUNCTION__,
319+
pr_debug("%s:%s OSHP passes\n", __func__,
320320
(char *)string.pointer);
321321

322322
kfree(string.pointer);

‎drivers/pci/hotplug/acpiphp_core.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static int enable_slot(struct hotplug_slot *hotplug_slot)
138138
{
139139
struct slot *slot = hotplug_slot->private;
140140

141-
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
141+
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
142142

143143
/* enable the specified slot */
144144
return acpiphp_enable_slot(slot->acpi_slot);
@@ -156,7 +156,7 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
156156
struct slot *slot = hotplug_slot->private;
157157
int retval;
158158

159-
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
159+
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
160160

161161
/* disable the specified slot */
162162
retval = acpiphp_disable_slot(slot->acpi_slot);
@@ -179,7 +179,7 @@ static int disable_slot(struct hotplug_slot *hotplug_slot)
179179
{
180180
int retval = -ENODEV;
181181

182-
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
182+
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
183183

184184
if (attention_info && try_module_get(attention_info->owner)) {
185185
retval = attention_info->set_attn(hotplug_slot, status);
@@ -202,7 +202,7 @@ static int get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
202202
{
203203
struct slot *slot = hotplug_slot->private;
204204

205-
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
205+
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
206206

207207
*value = acpiphp_get_power_status(slot->acpi_slot);
208208

@@ -224,7 +224,7 @@ static int get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value)
224224
{
225225
int retval = -EINVAL;
226226

227-
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
227+
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
228228

229229
if (attention_info && try_module_get(attention_info->owner)) {
230230
retval = attention_info->get_attn(hotplug_slot, value);
@@ -247,7 +247,7 @@ static int get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value)
247247
{
248248
struct slot *slot = hotplug_slot->private;
249249

250-
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
250+
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
251251

252252
*value = acpiphp_get_latch_status(slot->acpi_slot);
253253

@@ -267,7 +267,7 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)
267267
{
268268
struct slot *slot = hotplug_slot->private;
269269

270-
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
270+
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
271271

272272
*value = acpiphp_get_adapter_status(slot->acpi_slot);
273273

@@ -284,7 +284,7 @@ static int get_address(struct hotplug_slot *hotplug_slot, u32 *value)
284284
{
285285
struct slot *slot = hotplug_slot->private;
286286

287-
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
287+
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
288288

289289
*value = acpiphp_get_address(slot->acpi_slot);
290290

@@ -318,7 +318,7 @@ static void release_slot(struct hotplug_slot *hotplug_slot)
318318
{
319319
struct slot *slot = hotplug_slot->private;
320320

321-
dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
321+
dbg("%s - physical_slot = %s\n", __func__, hotplug_slot->name);
322322

323323
kfree(slot->hotplug_slot);
324324
kfree(slot);

‎drivers/pci/hotplug/acpiphp_glue.c‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ static void decode_hpp(struct acpiphp_bridge *bridge)
352352
/* use default numbers */
353353
printk(KERN_WARNING
354354
"%s: Could not get hotplug parameters. Use defaults\n",
355-
__FUNCTION__);
355+
__func__);
356356
bridge->hpp.t0 = &bridge->hpp.type0_data;
357357
bridge->hpp.t0->revision = 0;
358358
bridge->hpp.t0->cache_line_size = 0x10;
@@ -534,7 +534,7 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
534534

535535
status = acpi_evaluate_integer(handle, "_ADR", NULL, &tmp);
536536
if (ACPI_FAILURE(status)) {
537-
dbg("%s: _ADR evaluation failure\n", __FUNCTION__);
537+
dbg("%s: _ADR evaluation failure\n", __func__);
538538
return AE_OK;
539539
}
540540

@@ -578,7 +578,7 @@ static int add_bridge(acpi_handle handle)
578578
if (ACPI_SUCCESS(status)) {
579579
status = acpi_evaluate_integer(handle, "_STA", NULL, &tmp);
580580
if (ACPI_FAILURE(status)) {
581-
dbg("%s: _STA evaluation failure\n", __FUNCTION__);
581+
dbg("%s: _STA evaluation failure\n", __func__);
582582
return 0;
583583
}
584584
if ((tmp & ACPI_STA_FUNCTIONING) == 0)
@@ -928,10 +928,10 @@ static int power_on_slot(struct acpiphp_slot *slot)
928928
func = list_entry(l, struct acpiphp_func, sibling);
929929

930930
if (func->flags & FUNC_HAS_PS0) {
931-
dbg("%s: executing _PS0\n", __FUNCTION__);
931+
dbg("%s: executing _PS0\n", __func__);
932932
status = acpi_evaluate_object(func->handle, "_PS0", NULL, NULL);
933933
if (ACPI_FAILURE(status)) {
934-
warn("%s: _PS0 failed\n", __FUNCTION__);
934+
warn("%s: _PS0 failed\n", __func__);
935935
retval = -1;
936936
goto err_exit;
937937
} else
@@ -966,7 +966,7 @@ static int power_off_slot(struct acpiphp_slot *slot)
966966
if (func->flags & FUNC_HAS_PS3) {
967967
status = acpi_evaluate_object(func->handle, "_PS3", NULL, NULL);
968968
if (ACPI_FAILURE(status)) {
969-
warn("%s: _PS3 failed\n", __FUNCTION__);
969+
warn("%s: _PS3 failed\n", __func__);
970970
retval = -1;
971971
goto err_exit;
972972
} else
@@ -1300,7 +1300,7 @@ int acpiphp_eject_slot(struct acpiphp_slot *slot)
13001300

13011301
status = acpi_evaluate_object(func->handle, "_EJ0", &arg_list, NULL);
13021302
if (ACPI_FAILURE(status)) {
1303-
warn("%s: _EJ0 failed\n", __FUNCTION__);
1303+
warn("%s: _EJ0 failed\n", __func__);
13041304
return -1;
13051305
} else
13061306
break;
@@ -1349,7 +1349,7 @@ static int acpiphp_check_bridge(struct acpiphp_bridge *bridge)
13491349
}
13501350
}
13511351

1352-
dbg("%s: %d enabled, %d disabled\n", __FUNCTION__, enabled, disabled);
1352+
dbg("%s: %d enabled, %d disabled\n", __func__, enabled, disabled);
13531353

13541354
err_exit:
13551355
return retval;
@@ -1527,7 +1527,7 @@ check_sub_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
15271527
if (bridge) {
15281528
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
15291529
dbg("%s: re-enumerating slots under %s\n",
1530-
__FUNCTION__, objname);
1530+
__func__, objname);
15311531
acpiphp_check_bridge(bridge);
15321532
}
15331533
return AE_OK ;
@@ -1572,10 +1572,10 @@ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *cont
15721572
switch (type) {
15731573
case ACPI_NOTIFY_BUS_CHECK:
15741574
/* 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);
15761576
if (bridge) {
15771577
dbg("%s: re-enumerating slots under %s\n",
1578-
__FUNCTION__, objname);
1578+
__func__, objname);
15791579
acpiphp_check_bridge(bridge);
15801580
}
15811581
if (num_sub_bridges)
@@ -1585,18 +1585,18 @@ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *cont
15851585

15861586
case ACPI_NOTIFY_DEVICE_CHECK:
15871587
/* device check */
1588-
dbg("%s: Device check notify on %s\n", __FUNCTION__, objname);
1588+
dbg("%s: Device check notify on %s\n", __func__, objname);
15891589
acpiphp_check_bridge(bridge);
15901590
break;
15911591

15921592
case ACPI_NOTIFY_DEVICE_WAKE:
15931593
/* wake event */
1594-
dbg("%s: Device wake notify on %s\n", __FUNCTION__, objname);
1594+
dbg("%s: Device wake notify on %s\n", __func__, objname);
15951595
break;
15961596

15971597
case ACPI_NOTIFY_EJECT_REQUEST:
15981598
/* 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);
16001600
if ((bridge->type != BRIDGE_TYPE_HOST) &&
16011601
(bridge->flags & BRIDGE_HAS_EJ0)) {
16021602
struct acpiphp_slot *slot;
@@ -1649,24 +1649,24 @@ static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *contex
16491649
switch (type) {
16501650
case ACPI_NOTIFY_BUS_CHECK:
16511651
/* 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);
16531653
acpiphp_enable_slot(func->slot);
16541654
break;
16551655

16561656
case ACPI_NOTIFY_DEVICE_CHECK:
16571657
/* 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);
16591659
acpiphp_check_bridge(func->slot->bridge);
16601660
break;
16611661

16621662
case ACPI_NOTIFY_DEVICE_WAKE:
16631663
/* wake event */
1664-
dbg("%s: Device wake notify on %s\n", __FUNCTION__, objname);
1664+
dbg("%s: Device wake notify on %s\n", __func__, objname);
16651665
break;
16661666

16671667
case ACPI_NOTIFY_EJECT_REQUEST:
16681668
/* 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);
16701670
if (!(acpiphp_disable_slot(func->slot)))
16711671
acpiphp_eject_slot(func->slot);
16721672
break;
@@ -1796,7 +1796,7 @@ int acpiphp_enable_slot(struct acpiphp_slot *slot)
17961796
if (retval)
17971797
power_off_slot(slot);
17981798
} 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__);
18001800
power_off_slot(slot);
18011801
}
18021802

0 commit comments

Comments
 (0)