diff options
author | Ezequiel Garcia <ezequiel@collabora.com> | 2018-12-03 13:44:35 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-06 13:57:03 +0100 |
commit | 186bddb28ff9f61250d1b33554321d0bf5d085f6 (patch) | |
tree | 3bd5f8a73b4932fdddce73a9f628f055e7496182 /include/linux/kref.h | |
parent | 3f8e9178538189215b59f726f2449a08362e7074 (diff) | |
download | lwn-186bddb28ff9f61250d1b33554321d0bf5d085f6.tar.gz lwn-186bddb28ff9f61250d1b33554321d0bf5d085f6.zip |
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 'include/linux/kref.h')
-rw-r--r-- | include/linux/kref.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/kref.h b/include/linux/kref.h index 29220724bf1c..cb00a0268061 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h @@ -53,10 +53,7 @@ static inline void kref_get(struct kref *kref) * @release: pointer to the function that will clean up the object when the * last reference to the object is released. * This pointer is required, and it is not acceptable to pass kfree - * in as this function. If the caller does pass kfree to this - * function, you will be publicly mocked mercilessly by the kref - * maintainer, and anyone else who happens to notice it. You have - * been warned. + * in as this function. * * Decrement the refcount, and if 0, call release(). * Return 1 if the object was removed, otherwise return 0. Beware, if this |