Re: [PATCH v2 1/2] Documentation: Converted the `kobject.txt` to rst format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/19/20 7:02 AM, lxsameer@xxxxxxx wrote:
> From: Sameer Rahmani <lxsameer@xxxxxxx>
> 
> Reviewed and converted the `kobject.txt` format to rst in place.
> 
> Signed-off-by: Sameer Rahmani <lxsameer@xxxxxxx>
> ---
>  Documentation/kobject.txt | 80 +++++++++++++++++++--------------------
>  1 file changed, 40 insertions(+), 40 deletions(-)
> 
> diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt
> index ff4c25098119..e12c2a309fd3 100644
> --- a/Documentation/kobject.txt
> +++ b/Documentation/kobject.txt
> @@ -3,7 +3,7 @@ Everything you never wanted to know about kobjects, ksets, and ktypes
>  =====================================================================
>  
>  :Author: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

Maybe Cc: gregkh?

> -:Last updated: December 19, 2007
> +:Last updated: Feb 18, 2020
>  
>  Based on an original article by Jon Corbet for lwn.net written October 1,
>  2003 and located at http://lwn.net/Articles/51437/

> @@ -78,30 +78,30 @@ 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/kernel.h>``::
>  
>      container_of(pointer, type, member)
>  
>  where:
>  
> -  * "pointer" is the pointer to the embedded kobject,
> -  * "type" is the type of the containing structure, and
> -  * "member" is the name of the structure field to which "pointer" points.
> +  * ``pointer`` is the pointer to the embedded kobject,
> +  * ``type`` is the type of the containing structure, and
> +  * ``member`` is the name of the structure field to which ``pointer`` points.
>  
>  The return value from container_of() is a pointer to the corresponding
> -container type. So, for example, a pointer "kp" to a struct kobject
> -embedded *within* a struct uio_map could be converted to a pointer to the
> +container type. So, for example, a pointer ``kp`` to a struct kobject
> +embedded **within** a struct uio_map could be converted to a pointer to the
>  *containing* uio_map structure with::

Does "*containing*" need to be modified also?

> @@ -228,7 +228,7 @@ This function will create a kobject and place it in sysfs in the location
>  underneath the specified parent kobject.  To create simple attributes
>  associated with this kobject, use::
>  
> -    int sysfs_create_file(struct kobject *kobj, struct attribute *attr);
> +    static inline int sysfs_create_files(struct kobject *kobj, const struct attribute * const *attr);

That function is only inline when CONFIG_SYSFS is not set/enabled,
so this is not a good change IMO.

>  
>  or::
>  


Thanks.
-- 
~Randy




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux