From: Guenter Roeck <linux@roeck-us.net>
To: Wang Qing <wangqing@vivo.com>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers\watchdog: Use kobj_to_dev() API
Date: Fri, 12 Jun 2020 06:17:21 -0700 [thread overview]
Message-ID: <de3d1552-e21a-84c6-3f07-9b87488b9e48@roeck-us.net> (raw)
In-Reply-To: <1591945384-14587-1-git-send-email-wangqing@vivo.com>
On 6/12/20 12:03 AM, Wang Qing wrote:
> Use kobj_to_dev() API instead of container_of().
>
> Signed-off-by: Wang Qing <wangqing@vivo.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/watchdog_dev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> mode change 100644 => 100755 drivers/watchdog/watchdog_dev.c
>
> diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
> index 7e4cd34..9da2360
> --- a/drivers/watchdog/watchdog_dev.c
> +++ b/drivers/watchdog/watchdog_dev.c
> @@ -587,7 +587,7 @@ static DEVICE_ATTR_RW(pretimeout_governor);
> static umode_t wdt_is_visible(struct kobject *kobj, struct attribute *attr,
> int n)
> {
> - struct device *dev = container_of(kobj, struct device, kobj);
> + struct device *dev = kobj_to_dev(kobj);
> struct watchdog_device *wdd = dev_get_drvdata(dev);
> umode_t mode = attr->mode;
>
>
prev parent reply other threads:[~2020-06-12 13:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 7:03 [PATCH] drivers\watchdog: Use kobj_to_dev() API Wang Qing
2020-06-12 13:17 ` Guenter Roeck [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=de3d1552-e21a-84c6-3f07-9b87488b9e48@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wangqing@vivo.com \
--cc=wim@linux-watchdog.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).