public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: Denis Efremov <efremov@linux.com>
Cc: Harry Wei <harryxiyou@gmail.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] docs: filesystems: replace to_dev() with kobj_to_dev()
Date: Wed, 9 Sep 2020 11:36:06 -0600	[thread overview]
Message-ID: <20200909113606.37ffc039@lwn.net> (raw)
In-Reply-To: <20200830144135.6956-1-efremov@linux.com>

On Sun, 30 Aug 2020 17:41:35 +0300
Denis Efremov <efremov@linux.com> wrote:

> Commit a4232963757e ("driver-core: Move kobj_to_dev from genhd.h to device.h")
> introduced kobj_to_dev() function.
> 
> Signed-off-by: Denis Efremov <efremov@linux.com>
> ---
>  Documentation/filesystems/sysfs.rst                    | 3 +--
>  Documentation/translations/zh_CN/filesystems/sysfs.txt | 3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/filesystems/sysfs.rst b/Documentation/filesystems/sysfs.rst
> index ab0f7795792b..5a3209a4cebf 100644
> --- a/Documentation/filesystems/sysfs.rst
> +++ b/Documentation/filesystems/sysfs.rst
> @@ -172,14 +172,13 @@ calls the associated methods.
>  
>  To illustrate::
>  
> -    #define to_dev(obj) container_of(obj, struct device, kobj)
>      #define to_dev_attr(_attr) container_of(_attr, struct device_attribute, attr)
>  
>      static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr,
>  				char *buf)
>      {
>  	    struct device_attribute *dev_attr = to_dev_attr(attr);
> -	    struct device *dev = to_dev(kobj);
> +	    struct device *dev = kobj_to_dev(kobj);
>  	    ssize_t ret = -EIO;

Applied, thanks.

jon

      reply	other threads:[~2020-09-09 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-30 14:41 [PATCH] docs: filesystems: replace to_dev() with kobj_to_dev() Denis Efremov
2020-09-09 17:36 ` Jonathan Corbet [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=20200909113606.37ffc039@lwn.net \
    --to=corbet@lwn.net \
    --cc=efremov@linux.com \
    --cc=harryxiyou@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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