diff options
Diffstat (limited to 'drivers/nvdimm/namespace_devs.c')
-rw-r--r-- | drivers/nvdimm/namespace_devs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index abe5c6bc756c..6307088b375f 100644 --- a/drivers/nvdimm/namespace_devs.c +++ b/drivers/nvdimm/namespace_devs.c | |||
@@ -1132,7 +1132,7 @@ static ssize_t size_show(struct device *dev, | |||
1132 | return sprintf(buf, "%llu\n", (unsigned long long) | 1132 | return sprintf(buf, "%llu\n", (unsigned long long) |
1133 | nvdimm_namespace_capacity(to_ndns(dev))); | 1133 | nvdimm_namespace_capacity(to_ndns(dev))); |
1134 | } | 1134 | } |
1135 | static DEVICE_ATTR(size, S_IRUGO, size_show, size_store); | 1135 | static DEVICE_ATTR(size, 0444, size_show, size_store); |
1136 | 1136 | ||
1137 | static u8 *namespace_to_uuid(struct device *dev) | 1137 | static u8 *namespace_to_uuid(struct device *dev) |
1138 | { | 1138 | { |
@@ -1456,7 +1456,7 @@ static umode_t namespace_visible(struct kobject *kobj, | |||
1456 | 1456 | ||
1457 | if (is_namespace_pmem(dev) || is_namespace_blk(dev)) { | 1457 | if (is_namespace_pmem(dev) || is_namespace_blk(dev)) { |
1458 | if (a == &dev_attr_size.attr) | 1458 | if (a == &dev_attr_size.attr) |
1459 | return S_IWUSR | S_IRUGO; | 1459 | return 0644; |
1460 | 1460 | ||
1461 | if (is_namespace_pmem(dev) && a == &dev_attr_sector_size.attr) | 1461 | if (is_namespace_pmem(dev) && a == &dev_attr_sector_size.attr) |
1462 | return 0; | 1462 | return 0; |
@@ -1653,7 +1653,7 @@ static int select_pmem_id(struct nd_region *nd_region, u8 *pmem_id) | |||
1653 | u64 hw_start, hw_end, pmem_start, pmem_end; | 1653 | u64 hw_start, hw_end, pmem_start, pmem_end; |
1654 | struct nd_label_ent *label_ent; | 1654 | struct nd_label_ent *label_ent; |
1655 | 1655 | ||
1656 | WARN_ON(!mutex_is_locked(&nd_mapping->lock)); | 1656 | lockdep_assert_held(&nd_mapping->lock); |
1657 | list_for_each_entry(label_ent, &nd_mapping->labels, list) { | 1657 | list_for_each_entry(label_ent, &nd_mapping->labels, list) { |
1658 | nd_label = label_ent->label; | 1658 | nd_label = label_ent->label; |
1659 | if (!nd_label) | 1659 | if (!nd_label) |
@@ -1997,7 +1997,7 @@ struct device *create_namespace_blk(struct nd_region *nd_region, | |||
1997 | struct nd_mapping *nd_mapping = &nd_region->mapping[0]; | 1997 | struct nd_mapping *nd_mapping = &nd_region->mapping[0]; |
1998 | struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); | 1998 | struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); |
1999 | struct nd_namespace_blk *nsblk; | 1999 | struct nd_namespace_blk *nsblk; |
2000 | char *name[NSLABEL_NAME_LEN]; | 2000 | char name[NSLABEL_NAME_LEN]; |
2001 | struct device *dev = NULL; | 2001 | struct device *dev = NULL; |
2002 | struct resource *res; | 2002 | struct resource *res; |
2003 | 2003 | ||