Simplify implementation of OUT_OF_RANGE macro
Simplify implementation of OUT_OF_RANGE macro

This change adds a new enum CXL_ATTR_MAX to cxl_sysfs_attr for use as
the limit check in OUT_OF_RANGE macro. This would remove the requirement
to update the LAST_ATTR macro every time a new enum is added to
cxl_sysfs_attr.

This macro is also used to explicitly set size for array
sysfs_entry. Individual elements of this array can then be indexed
based on the enum values in cxl_sysfs_attr. This change ensures that if
an attr enum is missed in this array its sysfs_entry would be zero
initialized. This is then used to further strengthen the OUT_OF_RANGE
check.

Signed-off-by: Vaibhav Jain <e78384dfaa97bf0f3945c4da4075af8ac33ade0a@linux.vnet.ibm.com>

ibm-capi/libcxl,ibm-capi/libcxl