__FUNCTION__ is gcc specific, use __func__
Showing the changes to lib (2 of 2 files). Show all
Unified · Split
| @@ -90,7 +90,7 @@ static void fill_kobj_path(struct kobject *kobj, char *path, int length) · 89 unmodified lines | ||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | pr_debug("kobject: '%s' (%p): %s: path = '%s'\n", kobject_name(kobj), |
| 93 | − kobj, __FUNCTION__, path); | |
| 93 | + kobj, __func__, path); | |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
| @@ -181,7 +181,7 @@ static int kobject_add_internal(struct kobject *kobj) · 84 unmodified lines | ||
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | pr_debug("kobject: '%s' (%p): %s: parent: '%s', set: '%s'\n", |
| 184 | − kobject_name(kobj), kobj, __FUNCTION__, | |
| 184 | + kobject_name(kobj), kobj, __func__, | |
| 185 | 185 | parent ? kobject_name(parent) : "<NULL>", |
| 186 | 186 | kobj->kset ? kobject_name(&kobj->kset->kobj) : "<NULL>"); |
| 187 | 187 | |
| @@ -196,10 +196,10 @@ static int kobject_add_internal(struct kobject *kobj) · 8 unmodified lines | ||
| 196 | 196 | printk(KERN_ERR "%s failed for %s with " |
| 197 | 197 | "-EEXIST, don't try to register things with " |
| 198 | 198 | "the same name in the same directory.\n", |
| 199 | − __FUNCTION__, kobject_name(kobj)); | |
| 199 | + __func__, kobject_name(kobj)); | |
| 200 | 200 | else |
| 201 | 201 | printk(KERN_ERR "%s failed for %s (%d)\n", |
| 202 | − __FUNCTION__, kobject_name(kobj), error); | |
| 202 | + __func__, kobject_name(kobj), error); | |
| 203 | 203 | dump_stack(); |
| 204 | 204 | } else |
| 205 | 205 | kobj->state_in_sysfs = 1; |
| @@ -540,7 +540,7 @@ static void kobject_cleanup(struct kobject *kobj) · 334 unmodified lines | ||
| 540 | 540 | const char *name = kobj->name; |
| 541 | 541 | |
| 542 | 542 | pr_debug("kobject: '%s' (%p): %s\n", |
| 543 | − kobject_name(kobj), kobj, __FUNCTION__); | |
| 543 | + kobject_name(kobj), kobj, __func__); | |
| 544 | 544 | |
| 545 | 545 | if (t && !t->release) |
| 546 | 546 | pr_debug("kobject: '%s' (%p): does not have a release() " |
| @@ -600,7 +600,7 @@ void kobject_put(struct kobject *kobj) · 53 unmodified lines | ||
| 600 | 600 | |
| 601 | 601 | static void dynamic_kobj_release(struct kobject *kobj) |
| 602 | 602 | { |
| 603 | − pr_debug("kobject: (%p): %s\n", kobj, __FUNCTION__); | |
| 603 | + pr_debug("kobject: (%p): %s\n", kobj, __func__); | |
| 604 | 604 | kfree(kobj); |
| 605 | 605 | } |
| 606 | 606 | |
| @@ -657,7 +657,7 @@ struct kobject *kobject_create_and_add(const char *name, struct kobject *parent) · 50 unmodified lines | ||
| 657 | 657 | retval = kobject_add(kobj, parent, "%s", name); |
| 658 | 658 | if (retval) { |
| 659 | 659 | printk(KERN_WARNING "%s: kobject_add error: %d\n", |
| 660 | − __FUNCTION__, retval); | |
| 660 | + __func__, retval); | |
| 661 | 661 | kobject_put(kobj); |
| 662 | 662 | kobj = NULL; |
| 663 | 663 | } |
| @@ -765,7 +765,7 @@ static void kset_release(struct kobject *kobj) · 101 unmodified lines | ||
| 765 | 765 | { |
| 766 | 766 | struct kset *kset = container_of(kobj, struct kset, kobj); |
| 767 | 767 | pr_debug("kobject: '%s' (%p): %s\n", |
| 768 | − kobject_name(kobj), kobj, __FUNCTION__); | |
| 768 | + kobject_name(kobj), kobj, __func__); | |
| 769 | 769 | kfree(kset); |
| 770 | 770 | } |
| 771 | 771 | |
| @@ -101,7 +101,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, · 100 unmodified lines | ||
| 101 | 101 | int retval = 0; |
| 102 | 102 | |
| 103 | 103 | pr_debug("kobject: '%s' (%p): %s\n", |
| 104 | − kobject_name(kobj), kobj, __FUNCTION__); | |
| 104 | + kobject_name(kobj), kobj, __func__); | |
| 105 | 105 | |
| 106 | 106 | /* search the kset we belong to */ |
| 107 | 107 | top_kobj = kobj; |
| @@ -111,7 +111,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, · 3 unmodified lines | ||
| 111 | 111 | if (!top_kobj->kset) { |
| 112 | 112 | pr_debug("kobject: '%s' (%p): %s: attempted to send uevent " |
| 113 | 113 | "without kset!\n", kobject_name(kobj), kobj, |
| 114 | − __FUNCTION__); | |
| 114 | + __func__); | |
| 115 | 115 | return -EINVAL; |
| 116 | 116 | } |
| 117 | 117 | |
| @@ -123,7 +123,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, · 5 unmodified lines | ||
| 123 | 123 | if (!uevent_ops->filter(kset, kobj)) { |
| 124 | 124 | pr_debug("kobject: '%s' (%p): %s: filter function " |
| 125 | 125 | "caused the event to drop!\n", |
| 126 | − kobject_name(kobj), kobj, __FUNCTION__); | |
| 126 | + kobject_name(kobj), kobj, __func__); | |
| 127 | 127 | return 0; |
| 128 | 128 | } |
| 129 | 129 | |
| @@ -135,7 +135,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, · 5 unmodified lines | ||
| 135 | 135 | if (!subsystem) { |
| 136 | 136 | pr_debug("kobject: '%s' (%p): %s: unset subsystem caused the " |
| 137 | 137 | "event to drop!\n", kobject_name(kobj), kobj, |
| 138 | − __FUNCTION__); | |
| 138 | + __func__); | |
| 139 | 139 | return 0; |
| 140 | 140 | } |
| 141 | 141 | |
| @@ -177,7 +177,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, · 35 unmodified lines | ||
| 177 | 177 | if (retval) { |
| 178 | 178 | pr_debug("kobject: '%s' (%p): %s: uevent() returned " |
| 179 | 179 | "%d\n", kobject_name(kobj), kobj, |
| 180 | − __FUNCTION__, retval); | |
| 180 | + __func__, retval); | |
| 181 | 181 | goto exit; |
| 182 | 182 | } |
| 183 | 183 | } |