diff options
author | Dan Williams <dan.j.williams@intel.com> | 2022-05-22 17:04:27 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2022-07-09 16:42:44 -0700 |
commit | 419af595b11891d632a31440b9ca5a3cdf93996d (patch) | |
tree | a2c62cf9ce94a628e1e45d434b5851e19f409263 /drivers/cxl/core/memdev.c | |
parent | 885d3bed6de153bfeba40e4d25cc600bef8af1b8 (diff) |
cxl: Introduce cxl_to_{ways,granularity}
Interleave granularity and ways have CXL specification defined encodings.
Promote the conversion helpers to a common header, and use them to
replace other open-coded instances.
Force caller to consider the error case of the conversion similarly to
other conversion helpers like kstrto*().
Co-developed-by: Ben Widawsky <bwidawsk@kernel.org>
Signed-off-by: Ben Widawsky <bwidawsk@kernel.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/165603875016.551046.17236943065932132355.stgit@dwillia2-xfh
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/cxl/core/memdev.c')
0 files changed, 0 insertions, 0 deletions