[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1597289224-19897-1-git-send-email-wangqing@vivo.com>
Date: Thu, 13 Aug 2020 11:27:02 +0800
From: Wang Qing <wangqing@...o.com>
To: Dan Williams <dan.j.williams@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Dave Jiang <dave.jiang@...el.com>, linux-nvdimm@...ts.01.org,
linux-kernel@...r.kernel.org
Cc: Wang Qing <wangqing@...o.com>
Subject: [PATCH] drivers/dax: Use kobj_to_dev() instead
Use kobj_to_dev() instead of container_of()
Signed-off-by: Wang Qing <wangqing@...o.com>
---
drivers/dax/bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
index df238c8..24625d2
--- a/drivers/dax/bus.c
+++ b/drivers/dax/bus.c
@@ -331,7 +331,7 @@ static DEVICE_ATTR_RO(numa_node);
static umode_t dev_dax_visible(struct kobject *kobj, struct attribute *a, int n)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct dev_dax *dev_dax = to_dev_dax(dev);
if (a == &dev_attr_target_node.attr && dev_dax_target_node(dev_dax) < 0)
--
2.7.4
Powered by blists - more mailing lists