Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cxl/pci: Convert register block identifiers to an enum

In preparation for passing around the Register Block Indicator (RBI) as
a parameter, it is desirable to convert the type to an enum so that the
interface can use a well defined parameter.

Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
[djbw: changelog fixups ]
Link: https://lore.kernel.org/r/163379784199.692348.4366131432595112771.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

authored by

Ben Widawsky and committed by
Dan Williams
cdcce47c 91a45b12

+8 -6
+8 -6
drivers/cxl/pci.h
··· 20 20 #define CXL_REGLOC_BIR_MASK GENMASK(2, 0) 21 21 22 22 /* Register Block Identifier (RBI) */ 23 - #define CXL_REGLOC_RBI_MASK GENMASK(15, 8) 24 - #define CXL_REGLOC_RBI_EMPTY 0 25 - #define CXL_REGLOC_RBI_COMPONENT 1 26 - #define CXL_REGLOC_RBI_VIRT 2 27 - #define CXL_REGLOC_RBI_MEMDEV 3 28 - #define CXL_REGLOC_RBI_TYPES CXL_REGLOC_RBI_MEMDEV + 1 23 + enum cxl_regloc_type { 24 + CXL_REGLOC_RBI_EMPTY = 0, 25 + CXL_REGLOC_RBI_COMPONENT, 26 + CXL_REGLOC_RBI_VIRT, 27 + CXL_REGLOC_RBI_MEMDEV, 28 + CXL_REGLOC_RBI_TYPES 29 + }; 29 30 31 + #define CXL_REGLOC_RBI_MASK GENMASK(15, 8) 30 32 #define CXL_REGLOC_ADDR_MASK GENMASK(31, 16) 31 33 32 34 #endif /* __CXL_PCI_H__ */