summaryrefslogtreecommitdiffstats
path: root/lib/kobject.c
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@collabora.com>2018-12-03 11:44:35 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-06 07:57:03 -0500
commit186bddb28ff9f61250d1b33554321d0bf5d085f6 (patch)
tree3bd5f8a73b4932fdddce73a9f628f055e7496182 /lib/kobject.c
parent3f8e9178538189215b59f726f2449a08362e7074 (diff)
kref/kobject: Improve documentation
The current kref and kobject documentation may be insufficient to understand these common pitfalls regarding object lifetime and object releasing. Add a bit more documentation and improve the warnings seen by the user, pointing to the right piece of documentation. Also, it's important to understand that making fun of people publicly is not at all helpful, doesn't provide any value, and it's not a healthy way of encouraging developers to do better. "Mocking mercilessly" will, if anything, make developers feel bad and go away. This kind of behavior should not be encouraged or justified. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Signed-off-by: Matthias Brugger <mbrugger@suse.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/kobject.c')
-rw-r--r--lib/kobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index 97d86dc17c42..b72e00fd7d09 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -639,7 +639,7 @@ static void kobject_cleanup(struct kobject *kobj)
639 kobject_name(kobj), kobj, __func__, kobj->parent); 639 kobject_name(kobj), kobj, __func__, kobj->parent);
640 640
641 if (t && !t->release) 641 if (t && !t->release)
642 pr_debug("kobject: '%s' (%p): does not have a release() function, it is broken and must be fixed.\n", 642 pr_debug("kobject: '%s' (%p): does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt.\n",
643 kobject_name(kobj), kobj); 643 kobject_name(kobj), kobj);
644 644
645 /* send "remove" if the caller did not do it but sent "add" */ 645 /* send "remove" if the caller did not do it but sent "add" */