From: Randy Dunlap <rdunlap@infradead.org>
To: lxsameer@gnu.org, corbet@lwn.net
Cc: linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 1/2] Documentation: Converted the `kobject.txt` to rst format
Date: Wed, 19 Feb 2020 08:38:43 -0800 [thread overview]
Message-ID: <e768e92b-8144-bcb9-de57-8ecd48339071@infradead.org> (raw)
In-Reply-To: <20200219150207.2811054-1-lxsameer@gnu.org>
On 2/19/20 7:02 AM, lxsameer@gnu.org wrote:
> From: Sameer Rahmani <lxsameer@gnu.org>
>
> Reviewed and converted the `kobject.txt` format to rst in place.
>
> Signed-off-by: Sameer Rahmani <lxsameer@gnu.org>
> ---
> 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@linuxfoundation.org>
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
prev parent reply other threads:[~2020-02-19 16:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 15:02 [PATCH v2 1/2] Documentation: Converted the `kobject.txt` to rst format lxsameer
2020-02-19 15:02 ` [PATCH v2 2/2] Documentation: kobject.txt has been moved to core-api/kobject.rst lxsameer
2020-02-19 16:38 ` Randy Dunlap [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e768e92b-8144-bcb9-de57-8ecd48339071@infradead.org \
--to=rdunlap@infradead.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=lxsameer@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).