Message ID | 20220425105607.3515999-1-chi.minghao@zte.com.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ndtest: use kobj_to_dev() | expand |
diff --git a/tools/testing/nvdimm/test/ndtest.c b/tools/testing/nvdimm/test/ndtest.c index 4d1a947367f9..b32ee76e0c17 100644 --- a/tools/testing/nvdimm/test/ndtest.c +++ b/tools/testing/nvdimm/test/ndtest.c @@ -725,7 +725,7 @@ static DEVICE_ATTR_RO(format1); static umode_t ndtest_nvdimm_attr_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 nvdimm *nvdimm = to_nvdimm(dev); struct ndtest_dimm *dimm = nvdimm_provider_data(nvdimm);