diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-05-18 13:06:48 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-05-18 13:06:48 -0400 |
commit | 2159669f581917c4d197d3ea183d3d85b47faf66 (patch) | |
tree | 9faa8bbf19fa1ea33e371b02cfa5a5b4507583de /drivers/nvdimm | |
parent | 594d6d96ea042366878aa7dc7f5711b8c245db5a (diff) | |
parent | 9dec4892ca9afd6aad3c9c9e6c17480ecbd04440 (diff) |
Merge branch 'for-4.7/libnvdimm' into libnvdimm-for-next
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r-- | drivers/nvdimm/btt.c | 6 | ||||
-rw-r--r-- | drivers/nvdimm/bus.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index cc9fafed9362..68a7c3c1eed9 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c | |||
@@ -1383,11 +1383,15 @@ int nvdimm_namespace_attach_btt(struct nd_namespace_common *ndns) | |||
1383 | struct btt *btt; | 1383 | struct btt *btt; |
1384 | size_t rawsize; | 1384 | size_t rawsize; |
1385 | 1385 | ||
1386 | if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) | 1386 | if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) { |
1387 | dev_dbg(&nd_btt->dev, "incomplete btt configuration\n"); | ||
1387 | return -ENODEV; | 1388 | return -ENODEV; |
1389 | } | ||
1388 | 1390 | ||
1389 | rawsize = nvdimm_namespace_capacity(ndns) - SZ_4K; | 1391 | rawsize = nvdimm_namespace_capacity(ndns) - SZ_4K; |
1390 | if (rawsize < ARENA_MIN_SIZE) { | 1392 | if (rawsize < ARENA_MIN_SIZE) { |
1393 | dev_dbg(&nd_btt->dev, "%s must be at least %ld bytes\n", | ||
1394 | dev_name(&ndns->dev), ARENA_MIN_SIZE + SZ_4K); | ||
1391 | return -ENXIO; | 1395 | return -ENXIO; |
1392 | } | 1396 | } |
1393 | nd_region = to_nd_region(nd_btt->dev.parent); | 1397 | nd_region = to_nd_region(nd_btt->dev.parent); |
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index 97589e3cb852..dcaefe229887 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c | |||
@@ -787,6 +787,9 @@ int __init nvdimm_bus_init(void) | |||
787 | { | 787 | { |
788 | int rc; | 788 | int rc; |
789 | 789 | ||
790 | BUILD_BUG_ON(sizeof(struct nd_smart_payload) != 128); | ||
791 | BUILD_BUG_ON(sizeof(struct nd_smart_threshold_payload) != 8); | ||
792 | |||
790 | rc = bus_register(&nvdimm_bus_type); | 793 | rc = bus_register(&nvdimm_bus_type); |
791 | if (rc) | 794 | if (rc) |
792 | return rc; | 795 | return rc; |