ndtest: Switch to using the new API kobj_to_dev()
PATCH 1/1 ndtest: Switch to using the new API kobj_to_dev()
fixed the following coccicheck:
./tools/testing/nvdimm/test/ndtest.c:785:60-61: WARNING opportunity for kobj_to_dev()
Reported-by Abaci Robot <[email protected]>
Signed-off-by Yang Li <[email protected]>
--- tools/testing/nvdimm/test/ndtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/nvdimm/test/ndtest.c +1 -1
@@ -782,7 +782,7 @@ static ssize_t format1_show(struct device *dev, struct device_attribute *attr,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);
Signature · 4 lines
1.8.3.1 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]