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
9090 }
9191
9292 pr_debug("kobject: '%s' (%p): %s: path = '%s'\n", kobject_name(kobj),
93− kobj, __FUNCTION__, path);
93+ kobj, __func__, path);
9494 }
9595
9696 /**
@@ -181,7 +181,7 @@ static int kobject_add_internal(struct kobject *kobj) · 84 unmodified lines
181181 }
182182
183183 pr_debug("kobject: '%s' (%p): %s: parent: '%s', set: '%s'\n",
184− kobject_name(kobj), kobj, __FUNCTION__,
184+ kobject_name(kobj), kobj, __func__,
185185 parent ? kobject_name(parent) : "<NULL>",
186186 kobj->kset ? kobject_name(&kobj->kset->kobj) : "<NULL>");
187187
@@ -196,10 +196,10 @@ static int kobject_add_internal(struct kobject *kobj) · 8 unmodified lines
196196 printk(KERN_ERR "%s failed for %s with "
197197 "-EEXIST, don't try to register things with "
198198 "the same name in the same directory.\n",
199− __FUNCTION__, kobject_name(kobj));
199+ __func__, kobject_name(kobj));
200200 else
201201 printk(KERN_ERR "%s failed for %s (%d)\n",
202− __FUNCTION__, kobject_name(kobj), error);
202+ __func__, kobject_name(kobj), error);
203203 dump_stack();
204204 } else
205205 kobj->state_in_sysfs = 1;
@@ -540,7 +540,7 @@ static void kobject_cleanup(struct kobject *kobj) · 334 unmodified lines
540540 const char *name = kobj->name;
541541
542542 pr_debug("kobject: '%s' (%p): %s\n",
543− kobject_name(kobj), kobj, __FUNCTION__);
543+ kobject_name(kobj), kobj, __func__);
544544
545545 if (t && !t->release)
546546 pr_debug("kobject: '%s' (%p): does not have a release() "
@@ -600,7 +600,7 @@ void kobject_put(struct kobject *kobj) · 53 unmodified lines
600600
601601 static void dynamic_kobj_release(struct kobject *kobj)
602602 {
603− pr_debug("kobject: (%p): %s\n", kobj, __FUNCTION__);
603+ pr_debug("kobject: (%p): %s\n", kobj, __func__);
604604 kfree(kobj);
605605 }
606606
@@ -657,7 +657,7 @@ struct kobject *kobject_create_and_add(const char *name, struct kobject *parent) · 50 unmodified lines
657657 retval = kobject_add(kobj, parent, "%s", name);
658658 if (retval) {
659659 printk(KERN_WARNING "%s: kobject_add error: %d\n",
660− __FUNCTION__, retval);
660+ __func__, retval);
661661 kobject_put(kobj);
662662 kobj = NULL;
663663 }
@@ -765,7 +765,7 @@ static void kset_release(struct kobject *kobj) · 101 unmodified lines
765765 {
766766 struct kset *kset = container_of(kobj, struct kset, kobj);
767767 pr_debug("kobject: '%s' (%p): %s\n",
768− kobject_name(kobj), kobj, __FUNCTION__);
768+ kobject_name(kobj), kobj, __func__);
769769 kfree(kset);
770770 }
771771
lib/kobject_uevent.c+5−5
@@ -101,7 +101,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, · 100 unmodified lines
101101 int retval = 0;
102102
103103 pr_debug("kobject: '%s' (%p): %s\n",
104− kobject_name(kobj), kobj, __FUNCTION__);
104+ kobject_name(kobj), kobj, __func__);
105105
106106 /* search the kset we belong to */
107107 top_kobj = kobj;
@@ -111,7 +111,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, · 3 unmodified lines
111111 if (!top_kobj->kset) {
112112 pr_debug("kobject: '%s' (%p): %s: attempted to send uevent "
113113 "without kset!\n", kobject_name(kobj), kobj,
114− __FUNCTION__);
114+ __func__);
115115 return -EINVAL;
116116 }
117117
@@ -123,7 +123,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, · 5 unmodified lines
123123 if (!uevent_ops->filter(kset, kobj)) {
124124 pr_debug("kobject: '%s' (%p): %s: filter function "
125125 "caused the event to drop!\n",
126− kobject_name(kobj), kobj, __FUNCTION__);
126+ kobject_name(kobj), kobj, __func__);
127127 return 0;
128128 }
129129
@@ -135,7 +135,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, · 5 unmodified lines
135135 if (!subsystem) {
136136 pr_debug("kobject: '%s' (%p): %s: unset subsystem caused the "
137137 "event to drop!\n", kobject_name(kobj), kobj,
138− __FUNCTION__);
138+ __func__);
139139 return 0;
140140 }
141141
@@ -177,7 +177,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, · 35 unmodified lines
177177 if (retval) {
178178 pr_debug("kobject: '%s' (%p): %s: uevent() returned "
179179 "%d\n", kobject_name(kobj), kobj,
180− __FUNCTION__, retval);
180+ __func__, retval);
181181 goto exit;
182182 }
183183 }

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