summaryrefslogtreecommitdiffstats
path: root/Documentation/kobject.txt
AgeCommit message (Collapse)AuthorFilesLines
2018-12-06kref/kobject: Improve documentationEzequiel Garcia1-3/+7
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>
2017-07-14kobject.txt: standardize document formatMauro Carvalho Chehab1-27/+42
Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - Add markups for titles; - mark literal blocks as such; - add needed whitespace/blank lines; - use :Author: and :Last updated: for authorship. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2014-12-08kobject: grammar fixJohn de la Garza1-1/+1
Signed-off-by: John de la Garza <john@jjdev.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2013-12-07kobject: remove kset from sysfs immediately in kset_unregister()Bjorn Helgaas1-1/+4
There's no "unlink from sysfs" interface for ksets, so I think callers of kset_unregister() expect the kset to be removed from sysfs immediately, without waiting for the last reference to be released. This patch makes the sysfs removal happen immediately, so the caller may create a new kset with the same name as soon as kset_unregister() returns. Without this, every caller has to call "kobject_del(&kset->kobj)" first unless it knows it will never create a new kset with the same name. This sometimes shows up on module unload and reload, where the reload fails because it tries to create a kobject with the same name as one from the original load that still exists. CONFIG_DEBUG_KOBJECT_RELEASE=y makes this problem easier to hit. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04Documentation: Fix "struct kobj_type" to include newer members.Robert P. J. Day1-2/+4
kobj_type replaced by verbatim copy-and-paste from kobject.h. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15driver-core: documentation: fix up Greg's email addressGreg Kroah-Hartman1-1/+1
My old email address was used in a lot of documentation files, so fix this up to point to the correct one now. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2010-03-19kobject: documentation: Update to refer to kset-example.c.Robert P. J. Day1-1/+2
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-19kobject: documentation: Fix erroneous example in kobject doc.Robert P. J. Day1-19/+38
Replace uio_mem example for kobjects with uio_map, since the uio_mem struct no longer contains a kobject. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-07Driver core: Constify struct sysfs_ops in struct kobj_typeEmese Revfy1-1/+1
Constify struct sysfs_ops. This is part of the ops structure constification effort started by Arjan van de Ven et al. Benefits of this constification: * prevents modification of data that is shared (referenced) by many other structure instances at runtime * detects/prevents accidental (but not intentional) modification attempts on archs that enforce read-only kernel data at runtime * potentially better optimized code as the compiler can assume that the const data cannot be changed * the compiler/linker move const data into .rodata and therefore exclude them from false sharing Signed-off-by: Emese Revfy <re.emese@gmail.com> Acked-by: David Teigland <teigland@redhat.com> Acked-by: Matt Domsch <Matt_Domsch@dell.com> Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Acked-by: Hans J. Koch <hjk@linutronix.de> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: Jens Axboe <jens.axboe@oracle.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-12trivial: Miscellaneous documentation typo fixesMatt LaPlante1-1/+1
Fix various typos in documentation txts. Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-06kobject: Make Documentation/kobject.txt a little more coherent.Rusty Russell1-2/+2
While reading Documentation/kobject.txt: Note kobject_rename does perform any locking or have a solid notion of what names are valid so the provide must provide their own sanity checking and serialization. I expect better: You never see me hard with time word making sentence coherent stuff. Ever. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16kobject: Fix kobject_rename and !CONFIG_SYSFSEric W. Biederman1-0/+4
When looking at kobject_rename I found two bugs with that exist when sysfs support is disabled in the kernel. kobject_rename does not change the name on the kobject when sysfs support is not compiled in. kobject_rename without locking attempts to check the validity of a rename operation, which the kobject layer simply does not have the infrastructure to do. This patch documents the previously unstated requirement of kobject_rename that is the responsibility of the caller to provide mutual exclusion and to be certain that the new_name for the kobject is valid. This patch modifies sysfs_rename_dir in !CONFIG_SYSFS case to call kobject_set_name to actually change the kobject_name. This patch removes the bogus and misleading check in kobject_rename that attempts to see if a rename is valid. The check is bogus because we do not have the proper locking. The check is misleading because it looks like we can and do perform checking at the kobject level that we don't. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-06-11kobject: Documentation Spelling PatchDavid Brigada1-1/+1
Signed-off-by: David Brigada <brigad@rpi.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: update the kobject/kset documentationGreg Kroah-Hartman1-0/+386
This provides a much-needed kobject and kset documentation update. Thanks to Kay Sievers, Alan Stern, Jonathan Corbet, Randy Dunlap, Jan Engelhardt, and others for reviewing and providing help with this document. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24kobject: remove old, outdated documentation.Greg Kroah-Hartman1-289/+0
As we are replacing the documentation, it's easier to do this in a two stage pass, delete the old file and add the new one. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12driver core: remove subsystem_init()Greg Kroah-Hartman1-1/+0
There is only one user of it, and it is only a wrapper for kset_init(). Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12Driver core: clean up removed functions from the documentationCornelia Huck1-19/+2
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-30kobject: update documentationCornelia Huck1-119/+59
Update kobject documentation: - Update structure definitions. - Remove documentation of removed struct subsystem. (First shot, uevent_ops probably need some documentation as well.) Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-03Fix typos in Documentation/: 'D'-'E'Matt LaPlante1-1/+1
This patch fixes typos in various Documentation txts. This patch addresses some words starting with the letters 'D'-'E'. Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-08-11genhd.c reference in Documentation/kobjects.txtBrandon Philips1-1/+1
block/genhd.c no longer in drivers/. Update Documentation/kobjects.txt Signed-off-by: Brandon Philips <brandon@ifup.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds1-0/+367
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!