aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2026-04-23 17:05:54 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2026-04-23 17:05:54 +0000
commitfe3e92e6868dce2ed94c98428b8df1f27ed3ef63 (patch)
tree027b31b44e12081aab6c139aedb8b2a6a11bd86d /sys/dev
parentc49cbf849dee9121ed3b972df56d240068d0423e (diff)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/efidev/efirt.c4
-rw-r--r--sys/dev/hwt/hwt_vm.c4
-rw-r--r--sys/dev/iscsi/icl_soft.c10
-rw-r--r--sys/dev/vmm/vmm_mem.c2
-rw-r--r--sys/dev/vnic/nicvf_queues.c3
5 files changed, 12 insertions, 11 deletions
diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c
index b55c1c191077..c3ac120c6611 100644
--- a/sys/dev/efidev/efirt.c
+++ b/sys/dev/efidev/efirt.c
@@ -192,7 +192,7 @@ efi_init(void)
return (0);
}
- efi_systbl = (struct efi_systbl *)efi_phys_to_kva(efi_systbl_phys);
+ efi_systbl = efi_phys_to_kva(efi_systbl_phys);
if (efi_systbl == NULL || efi_systbl->st_hdr.th_sig != EFI_SYSTBL_SIG) {
efi_systbl = NULL;
if (bootverbose)
@@ -243,7 +243,7 @@ efi_init(void)
* with an old loader.efi, check if the RS->GetTime function is within
* the EFI map, and fail to attach if not.
*/
- rtdm = (struct efi_rt *)efi_phys_to_kva((uintptr_t)efi_runtime);
+ rtdm = efi_phys_to_kva((uintptr_t)efi_runtime);
if (rtdm == NULL || !efi_is_in_map(map, ndesc, efihdr->descriptor_size,
(vm_offset_t)rtdm->rt_gettime)) {
if (bootverbose)
diff --git a/sys/dev/hwt/hwt_vm.c b/sys/dev/hwt/hwt_vm.c
index 18bbdbe37a99..0ea1fe44d4e3 100644
--- a/sys/dev/hwt/hwt_vm.c
+++ b/sys/dev/hwt/hwt_vm.c
@@ -110,7 +110,7 @@ hwt_vm_alloc_pages(struct hwt_vm *vm, int kva_req)
vm_paddr_t low, high, boundary;
vm_memattr_t memattr;
#ifdef __aarch64__
- uintptr_t va;
+ void *va;
#endif
int alignment;
vm_page_t m;
@@ -160,7 +160,7 @@ retry:
#ifdef __aarch64__
va = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m));
- cpu_dcache_wb_range((void *)va, PAGE_SIZE);
+ cpu_dcache_wb_range(va, PAGE_SIZE);
#endif
m->valid = VM_PAGE_BITS_ALL;
diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c
index 8847680072d3..ea5b1e6c51c4 100644
--- a/sys/dev/iscsi/icl_soft.c
+++ b/sys/dev/iscsi/icl_soft.c
@@ -1112,7 +1112,7 @@ icl_soft_conn_pdu_append_bio(struct icl_conn *ic, struct icl_pdu *request,
{
struct icl_soft_pdu *isp = (struct icl_soft_pdu *)request;
struct mbuf *m, *m_tail;
- vm_offset_t vaddr;
+ char *vaddr;
size_t mtodo, page_offset, todo;
int i;
@@ -1200,8 +1200,8 @@ icl_soft_conn_pdu_append_bio(struct icl_conn *ic, struct icl_pdu *request,
do {
mtodo = min(todo, M_SIZE(m) - m->m_len);
- memcpy(mtod(m, char *) + m->m_len, (char *)vaddr +
- page_offset, mtodo);
+ memcpy(mtod(m, char *) + m->m_len, vaddr + page_offset,
+ mtodo);
m->m_len += mtodo;
if (m->m_len == M_SIZE(m))
m = m->m_next;
@@ -1269,7 +1269,7 @@ void
icl_soft_conn_pdu_get_bio(struct icl_conn *ic, struct icl_pdu *ip,
size_t pdu_off, struct bio *bp, size_t bio_off, size_t len)
{
- vm_offset_t vaddr;
+ char *vaddr;
size_t page_offset, todo;
int i __unused;
@@ -1288,7 +1288,7 @@ icl_soft_conn_pdu_get_bio(struct icl_conn *ic, struct icl_pdu *ip,
todo = MIN(len, PAGE_SIZE - page_offset);
vaddr = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(bp->bio_ma[i]));
- m_copydata(ip->ip_data_mbuf, pdu_off, todo, (char *)vaddr +
+ m_copydata(ip->ip_data_mbuf, pdu_off, todo, vaddr +
page_offset);
page_offset = 0;
diff --git a/sys/dev/vmm/vmm_mem.c b/sys/dev/vmm/vmm_mem.c
index 5a73cbf7fc5b..fc48756510ef 100644
--- a/sys/dev/vmm/vmm_mem.c
+++ b/sys/dev/vmm/vmm_mem.c
@@ -449,7 +449,7 @@ _vm_gpa_hold(struct vm *vm, vm_paddr_t gpa, size_t len, int reqprot,
if (count == 1) {
*cookie = m;
- return ((void *)(PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)) + pageoff));
+ return ((char *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)) + pageoff);
} else {
*cookie = NULL;
return (NULL);
diff --git a/sys/dev/vnic/nicvf_queues.c b/sys/dev/vnic/nicvf_queues.c
index 45d6b54b18ed..95185d39a3a8 100644
--- a/sys/dev/vnic/nicvf_queues.c
+++ b/sys/dev/vnic/nicvf_queues.c
@@ -116,7 +116,8 @@ struct rbuf_info {
struct mbuf * mbuf;
};
-#define GET_RBUF_INFO(x) ((struct rbuf_info *)((x) - NICVF_RCV_BUF_ALIGN_BYTES))
+#define GET_RBUF_INFO(x) \
+ ((struct rbuf_info *)((char *)(x) - NICVF_RCV_BUF_ALIGN_BYTES))
/* Poll a register for a specific value */
static int nicvf_poll_reg(struct nicvf *nic, int qidx,