public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] driver core: Switch to using the new API kobj_to_dev()
@ 2021-03-01  9:13 Yang Li
  2021-03-01  9:26 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Yang Li @ 2021-03-01  9:13 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Yang Li

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-06 21:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox