kernel: mem_domain: Use u8_t for number of partitions in struct
During system initialization, the global static variable (to mem_domain.c) is initialized with the number of maximum partitions per domain. This variable is of u8_t type. Assertions throughout the code will check ranges and test for overflow by relying on implicit type conversion. Use an u8_t instead of u32_t to avoid doubts. Also, reorder the k_mem_partition struct to remove the alignment hole created by reducing sizeof(num_partitions). Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This commit is contained in:
parent
db094b8d88
commit
08de658eb9
2 changed files with 5 additions and 5 deletions
|
@ -68,8 +68,8 @@ static inline bool sane_partition_domain(const struct k_mem_domain *domain,
|
|||
#define sane_partition_domain(...) (true)
|
||||
#endif
|
||||
|
||||
void k_mem_domain_init(struct k_mem_domain *domain, u32_t num_parts,
|
||||
struct k_mem_partition *parts[])
|
||||
void k_mem_domain_init(struct k_mem_domain *domain, u8_t num_parts,
|
||||
struct k_mem_partition *parts[])
|
||||
{
|
||||
unsigned int key;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue