diff options
author | John Baldwin <jhb@FreeBSD.org> | 2022-09-22 22:09:19 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2022-09-22 22:09:19 +0000 |
commit | f49fd63a6a130ae464cdc7756e6f7d0d747c82c4 (patch) | |
tree | 218a911d9042b8afbfbb1c6643a2109a85dcf290 /sys/dev/hyperv | |
parent | 7ae99f80b6661760c5de3edd330b279f04b092a2 (diff) | |
download | src-f49fd63a6a130ae464cdc7756e6f7d0d747c82c4.tar.gz src-f49fd63a6a130ae464cdc7756e6f7d0d747c82c4.zip |
kmem_malloc/free: Use void * instead of vm_offset_t for kernel pointers.
Reviewed by: kib, markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D36549
Diffstat (limited to 'sys/dev/hyperv')
-rw-r--r-- | sys/dev/hyperv/vmbus/hyperv.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/hyperv/vmbus/hyperv.c b/sys/dev/hyperv/vmbus/hyperv.c index 01e0ad9610d9..b2a74036f6c3 100644 --- a/sys/dev/hyperv/vmbus/hyperv.c +++ b/sys/dev/hyperv/vmbus/hyperv.c @@ -268,7 +268,7 @@ SYSINIT(hyperv_initialize, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, hyperv_init, static void hypercall_memfree(void) { - kmem_free((vm_offset_t)hypercall_context.hc_addr, PAGE_SIZE); + kmem_free(hypercall_context.hc_addr, PAGE_SIZE); hypercall_context.hc_addr = NULL; } @@ -286,8 +286,7 @@ hypercall_create(void *arg __unused) * the NX bit. * - Assume kmem_malloc() returns properly aligned memory. */ - hypercall_context.hc_addr = (void *)kmem_malloc(PAGE_SIZE, M_EXEC | - M_WAITOK); + hypercall_context.hc_addr = kmem_malloc(PAGE_SIZE, M_EXEC | M_WAITOK); hypercall_context.hc_paddr = vtophys(hypercall_context.hc_addr); /* Get the 'reserved' bits, which requires preservation. */ |