<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/samples/kobject/kobject-example.c, branch v6.17-rc3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>samples/kobject: make attribute_group const</title>
<updated>2025-07-16T11:32:53+00:00</updated>
<author>
<name>Meng Shao Liu</name>
<email>sau525@gmail.com</email>
</author>
<published>2025-07-16T06:46:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f751fe2a2acbe8cc20da35f118f589ac3b316b78'/>
<id>f751fe2a2acbe8cc20da35f118f589ac3b316b78</id>
<content type='text'>
The attr_group structures are allocated once and never modified at
runtime.  Also to match the const‑qualified parameter of
sysfs_create_group().

Signed-off-by: Meng Shao Liu &lt;sau525@gmail.com&gt;
Link: https://lore.kernel.org/r/dc94227eaf337a2b92ab77dffa0da9f7f1f84c4e.1752646650.git.sau525@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The attr_group structures are allocated once and never modified at
runtime.  Also to match the const‑qualified parameter of
sysfs_create_group().

Signed-off-by: Meng Shao Liu &lt;sau525@gmail.com&gt;
Link: https://lore.kernel.org/r/dc94227eaf337a2b92ab77dffa0da9f7f1f84c4e.1752646650.git.sau525@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samples/kobject: fix path comment</title>
<updated>2025-07-16T11:32:53+00:00</updated>
<author>
<name>Meng Shao Liu</name>
<email>sau525@gmail.com</email>
</author>
<published>2025-07-16T06:46:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=42573e4df8e2318fce6a711e0f9cafc9e3dc1483'/>
<id>42573e4df8e2318fce6a711e0f9cafc9e3dc1483</id>
<content type='text'>
The introductory comment still says the example creates
/sys/kernel/kobject-example, but the code actually creates
/sys/kernel/kobject_example.

Update both comments to reflect the actual sysfs paths. Also,
fix "tree"-&gt;"three" typo in kset-example.c.

Signed-off-by: Meng Shao Liu &lt;sau525@gmail.com&gt;
Link: https://lore.kernel.org/r/5be61d284a1850f573658f1c105f0b6062e41332.1752646650.git.sau525@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The introductory comment still says the example creates
/sys/kernel/kobject-example, but the code actually creates
/sys/kernel/kobject_example.

Update both comments to reflect the actual sysfs paths. Also,
fix "tree"-&gt;"three" typo in kset-example.c.

Signed-off-by: Meng Shao Liu &lt;sau525@gmail.com&gt;
Link: https://lore.kernel.org/r/5be61d284a1850f573658f1c105f0b6062e41332.1752646650.git.sau525@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samples/kobject: add missing MODULE_DESCRIPTION() macros</title>
<updated>2024-06-04T16:04:28+00:00</updated>
<author>
<name>Jeff Johnson</name>
<email>quic_jjohnson@quicinc.com</email>
</author>
<published>2024-06-02T01:18:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=161364bdcfc4386652f26857c357982a6f517fd2'/>
<id>161364bdcfc4386652f26857c357982a6f517fd2</id>
<content type='text'>
make allmodconfig &amp;&amp; make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kobject/kobject-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kobject/kset-example.o

Add the missing invocations of the MODULE_DESCRIPTION() macro.

Signed-off-by: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Link: https://lore.kernel.org/r/20240601-md-samples-kobject-v1-1-f63b215d50cb@quicinc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
make allmodconfig &amp;&amp; make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kobject/kobject-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kobject/kset-example.o

Add the missing invocations of the MODULE_DESCRIPTION() macro.

Signed-off-by: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Link: https://lore.kernel.org/r/20240601-md-samples-kobject-v1-1-f63b215d50cb@quicinc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samples/kobject: Use sysfs_emit instead of sprintf</title>
<updated>2022-03-18T13:28:29+00:00</updated>
<author>
<name>Nguyen Dinh Phi</name>
<email>phind.uet@gmail.com</email>
</author>
<published>2022-03-03T18:36:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5a242d8547bdc5802d1e1200a85e69afc3c2d74e'/>
<id>5a242d8547bdc5802d1e1200a85e69afc3c2d74e</id>
<content type='text'>
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 &lt;phind.uet@gmail.com&gt;
Link: https://lore.kernel.org/r/20220303183618.1342358-1-phind.uet@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;phind.uet@gmail.com&gt;
Link: https://lore.kernel.org/r/20220303183618.1342358-1-phind.uet@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kobject: Remove redundant license text</title>
<updated>2017-12-07T17:36:43+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-07T16:30:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=045c5f75b77177ad19fe747e33aae2249a12e827'/>
<id>045c5f75b77177ad19fe747e33aae2249a12e827</id>
<content type='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 &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kobject: add SPDX identifiers to all kobject files</title>
<updated>2017-12-07T17:36:43+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-07T16:30:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d9d16e16a3f82e88fec99222c9c7e26563b05688'/>
<id>d9d16e16a3f82e88fec99222c9c7e26563b05688</id>
<content type='text'>
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 &lt;tglx@linutronix.de&gt;
Cc: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;tglx@linutronix.de&gt;
Cc: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samples/kobject: be explicit in the module license</title>
<updated>2015-03-25T12:41:42+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2015-03-25T12:41:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=07afb6ace3bde4ffdce26befa6b2f38c5d708dd0'/>
<id>07afb6ace3bde4ffdce26befa6b2f38c5d708dd0</id>
<content type='text'>
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 &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samples/kobject: Use kstrtoint instead of sscanf</title>
<updated>2015-03-25T12:40:31+00:00</updated>
<author>
<name>Rastislav Barlik</name>
<email>barlik@zoho.com</email>
</author>
<published>2014-12-17T20:14:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5fd637e7a75fb2a4c0b62683c08dae959160fedf'/>
<id>5fd637e7a75fb2a4c0b62683c08dae959160fedf</id>
<content type='text'>
Use kstrtoint function instead of sscanf and check for return values.

Signed-off-by: Rastislav Barlik &lt;barlik@zoho.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use kstrtoint function instead of sscanf and check for return values.

Signed-off-by: Rastislav Barlik &lt;barlik@zoho.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samples/kobject/: avoid world-writable sysfs files.</title>
<updated>2014-05-14T01:23:57+00:00</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2014-05-14T01:03:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=de5109898a8a0cb001abcb6916bef4efa32bf39b'/>
<id>de5109898a8a0cb001abcb6916bef4efa32bf39b</id>
<content type='text'>
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 &lt;greg@kroah.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;greg@kroah.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kobject-example: Spelling fixes.</title>
<updated>2010-03-08T01:04:46+00:00</updated>
<author>
<name>Radu Voicilas</name>
<email>rvoicilas@gmail.com</email>
</author>
<published>2009-12-12T09:06:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a115bc070b1fc57ab23f3972401425927b5b465c'/>
<id>a115bc070b1fc57ab23f3972401425927b5b465c</id>
<content type='text'>
No change in functionality.

Signed-off-by: Radu Voicilas &lt;rvoicilas@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No change in functionality.

Signed-off-by: Radu Voicilas &lt;rvoicilas@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
</feed>
