diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-02-09 17:24:08 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2008-02-09 17:24:08 -0500 |
commit | da7bfc50f5cb54aeee8147dca0c1de9d487cb5e0 (patch) | |
tree | d082b68848f4ed25e12ba54a7115b59fccd7cbc9 /arch | |
parent | 7c36752a6be84892afb085c67fd4209e686db482 (diff) |
x86: sparse warnings in pageattr.c
Adjust the definition of lookup_address to take an unsigned long
level argument. Adjust callers in xen/mmu.c that pass in a
dummy variable.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/mm/pageattr.c | 8 | ||||
-rw-r--r-- | arch/x86/xen/mmu.c | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 8493c855582b..eb2a54415a77 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -191,7 +191,7 @@ static inline pgprot_t static_protections(pgprot_t prot, unsigned long address) | |||
191 | * or when the present bit is not set. Otherwise we would return a | 191 | * or when the present bit is not set. Otherwise we would return a |
192 | * pointer to a nonexisting mapping. | 192 | * pointer to a nonexisting mapping. |
193 | */ | 193 | */ |
194 | pte_t *lookup_address(unsigned long address, int *level) | 194 | pte_t *lookup_address(unsigned long address, unsigned int *level) |
195 | { | 195 | { |
196 | pgd_t *pgd = pgd_offset_k(address); | 196 | pgd_t *pgd = pgd_offset_k(address); |
197 | pud_t *pud; | 197 | pud_t *pud; |
@@ -255,7 +255,8 @@ try_preserve_large_page(pte_t *kpte, unsigned long address, | |||
255 | unsigned long nextpage_addr, numpages, pmask, psize, flags; | 255 | unsigned long nextpage_addr, numpages, pmask, psize, flags; |
256 | pte_t new_pte, old_pte, *tmp; | 256 | pte_t new_pte, old_pte, *tmp; |
257 | pgprot_t old_prot, new_prot; | 257 | pgprot_t old_prot, new_prot; |
258 | int level, do_split = 1; | 258 | int do_split = 1; |
259 | unsigned int level; | ||
259 | 260 | ||
260 | spin_lock_irqsave(&pgd_lock, flags); | 261 | spin_lock_irqsave(&pgd_lock, flags); |
261 | /* | 262 | /* |
@@ -406,7 +407,8 @@ out_unlock: | |||
406 | 407 | ||
407 | static int __change_page_attr(unsigned long address, struct cpa_data *cpa) | 408 | static int __change_page_attr(unsigned long address, struct cpa_data *cpa) |
408 | { | 409 | { |
409 | int level, do_split, err; | 410 | int do_split, err; |
411 | unsigned int level; | ||
410 | struct page *kpte_page; | 412 | struct page *kpte_page; |
411 | pte_t *kpte; | 413 | pte_t *kpte; |
412 | 414 | ||
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 45aa771e73a9..0144395448ae 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -58,7 +58,7 @@ | |||
58 | 58 | ||
59 | xmaddr_t arbitrary_virt_to_machine(unsigned long address) | 59 | xmaddr_t arbitrary_virt_to_machine(unsigned long address) |
60 | { | 60 | { |
61 | int level; | 61 | unsigned int level; |
62 | pte_t *pte = lookup_address(address, &level); | 62 | pte_t *pte = lookup_address(address, &level); |
63 | unsigned offset = address & PAGE_MASK; | 63 | unsigned offset = address & PAGE_MASK; |
64 | 64 | ||
@@ -71,7 +71,7 @@ void make_lowmem_page_readonly(void *vaddr) | |||
71 | { | 71 | { |
72 | pte_t *pte, ptev; | 72 | pte_t *pte, ptev; |
73 | unsigned long address = (unsigned long)vaddr; | 73 | unsigned long address = (unsigned long)vaddr; |
74 | int level; | 74 | unsigned int level; |
75 | 75 | ||
76 | pte = lookup_address(address, &level); | 76 | pte = lookup_address(address, &level); |
77 | BUG_ON(pte == NULL); | 77 | BUG_ON(pte == NULL); |
@@ -86,7 +86,7 @@ void make_lowmem_page_readwrite(void *vaddr) | |||
86 | { | 86 | { |
87 | pte_t *pte, ptev; | 87 | pte_t *pte, ptev; |
88 | unsigned long address = (unsigned long)vaddr; | 88 | unsigned long address = (unsigned long)vaddr; |
89 | int level; | 89 | unsigned int level; |
90 | 90 | ||
91 | pte = lookup_address(address, &level); | 91 | pte = lookup_address(address, &level); |
92 | BUG_ON(pte == NULL); | 92 | BUG_ON(pte == NULL); |