]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
dm: platform_data: atmel_serial: fix build warning on 64-bit platforms
authorRobert Marko <robert.marko@sartura.hr>
Mon, 12 Jan 2026 13:12:40 +0000 (14:12 +0100)
committerEugen Hristev <eugen.hristev@linaro.org>
Wed, 4 Feb 2026 12:12:56 +0000 (14:12 +0200)
Pointer size cannot be assumed to be 32-bit, so use uintptr_t instead of
uint32_t.

Fixes the below build warning on 64-bit builds:
drivers/serial/atmel_usart.c: In function ‘atmel_serial_probe’:
drivers/serial/atmel_usart.c:275:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  275 |         priv->usart = (atmel_usart3_t *)plat->base_addr;

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
include/dm/platform_data/atmel_serial.h

index 5d1426936404e2b2752ad0d7671aea0134f1a824..96da6f502873cffd3de4f3556e552af8d9575936 100644 (file)
@@ -8,7 +8,7 @@
 
 /* Information about a serial port */
 struct atmel_serial_plat {
-       uint32_t base_addr;
+       uintptr_t base_addr;
 };
 
 #endif