From: Greg KH <gregkh@linuxfoundation.org>
To: Yang Li <yang.lee@linux.alibaba.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] driver core: Switch to using the new API kobj_to_dev()
Date: Mon, 1 Mar 2021 10:26:51 +0100 [thread overview]
Message-ID: <YDyzW9l0HbYKS79V@kroah.com> (raw)
In-Reply-To: <1614590004-69592-1-git-send-email-yang.lee@linux.alibaba.com>
On Mon, Mar 01, 2021 at 05:13:24PM +0800, Yang Li wrote:
> fixed the following coccicheck:
> ./include/linux/device.h:590:46-47: WARNING opportunity for
> kobj_to_dev()
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
> include/linux/device.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/device.h b/include/linux/device.h
> index ba66073..31d7137 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -587,7 +587,7 @@ struct device_link {
>
> static inline struct device *kobj_to_dev(struct kobject *kobj)
> {
> - return container_of(kobj, struct device, kobj);
> + return kobj_to_dev(kobj);
> }
Did you test this change? Please do so...
{sigh}
greg k-h
next prev parent reply other threads:[~2021-03-01 9:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 9:13 [PATCH] driver core: Switch to using the new API kobj_to_dev() Yang Li
2021-03-01 9:26 ` Greg KH [this message]
2021-09-29 15:02 ` [driver core] eedc73d4f3: BUG:kernel_reboot-without-warning_in_boot_stage kernel test robot
2021-09-29 15:13 ` Greg KH
2021-09-30 5:59 ` Oliver Sang
2021-09-30 6:23 ` Greg KH
2021-09-30 8:05 ` Philip Li
2021-11-06 21:41 ` [PATCH] driver core: Switch to using the new API kobj_to_dev() kernel test robot
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=YDyzW9l0HbYKS79V@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yang.lee@linux.alibaba.com \
/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