From: Harvey Harrison __FUNCTION__ is gcc specific, use __func__ Signed-off-by: Harvey Harrison Signed-off-by: Andrew Morton --- lib/kobject.c | 16 ++++++++-------- lib/kobject_uevent.c | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff -puN lib/kobject.c~lib-replace-remaining-__function__-occurances lib/kobject.c --- a/lib/kobject.c~lib-replace-remaining-__function__-occurances +++ a/lib/kobject.c @@ -146,7 +146,7 @@ static void fill_kobj_path(struct kobjec } pr_debug("kobject: '%s' (%p): %s: path = '%s'\n", kobject_name(kobj), - kobj, __FUNCTION__, path); + kobj, __func__, path); } /** @@ -237,7 +237,7 @@ static int kobject_add_internal(struct k } pr_debug("kobject: '%s' (%p): %s: parent: '%s', set: '%s'\n", - kobject_name(kobj), kobj, __FUNCTION__, + kobject_name(kobj), kobj, __func__, parent ? kobject_name(parent) : "", kobj->kset ? kobject_name(&kobj->kset->kobj) : ""); @@ -252,10 +252,10 @@ static int kobject_add_internal(struct k printk(KERN_ERR "%s failed for %s with " "-EEXIST, don't try to register things with " "the same name in the same directory.\n", - __FUNCTION__, kobject_name(kobj)); + __func__, kobject_name(kobj)); else printk(KERN_ERR "%s failed for %s (%d)\n", - __FUNCTION__, kobject_name(kobj), error); + __func__, kobject_name(kobj), error); dump_stack(); } else kobj->state_in_sysfs = 1; @@ -597,7 +597,7 @@ static void kobject_cleanup(struct kobje const char *name = kobj->name; pr_debug("kobject: '%s' (%p): %s\n", - kobject_name(kobj), kobj, __FUNCTION__); + kobject_name(kobj), kobj, __func__); /* Set the state to uninitialized */ kobj->state_initialized = 0; @@ -660,7 +660,7 @@ void kobject_put(struct kobject *kobj) static void dynamic_kobj_release(struct kobject *kobj) { - pr_debug("kobject: (%p): %s\n", kobj, __FUNCTION__); + pr_debug("kobject: (%p): %s\n", kobj, __func__); kfree(kobj); } @@ -717,7 +717,7 @@ struct kobject *kobject_create_and_add(c retval = kobject_add(kobj, parent, "%s", name); if (retval) { printk(KERN_WARNING "%s: kobject_add error: %d\n", - __FUNCTION__, retval); + __func__, retval); kobject_put(kobj); kobj = NULL; } @@ -826,7 +826,7 @@ static void kset_release(struct kobject { struct kset *kset = container_of(kobj, struct kset, kobj); pr_debug("kobject: '%s' (%p): %s\n", - kobject_name(kobj), kobj, __FUNCTION__); + kobject_name(kobj), kobj, __func__); kfree(kset); } diff -puN lib/kobject_uevent.c~lib-replace-remaining-__function__-occurances lib/kobject_uevent.c --- a/lib/kobject_uevent.c~lib-replace-remaining-__function__-occurances +++ a/lib/kobject_uevent.c @@ -99,7 +99,7 @@ int kobject_uevent_env(struct kobject *k int retval = 0; pr_debug("kobject: '%s' (%p): %s\n", - kobject_name(kobj), kobj, __FUNCTION__); + kobject_name(kobj), kobj, __func__); /* search the kset we belong to */ top_kobj = kobj; @@ -109,7 +109,7 @@ int kobject_uevent_env(struct kobject *k if (!top_kobj->kset) { pr_debug("kobject: '%s' (%p): %s: attempted to send uevent " "without kset!\n", kobject_name(kobj), kobj, - __FUNCTION__); + __func__); return -EINVAL; } @@ -121,7 +121,7 @@ int kobject_uevent_env(struct kobject *k if (!uevent_ops->filter(kset, kobj)) { pr_debug("kobject: '%s' (%p): %s: filter function " "caused the event to drop!\n", - kobject_name(kobj), kobj, __FUNCTION__); + kobject_name(kobj), kobj, __func__); return 0; } @@ -133,7 +133,7 @@ int kobject_uevent_env(struct kobject *k if (!subsystem) { pr_debug("kobject: '%s' (%p): %s: unset subsystem caused the " "event to drop!\n", kobject_name(kobj), kobj, - __FUNCTION__); + __func__); return 0; } @@ -175,7 +175,7 @@ int kobject_uevent_env(struct kobject *k if (retval) { pr_debug("kobject: '%s' (%p): %s: uevent() returned " "%d\n", kobject_name(kobj), kobj, - __FUNCTION__, retval); + __func__, retval); goto exit; } } _