[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1614590004-69592-1-git-send-email-yang.lee@linux.alibaba.com>
Date: Mon, 1 Mar 2021 17:13:24 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: gregkh@...uxfoundation.org
Cc: linux-kernel@...r.kernel.org, Yang Li <yang.lee@...ux.alibaba.com>
Subject: [PATCH] driver core: Switch to using the new API kobj_to_dev()
fixed the following coccicheck:
./include/linux/device.h:590:46-47: WARNING opportunity for
kobj_to_dev()
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@...ux.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
Powered by blists - more mailing lists