fixed the following coccicheck: drivers/nvdimm/region_devs.c:762:60-61: WARNING opportunity for kobj_to_dev().
Signed-off-by: Tian Tao <[email protected]> --- drivers/nvdimm/region_devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c index ef23119..d71d4e9 100644 --- a/drivers/nvdimm/region_devs.c +++ b/drivers/nvdimm/region_devs.c @@ -759,7 +759,7 @@ REGION_MAPPING(31); static umode_t mapping_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 nd_region *nd_region = to_nd_region(dev); if (n < nd_region->ndr_mappings) -- 2.7.4 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]
