PATCH: powerpc: remove unused variable assignment
Hi,
gcc 4.6 with -Werror does not like setting but not using variables anymore.
So remove it, it does not seem necessary.
Signed-off-by Marcus Meissner <[email protected]>
Ciao, Marcus
--- arch/powerpc/include/asm/pgtable-ppc64.h | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-)
arch/powerpc/include/asm/pgtable-ppc64.h +2 -6
@@ -257,21 +257,17 @@ 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 ); +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 ); }/*
Signature · 1 line
1.7.4.1
Quoted 32 lines · Marcus Meissner
Hi,
gcc 4.6 with -Werror does not like setting but not using variables anymore.
So remove it, it does not seem necessary.
Signed-off-by Marcus Meissner <[email protected]>Ciao, Marcus
--- arch/powerpc/include/asm/pgtable-ppc64.h | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-)arch/powerpc/include/asm/pgtable-ppc64.h +1
-3@@ -257,21 +257,17 @@ 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 ); +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)
arch/powerpc/include/asm/pgtable-ppc64.h static inline int __ptep_test_and_clear_young(struct mm_struct *mm, · line 273
Quoted 10 lines
arch/powerpc/include/asm/pgtable-ppc64.h +1
-3{ -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 ); }/*
It's already in the ppc repo [1]. And going to be merged in 2.6.40 I think. :)
Signature · 2 lines
Stratos Psomadakis <[email protected]>