aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorBin Meng <bin.meng@windriver.com>2021-01-31 20:36:00 +0800
committerSimon Glass <sjg@chromium.org>2021-02-03 03:38:41 -0700
commit5c7c9e623c5ffdc333ef4876ee800384c60a4955 (patch)
treeb93ebeece37ed9c7891b95e1bbbc3fcb0fd9ad34 /drivers/serial
parent37dc958947ed305fcbd732172e22ff758f43208a (diff)
downloadu-boot-5c7c9e623c5ffdc333ef4876ee800384c60a4955.zip
u-boot-5c7c9e623c5ffdc333ef4876ee800384c60a4955.tar.gz
u-boot-5c7c9e623c5ffdc333ef4876ee800384c60a4955.tar.bz2
serial: sifive: Cast dev_read_addr() with uintptr_t
dev_read_addr() returns fdt_addr_t which is now a 64-bit address. In a 32-bit build, this causes the following warning seen when building serial_sifive.c: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Cast the return value with uintptr_t. Signed-off-by: Bin Meng <bin.meng@windriver.com>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/serial_sifive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c
index d26fe7e..97bf20c 100644
--- a/drivers/serial/serial_sifive.c
+++ b/drivers/serial/serial_sifive.c
@@ -178,7 +178,7 @@ static int sifive_serial_of_to_plat(struct udevice *dev)
{
struct sifive_uart_plat *plat = dev_get_plat(dev);
- plat->regs = (struct uart_sifive *)dev_read_addr(dev);
+ plat->regs = (struct uart_sifive *)(uintptr_t)dev_read_addr(dev);
if (IS_ERR(plat->regs))
return PTR_ERR(plat->regs);