diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-05-18 20:06:48 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-05-18 20:06:48 +0300 |
commit | 2159669f581917c4d197d3ea183d3d85b47faf66 (patch) | |
tree | 9faa8bbf19fa1ea33e371b02cfa5a5b4507583de /drivers/nvdimm | |
parent | 594d6d96ea042366878aa7dc7f5711b8c245db5a (diff) | |
parent | 9dec4892ca9afd6aad3c9c9e6c17480ecbd04440 (diff) | |
download | linux-2159669f581917c4d197d3ea183d3d85b47faf66.tar.xz |
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) struct btt *btt; size_t rawsize; - if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) + if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) { + dev_dbg(&nd_btt->dev, "incomplete btt configuration\n"); return -ENODEV; + } rawsize = nvdimm_namespace_capacity(ndns) - SZ_4K; if (rawsize < ARENA_MIN_SIZE) { + dev_dbg(&nd_btt->dev, "%s must be at least %ld bytes\n", + dev_name(&ndns->dev), ARENA_MIN_SIZE + SZ_4K); return -ENXIO; } 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) { int rc; + BUILD_BUG_ON(sizeof(struct nd_smart_payload) != 128); + BUILD_BUG_ON(sizeof(struct nd_smart_threshold_payload) != 8); + rc = bus_register(&nvdimm_bus_type); if (rc) return rc; |