git: fcef359272fd - main - uart: Use uintptr_t instead of vm_offset_t for pointer arithmetic
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Sep 2024 13:56:39 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fcef359272fdda27eef770a512b15bb40232cbd2 commit fcef359272fdda27eef770a512b15bb40232cbd2 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-09-04 13:56:21 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-09-04 13:56:21 +0000 uart: Use uintptr_t instead of vm_offset_t for pointer arithmetic Reviewed by: imp Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D46490 --- sys/dev/uart/uart_cpu_acpi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/uart/uart_cpu_acpi.c b/sys/dev/uart/uart_cpu_acpi.c index 53fe459e64a1..7892437e11de 100644 --- a/sys/dev/uart/uart_cpu_acpi.c +++ b/sys/dev/uart/uart_cpu_acpi.c @@ -235,10 +235,10 @@ uart_cpu_acpi_dbg2(struct uart_devinfo *di) error = ENXIO; - dbg2_dev = (ACPI_DBG2_DEVICE *)((vm_offset_t)dbg2 + dbg2->InfoOffset); + dbg2_dev = (ACPI_DBG2_DEVICE *)((uintptr_t)dbg2 + dbg2->InfoOffset); found = false; - while ((vm_offset_t)dbg2_dev + dbg2_dev->Length <= - (vm_offset_t)dbg2 + dbg2->Header.Length) { + while ((uintptr_t)dbg2_dev + dbg2_dev->Length <= + (uintptr_t)dbg2 + dbg2->Header.Length) { if (dbg2_dev->PortType != ACPI_DBG2_SERIAL_PORT) goto next; @@ -252,7 +252,7 @@ uart_cpu_acpi_dbg2(struct uart_devinfo *di) class = cd->cd_class; base_address = (ACPI_GENERIC_ADDRESS *) - ((vm_offset_t)dbg2_dev + dbg2_dev->BaseAddressOffset); + ((uintptr_t)dbg2_dev + dbg2_dev->BaseAddressOffset); error = uart_cpu_acpi_init_devinfo(di, class, base_address); if (error == 0) { @@ -262,7 +262,7 @@ uart_cpu_acpi_dbg2(struct uart_devinfo *di) next: dbg2_dev = (ACPI_DBG2_DEVICE *) - ((vm_offset_t)dbg2_dev + dbg2_dev->Length); + ((uintptr_t)dbg2_dev + dbg2_dev->Length); } if (!found) goto out;