Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Apr 2022 00:27:53 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: c1480b1702b4 - main - i386 pmap: Re-quiet set but unused warnings.
Message-ID:  <202204090027.2390RrJW056578@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=c1480b1702b412e4448cd4ce0bade77d76e8fa26

commit c1480b1702b412e4448cd4ce0bade77d76e8fa26
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-09 00:25:13 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-09 00:25:13 +0000

    i386 pmap: Re-quiet set but unused warnings.
    
    __diagused no longer covers KTR, so use explicit #ifdef KTR instead.
---
 sys/i386/i386/pmap.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 4644083b6408..2452445f7203 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -3493,7 +3493,9 @@ pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va)
 {
 	pd_entry_t newpde;
 	pt_entry_t *firstpte, oldpte, pa, *pte;
-	vm_offset_t oldpteva __diagused;
+#ifdef KTR
+	vm_offset_t oldpteva;
+#endif
 	vm_page_t mpte;
 
 	PMAP_LOCK_ASSERT(pmap, MA_OWNED);
@@ -3553,8 +3555,10 @@ setpte:
 			    oldpte & ~PG_RW))
 				goto setpte;
 			oldpte &= ~PG_RW;
+#ifdef KTR
 			oldpteva = (oldpte & PG_FRAME & PDRMASK) |
 			    (va & ~PDRMASK);
+#endif
 			CTR2(KTR_PMAP, "pmap_promote_pde: protect for va %#x"
 			    " in pmap %p", oldpteva, pmap);
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204090027.2390RrJW056578>