drivers: mm: Fix cast warnings on build for RAT

Removed the unneccessary casts in the functions to remove warnings
during build for SoCs using RAT. Functionality reamins the same,
tested on board.

Signed-off-by: L Lakshmanan <l-lakshmanan@ti.com>
This commit is contained in:
L Lakshmanan 2023-07-11 16:40:16 +05:30 committed by Fabio Baltieri
commit 934c6d7b33
2 changed files with 7 additions and 7 deletions

View file

@ -99,7 +99,7 @@ int sys_mm_drv_page_phys_get(void *virt, uintptr_t *phys)
if (virt == NULL) {
return -EINVAL;
}
uint64_t pa = ((uint64_t) (virt));
uintptr_t pa = (uintptr_t) virt;
uintptr_t *va = phys;
uint32_t found, regionId;
@ -130,10 +130,10 @@ int sys_mm_drv_page_phys_get(void *virt, uintptr_t *phys)
uint32_t offset =
pa - translate_config.region_config[regionId].system_addr;
*va = (void *)(translate_config.region_config[regionId].local_addr + offset);
*va = (translate_config.region_config[regionId].local_addr + offset);
} else {
/* no mapping found, set output = input with 32b truncation */
*va = (void *)pa;
*va = pa;
}
if (va == NULL) {