riscv: ax25-ae350: Cast addr with uintptr_t

addr was delcared as fdt_addr_t which is now a 64-bit address.
In a 32-bit build, this causes the following warning seen when
building ax25-ae350.c:

  warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Cast addr with uintptr_t.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
This commit is contained in:
Bin Meng
2021-01-31 20:36:01 +08:00
committed by Simon Glass
parent 5c7c9e623c
commit b7324b5d53

View File

@@ -77,7 +77,7 @@ int smc_init(void)
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
regs = (struct ftsmc020_bank *)addr;
regs = (struct ftsmc020_bank *)(uintptr_t)addr;
regs->cr &= ~FTSMC020_BANK_WPROT;
return 0;