diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-05-05 00:01:24 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-05-05 00:01:24 +0300 |
commit | 8f078b38dd382710884ce7abd31a1935c440e6f8 (patch) | |
tree | bec3467c1f513663801d7fb62a9c56bea2fe52b6 /drivers/nvdimm/region_devs.c | |
parent | 565851c972b50612f3a4542e26879ffb3e906fc2 (diff) | |
download | linux-8f078b38dd382710884ce7abd31a1935c440e6f8.tar.xz |
libnvdimm: convert NDD_ flags to use bitops, introduce NDD_LOCKED
This is a preparation patch for handling locked nvdimm label regions, a
new concept as introduced by the latest DSM document on pmem.io [1]. A
future patch will leverage nvdimm_set_locked() at DIMM probe time to
flag regions that can not be enabled. There should be no functional
difference resulting from this change.
[1]: http://pmem.io/documents/NVDIMM_DSM_Interface_Example-V1.3.pdf
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/region_devs.c')
-rw-r--r-- | drivers/nvdimm/region_devs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c index 07756b2e1cd5..b550edf2571f 100644 --- a/drivers/nvdimm/region_devs.c +++ b/drivers/nvdimm/region_devs.c @@ -222,7 +222,7 @@ int nd_region_to_nstype(struct nd_region *nd_region) struct nd_mapping *nd_mapping = &nd_region->mapping[i]; struct nvdimm *nvdimm = nd_mapping->nvdimm; - if (nvdimm->flags & NDD_ALIASING) + if (test_bit(NDD_ALIASING, &nvdimm->flags)) alias++; } if (alias) @@ -881,7 +881,7 @@ static struct nd_region *nd_region_create(struct nvdimm_bus *nvdimm_bus, return NULL; } - if (nvdimm->flags & NDD_UNARMED) + if (test_bit(NDD_UNARMED, &nvdimm->flags)) ro = 1; } |