Skip to contentSkip to conversation

DOCUMENTATION: Correct filename in Documentation

PATCH In review [email protected] 4 participants 4 messages Aug 17, 2023 – Aug 21, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 DOCUMENTATION: Correct filename in Documentation

Correct filename of renamed file in Documentation

The current documentation in Documentation/core-api/kobject.rst refers to a macro named container_of, supposedly defined in linux/kernel.h while in reality it is defined in linux/container_of.h

--

Documentation/core-api/kobject.rst +1 -1
index 7310247310a0..5f6c61bc03bf 100644
@@ -78,7 +78,7 @@ just a matter of using the kobj member.  Code that works with kobjects will
 often have the opposite problem, however: given a struct kobject pointer,
 what is the pointer to the containing structure?  You must avoid tricks
 (such as assuming that the kobject is at the beginning of the structure)
-and, instead, use the container_of() macro, found in ``<linux/kernel.h>``::
+and, instead, use the container_of() macro, found in ``<linux/container_of.h>``::
 
     container_of(ptr, type, member)
 
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · On 8/17/23 13:59, [email protected] wrote:

Correct filename of renamed file in Documentation

The current documentation in Documentation/core-api/kobject.rst refers to a macro named container_of, supposedly defined in linux/kernel.h while in reality it is defined in linux/container_of.h

Thanks.

Quoted 14 lines

--

Documentation/core-api/kobject.rst +1 -1
index 7310247310a0..5f6c61bc03bf 100644
@@ -78,7 +78,7 @@ just a matter of using the kobj member.  Code that works with kobjects will
 often have the opposite problem, however: given a struct kobject pointer,
 what is the pointer to the containing structure?  You must avoid tricks
 (such as assuming that the kobject is at the beginning of the structure)
-and, instead, use the container_of() macro, found in ``<linux/kernel.h>``::
+and, instead, use the container_of() macro, found in ``<linux/container_of.h>``::
 
     container_of(ptr, type, member)
 
Signature · 1 line
~Randy
#2 lore raw
In reply to [email protected]
Quoted 5 lines · On Thu, Aug 17, 2023 at 10:59:40PM +0200, [email protected] wrote:

Correct filename of renamed file in Documentation

The current documentation in Documentation/core-api/kobject.rst refers to a macro named container_of, supposedly defined in linux/kernel.h while in reality it is defined in linux/container_of.h

Maybe we should just remove the reference to where it's defined?

#3 lore raw
Quoted 8 lines · Matthew Wilcox
Quoted 5 lines · On Thu, Aug 17, 2023 at 10:59:40PM +0200, [email protected] wrote:

Correct filename of renamed file in Documentation

The current documentation in Documentation/core-api/kobject.rst refers to a macro named container_of, supposedly defined in linux/kernel.h while in reality it is defined in linux/container_of.h

Maybe we should just remove the reference to where it's defined?

container_of.h seems to have kernel-doc, but it's not included anywhere in Documentation. With that fixed, this could be a reference to the documentation.

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center