All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Li <yang.lee@linux.alibaba.com>
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, Yang Li <yang.lee@linux.alibaba.com>
Subject: [PATCH] driver core: Switch to using the new API kobj_to_dev()
Date: Mon,  1 Mar 2021 17:13:24 +0800	[thread overview]
Message-ID: <1614590004-69592-1-git-send-email-yang.lee@linux.alibaba.com> (raw)

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);
 }
 
 /**
-- 
1.8.3.1


             reply	other threads:[~2021-03-01  9:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01  9:13 Yang Li [this message]
2021-03-01  9:26 ` [PATCH] driver core: Switch to using the new API kobj_to_dev() Greg KH
2021-09-29 15:02 ` [driver core] eedc73d4f3: BUG:kernel_reboot-without-warning_in_boot_stage kernel test robot
2021-09-29 15:02   ` kernel test robot
2021-09-29 15:13   ` Greg KH
2021-09-29 15:13     ` Greg KH
2021-09-30  5:59     ` Oliver Sang
2021-09-30  5:59       ` Oliver Sang
2021-09-30  6:23       ` Greg KH
2021-09-30  6:23         ` Greg KH
2021-09-30  8:05         ` Philip Li
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
2021-11-06 21:41   ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-09-29 14:08 kernel test robot
2021-09-29 14:08 ` 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=1614590004-69592-1-git-send-email-yang.lee@linux.alibaba.com \
    --to=yang.lee@linux.alibaba.com \
    --cc=gregkh@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.