git: b195d7498b91 - main - nvme: avoid gcc -Werror=int-to-pointer-cast on 32-bit arch
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Jun 2024 03:50:57 UTC
The branch main has been updated by rlibby:
URL: https://cgit.FreeBSD.org/src/commit/?id=b195d7498b91c4a507723f71b3b383dfeef39d86
commit b195d7498b91c4a507723f71b3b383dfeef39d86
Author: Ryan Libby <rlibby@FreeBSD.org>
AuthorDate: 2024-06-27 03:50:04 +0000
Commit: Ryan Libby <rlibby@FreeBSD.org>
CommitDate: 2024-06-27 03:50:04 +0000
nvme: avoid gcc -Werror=int-to-pointer-cast on 32-bit arch
Reviewed by: chuck (previous version), imp
Differential Revision: https://reviews.freebsd.org/D45750
---
sys/dev/nvme/nvme_ctrlr.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
index f058a4e33b9f..e07ac737ffc8 100644
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -1363,14 +1363,16 @@ nvme_ctrlr_linux_passthru_cmd(struct nvme_controller *ctrlr,
PHOLD(curproc);
buf = uma_zalloc(pbuf_zone, M_WAITOK);
buf->b_iocmd = npc->opcode & 1 ? BIO_WRITE : BIO_READ;
- if (vmapbuf(buf, (void *)npc->addr, npc->data_len, 1) < 0) {
+ if (vmapbuf(buf, (void *)(uintptr_t)npc->addr,
+ npc->data_len, 1) < 0) {
ret = EFAULT;
goto err;
}
req = nvme_allocate_request_vaddr(buf->b_data, npc->data_len,
nvme_npc_done, npc);
} else
- req = nvme_allocate_request_vaddr((void *)npc->addr, npc->data_len,
+ req = nvme_allocate_request_vaddr(
+ (void *)(uintptr_t)npc->addr, npc->data_len,
nvme_npc_done, npc);
} else
req = nvme_allocate_request_null(nvme_npc_done, npc);