We don't need relocatable space to store 'const' number.
const struct dm_report_reserved_value *iter;
const struct dm_report_field_reserved_value *field_res;
const struct dm_report_field_type *field;
- static uint32_t supported_reserved_types = DM_REPORT_FIELD_TYPE_NUMBER |
+ const uint32_t supported_reserved_types = DM_REPORT_FIELD_TYPE_NUMBER |
DM_REPORT_FIELD_TYPE_SIZE |
DM_REPORT_FIELD_TYPE_PERCENT |
DM_REPORT_FIELD_TYPE_STRING |
DM_REPORT_FIELD_TYPE_TIME;
- static uint32_t supported_reserved_types_with_range = DM_REPORT_FIELD_RESERVED_VALUE_RANGE |
+ const uint32_t supported_reserved_types_with_range = DM_REPORT_FIELD_RESERVED_VALUE_RANGE |
DM_REPORT_FIELD_TYPE_NUMBER |
DM_REPORT_FIELD_TYPE_SIZE |
DM_REPORT_FIELD_TYPE_PERCENT |
static int _get_vgid_and_lvid_for_dev(struct device *dev)
{
- static size_t lvm_prefix_len = sizeof(UUID_PREFIX) - 1;
- static size_t lvm_uuid_len = sizeof(UUID_PREFIX) - 1 + 2 * ID_LEN;
+ const size_t lvm_prefix_len = sizeof(UUID_PREFIX) - 1;
+ const size_t lvm_uuid_len = sizeof(UUID_PREFIX) - 1 + 2 * ID_LEN;
char uuid[DM_UUID_LEN];
size_t uuid_len;
static size_t _size_stack;
static size_t _size_malloc_tmp;
-static size_t _size_malloc = 2000000;
+const size_t _size_malloc = 2000000;
static void *_malloc_mem = NULL;
static int _mem_locked = 0;
const struct dm_report_reserved_value *iter;
const struct dm_report_field_reserved_value *field_res;
const struct dm_report_field_type *field;
- static uint32_t supported_reserved_types = DM_REPORT_FIELD_TYPE_NUMBER |
+ const uint32_t supported_reserved_types = DM_REPORT_FIELD_TYPE_NUMBER |
DM_REPORT_FIELD_TYPE_SIZE |
DM_REPORT_FIELD_TYPE_PERCENT |
DM_REPORT_FIELD_TYPE_STRING |
DM_REPORT_FIELD_TYPE_TIME;
- static uint32_t supported_reserved_types_with_range = DM_REPORT_FIELD_RESERVED_VALUE_RANGE |
+ const uint32_t supported_reserved_types_with_range = DM_REPORT_FIELD_RESERVED_VALUE_RANGE |
DM_REPORT_FIELD_TYPE_NUMBER |
DM_REPORT_FIELD_TYPE_SIZE |
DM_REPORT_FIELD_TYPE_PERCENT |