History

lib: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc specific, use __func__

Harvey Harrison committed 18 years ago

Commit 810304d1 parent af1f16d2 files · +13 −13Browse files

Showing the changes to lib (2 of 2 files). Show all

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t