diff options
author | Stratos Psomadakis <psomas@cslab.ece.ntua.gr> | 2011-05-07 00:11:31 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-19 00:30:41 -0400 |
commit | 2a2c29c1a581319f4485af55e8d628d89e8f2583 (patch) | |
tree | 46697cbb6e570d8eb3be18c4f44dd42819530a47 /arch/powerpc/include/asm/pgtable-ppc64.h | |
parent | af442a1baa6d00117cc7e7377ce7e6a545268684 (diff) |
powerpc/mm: Fix compiler warning in pgtable-ppc64.h [-Wunused-but-set-variable]
The variable 'old' is set but not used in the wrprotect functions in
arch/powerpc/include/asm/pgtable-ppc64.h, which can trigger a compiler warning.
Remove the variable, since it's not used anyway.
Signed-off-by: Stratos Psomadakis <psomas@ece.ntua.gr>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/pgtable-ppc64.h')
-rw-r--r-- | arch/powerpc/include/asm/pgtable-ppc64.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h index 2b09cd522d33..81576ee0cfb1 100644 --- a/arch/powerpc/include/asm/pgtable-ppc64.h +++ b/arch/powerpc/include/asm/pgtable-ppc64.h | |||
@@ -257,21 +257,20 @@ static inline int __ptep_test_and_clear_young(struct mm_struct *mm, | |||
257 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, | 257 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, |
258 | pte_t *ptep) | 258 | pte_t *ptep) |
259 | { | 259 | { |
260 | unsigned long old; | ||
261 | 260 | ||
262 | if ((pte_val(*ptep) & _PAGE_RW) == 0) | 261 | if ((pte_val(*ptep) & _PAGE_RW) == 0) |
263 | return; | 262 | return; |
264 | old = pte_update(mm, addr, ptep, _PAGE_RW, 0); | 263 | |
264 | pte_update(mm, addr, ptep, _PAGE_RW, 0); | ||
265 | } | 265 | } |
266 | 266 | ||
267 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | 267 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, |
268 | unsigned long addr, pte_t *ptep) | 268 | unsigned long addr, pte_t *ptep) |
269 | { | 269 | { |
270 | unsigned long old; | ||
271 | |||
272 | if ((pte_val(*ptep) & _PAGE_RW) == 0) | 270 | if ((pte_val(*ptep) & _PAGE_RW) == 0) |
273 | return; | 271 | return; |
274 | old = pte_update(mm, addr, ptep, _PAGE_RW, 1); | 272 | |
273 | pte_update(mm, addr, ptep, _PAGE_RW, 1); | ||
275 | } | 274 | } |
276 | 275 | ||
277 | /* | 276 | /* |