#
5a242d85 |
|
03-Mar-2022 |
Nguyen Dinh Phi <phind.uet@gmail.com> |
samples/kobject: Use sysfs_emit instead of sprintf sysfs_emit() is preferred over sprintf() when formatting the value to be returned to user space in show() functions, because it knows about sysfs buffer specifics and has sanity checks. Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com> Link: https://lore.kernel.org/r/20220303183618.1342358-1-phind.uet@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
045c5f75 |
|
07-Nov-2017 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
kobject: Remove redundant license text Now that the SPDX tag is in all kobject files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
d9d16e16 |
|
07-Nov-2017 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
kobject: add SPDX identifiers to all kobject files It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the kobject files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
07afb6ac |
|
25-Mar-2015 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
samples/kobject: be explicit in the module license Rusty pointed out that the module license should be "GPL v2" to properly match the notice at the top of the files, so make that change. Reported-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
5fd637e7 |
|
17-Dec-2014 |
Rastislav Barlik <barlik@zoho.com> |
samples/kobject: Use kstrtoint instead of sscanf Use kstrtoint function instead of sscanf and check for return values. Signed-off-by: Rastislav Barlik <barlik@zoho.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
de510989 |
|
13-May-2014 |
Rusty Russell <rusty@rustcorp.com.au> |
samples/kobject/: avoid world-writable sysfs files. In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Greg Kroah-Hartman <greg@kroah.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
|
#
a115bc07 |
|
12-Dec-2009 |
Radu Voicilas <rvoicilas@gmail.com> |
kobject-example: Spelling fixes. No change in functionality. Signed-off-by: Radu Voicilas <rvoicilas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
#
7ec7fb39 |
|
06-Jan-2009 |
Qinghuang Feng <qhfeng.kernel@gmail.com> |
samples: mark {static|__init|__exit} for {init|exit} functions None of these (init|exit) functions is called from other functions which is outside the kernel module mechanism or kernel itself, so mark them as {static|__init|__exit}. Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
#
40efcb05 |
|
27-Nov-2007 |
Greg Kroah-Hartman <gregkh@suse.de> |
kobject: add sample code for how to use kobjects in a simple manner. This is a simple kobject module, showing how to use kobj_attributes in basic and more complex ways. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|