[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 9 Sep 2020 11:36:06 -0600
From: Jonathan Corbet <corbet@....net>
To: Denis Efremov <efremov@...ux.com>
Cc: Harry Wei <harryxiyou@...il.com>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] docs: filesystems: replace to_dev() with kobj_to_dev()
On Sun, 30 Aug 2020 17:41:35 +0300
Denis Efremov <efremov@...ux.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@...ux.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
Powered by blists - more mailing lists