Date: Tue, 18 May 2021 00:06:07 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 8d2b4b2e7c1e - main - cxgbe: Cast pointer arguments to trunc_page() to vm_offset_t. Message-ID: <202105180006.14I067uC080743@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8d2b4b2e7c1e0b10c4d49963753db31c4794dbc4 commit 8d2b4b2e7c1e0b10c4d49963753db31c4794dbc4 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2021-05-18 00:04:22 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2021-05-18 00:04:22 +0000 cxgbe: Cast pointer arguments to trunc_page() to vm_offset_t. Reported by: mjg, jenkins, rmacklem Fixes: 46bee8043ee2bd352d420cd573e0364ca45f813e Sponsored by: Chelsio Communications --- sys/dev/cxgbe/tom/t4_ddp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_ddp.c b/sys/dev/cxgbe/tom/t4_ddp.c index c266a2e39fa9..34c01674659a 100644 --- a/sys/dev/cxgbe/tom/t4_ddp.c +++ b/sys/dev/cxgbe/tom/t4_ddp.c @@ -1042,7 +1042,7 @@ have_pgsz: npages = 0; while (entries--) { npages++; - start_pva = trunc_page(sgl->addr); + start_pva = trunc_page((vm_offset_t)sgl->addr); end_pva = trunc_page((vm_offset_t)sgl->addr + sgl->len - 1); npages += (end_pva - start_pva) >> pr->pr_page_shift[idx]; sgl = sgl + 1; @@ -1297,7 +1297,7 @@ t4_write_page_pods_for_sgl(struct adapter *sc, struct toepcb *toep, ddp_pgsz = 1 << pr->pr_page_shift[G_PPOD_PGSZ(prsv->prsv_tag)]; offset = (vm_offset_t)sgl->addr & PAGE_MASK; ppod_addr = pr->pr_start + (prsv->prsv_tag & pr->pr_tag_mask); - pva = trunc_page(sgl->addr); + pva = trunc_page((vm_offset_t)sgl->addr); mbufq_init(&wrq, INT_MAX); for (i = 0; i < prsv->prsv_nppods; ppod_addr += chunk) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105180006.14I067uC080743>