]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/mm: Fix compiler warning in pgtable-ppc64.h [-Wunused-but-set-variable]
authorStratos Psomadakis <psomas@cslab.ece.ntua.gr>
Sat, 7 May 2011 04:11:31 +0000 (04:11 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 19 May 2011 04:30:41 +0000 (14:30 +1000)
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>
arch/powerpc/include/asm/pgtable-ppc64.h

index 2b09cd522d333d120ad97e1870bb63f12304e81b..81576ee0cfb1d8751c78add8e46512d716ffe66f 100644 (file)
@@ -257,21 +257,20 @@ static inline int __ptep_test_and_clear_young(struct mm_struct *mm,
 static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
                                      pte_t *ptep)
 {
-       unsigned long old;
 
-               if ((pte_val(*ptep) & _PAGE_RW) == 0)
-                       return;
-       old = pte_update(mm, addr, ptep, _PAGE_RW, 0);
+       if ((pte_val(*ptep) & _PAGE_RW) == 0)
+               return;
+
+       pte_update(mm, addr, ptep, _PAGE_RW, 0);
 }
 
 static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
                                           unsigned long addr, pte_t *ptep)
 {
-       unsigned long old;
-
        if ((pte_val(*ptep) & _PAGE_RW) == 0)
                return;
-       old = pte_update(mm, addr, ptep, _PAGE_RW, 1);
+
+       pte_update(mm, addr, ptep, _PAGE_RW, 1);
 }
 
 /*