diff options
author | jake <jake@FreeBSD.org> | 2003-03-30 01:44:16 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2003-03-30 01:44:16 +0000 |
commit | a5a502558e91ccb0dd4436698739d3c134ba1600 (patch) | |
tree | 24a9a14b22c1d404768a16d6fb58a67db4658639 /sys | |
parent | b88859c2da2181939198145777bde05e1f583403 (diff) | |
download | FreeBSD-src-a5a502558e91ccb0dd4436698739d3c134ba1600.zip FreeBSD-src-a5a502558e91ccb0dd4436698739d3c134ba1600.tar.gz |
- Remove invalid casts.
Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 4 | ||||
-rw-r--r-- | sys/amd64/include/pmap.h | 2 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 4 | ||||
-rw-r--r-- | sys/i386/include/pmap.h | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 6892275..059c007 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2028,7 +2028,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, } pa = VM_PAGE_TO_PHYS(m) & PG_FRAME; - origpte = *(vm_offset_t *)pte; + origpte = *pte; opa = origpte & PG_FRAME; if (origpte & PG_PS) @@ -2120,7 +2120,7 @@ validate: /* * Now validate mapping with desired protection/wiring. */ - newpte = (vm_offset_t) (pa | pte_prot(pmap, prot) | PG_V); + newpte = (pt_entry_t)(pa | pte_prot(pmap, prot) | PG_V); if (wired) newpte |= PG_W; diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index ad590ed..d7f0f66 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -176,7 +176,7 @@ pmap_kextract(vm_offset_t va) if ((pa = (vm_offset_t) PTD[va >> PDRSHIFT]) & PG_PS) { pa = (pa & ~(NBPDR - 1)) | (va & (NBPDR - 1)); } else { - pa = *(vm_offset_t *)vtopte(va); + pa = *vtopte(va); pa = (pa & PG_FRAME) | (va & PAGE_MASK); } return pa; diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 6892275..059c007 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -2028,7 +2028,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, } pa = VM_PAGE_TO_PHYS(m) & PG_FRAME; - origpte = *(vm_offset_t *)pte; + origpte = *pte; opa = origpte & PG_FRAME; if (origpte & PG_PS) @@ -2120,7 +2120,7 @@ validate: /* * Now validate mapping with desired protection/wiring. */ - newpte = (vm_offset_t) (pa | pte_prot(pmap, prot) | PG_V); + newpte = (pt_entry_t)(pa | pte_prot(pmap, prot) | PG_V); if (wired) newpte |= PG_W; diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index ad590ed..d7f0f66 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -176,7 +176,7 @@ pmap_kextract(vm_offset_t va) if ((pa = (vm_offset_t) PTD[va >> PDRSHIFT]) & PG_PS) { pa = (pa & ~(NBPDR - 1)) | (va & (NBPDR - 1)); } else { - pa = *(vm_offset_t *)vtopte(va); + pa = *vtopte(va); pa = (pa & PG_FRAME) | (va & PAGE_MASK); } return pa; |