diff options
author | kib <kib@FreeBSD.org> | 2015-05-29 13:24:17 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-05-29 13:24:17 +0000 |
commit | e2f56205b5cb974ce90bb8e1753845d84f4401cf (patch) | |
tree | c8c8cba4f0c624f3f4b5849c24f18e203d98409e /sys/amd64/amd64/pmap.c | |
parent | a1e13e9e590c569e31b8bf4ccd7679b392a2d815 (diff) | |
download | FreeBSD-src-e2f56205b5cb974ce90bb8e1753845d84f4401cf.zip FreeBSD-src-e2f56205b5cb974ce90bb8e1753845d84f4401cf.tar.gz |
Remove several write-only variables, all reported by the gcc 4.9
buildkernel run.
Some of them were write-only under some kernel options, e.g. variables
keeping values only used by CTR() macros. It costs nothing to the
code readability and correctness to eliminate the warnings in those
cases too by removing the local cached values used only for
single-access.
Review: https://reviews.freebsd.org/D2665
Reviewed by: rodrigc
Looked at by: bjk
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Diffstat (limited to 'sys/amd64/amd64/pmap.c')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 5f9ee91..7f256cd 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -3935,7 +3935,6 @@ 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; pt_entry_t PG_G, PG_A, PG_M, PG_RW, PG_V; - vm_offset_t oldpteva; vm_page_t mpte; int PG_PTE_CACHE; @@ -3995,10 +3994,9 @@ setpte: if (!atomic_cmpset_long(pte, oldpte, oldpte & ~PG_RW)) goto setpte; oldpte &= ~PG_RW; - oldpteva = (oldpte & PG_FRAME & PDRMASK) | - (va & ~PDRMASK); CTR2(KTR_PMAP, "pmap_promote_pde: protect for va %#lx" - " in pmap %p", oldpteva, pmap); + " in pmap %p", (oldpte & PG_FRAME & PDRMASK) | + (va & ~PDRMASK), pmap); } if ((oldpte & PG_PTE_PROMOTE) != (newpde & PG_PTE_PROMOTE)) { atomic_add_long(&pmap_pde_p_failures, 1); |