* PATCH: powerpc: remove unused variable assignment
@ 2011-05-20 9:13 Marcus Meissner
2011-05-20 20:31 ` Stratos Psomadakis
0 siblings, 1 reply; 3+ messages in thread
From: Marcus Meissner @ 2011-05-20 9:13 UTC (permalink / raw)
To: benh, paulus, akpm, linuxppc-dev, linux-kernel
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 <meissner@suse.de>
Ciao, Marcus
---
arch/powerpc/include/asm/pgtable-ppc64.h | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
index 2b09cd5..c3d39de 100644
--- a/arch/powerpc/include/asm/pgtable-ppc64.h
+++ b/arch/powerpc/include/asm/pgtable-ppc64.h
@@ -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);
}
/*
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: PATCH: powerpc: remove unused variable assignment
2011-05-20 9:13 PATCH: powerpc: remove unused variable assignment Marcus Meissner
@ 2011-05-20 20:31 ` Stratos Psomadakis
0 siblings, 0 replies; 3+ messages in thread
From: Stratos Psomadakis @ 2011-05-20 20:31 UTC (permalink / raw)
To: Marcus Meissner; +Cc: benh, paulus, akpm, linuxppc-dev, linux-kernel
On 05/20/2011 12:13 PM, Marcus Meissner wrote:
> 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 <meissner@suse.de>
>
> Ciao, Marcus
> ---
> arch/powerpc/include/asm/pgtable-ppc64.h | 8 ++------
> 1 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
> index 2b09cd5..c3d39de 100644
> --- a/arch/powerpc/include/asm/pgtable-ppc64.h
> +++ b/arch/powerpc/include/asm/pgtable-ppc64.h
> @@ -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);
> }
>
> /*
It's already in the ppc repo [1]. And going to be merged in 2.6.40 I
think. :)
[1]
http://git.kernel.org/?p=linux/kernel/git/benh/powerpc.git;a=commit;h=2a2c29c1a581319f4485af55e8d628d89e8f2583
--
Stratos Psomadakis
<psomas@ece.ntua.gr>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PATCH: powerpc: remove unused variable assignment
@ 2011-05-20 20:31 ` Stratos Psomadakis
0 siblings, 0 replies; 3+ messages in thread
From: Stratos Psomadakis @ 2011-05-20 20:31 UTC (permalink / raw)
To: Marcus Meissner; +Cc: akpm, paulus, linuxppc-dev, linux-kernel
On 05/20/2011 12:13 PM, Marcus Meissner wrote:
> 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 <meissner@suse.de>
>
> Ciao, Marcus
> ---
> arch/powerpc/include/asm/pgtable-ppc64.h | 8 ++------
> 1 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
> index 2b09cd5..c3d39de 100644
> --- a/arch/powerpc/include/asm/pgtable-ppc64.h
> +++ b/arch/powerpc/include/asm/pgtable-ppc64.h
> @@ -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);
> }
>
> /*
It's already in the ppc repo [1]. And going to be merged in 2.6.40 I
think. :)
[1]
http://git.kernel.org/?p=linux/kernel/git/benh/powerpc.git;a=commit;h=2a2c29c1a581319f4485af55e8d628d89e8f2583
--
Stratos Psomadakis
<psomas@ece.ntua.gr>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-20 20:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-20 9:13 PATCH: powerpc: remove unused variable assignment Marcus Meissner
2011-05-20 20:31 ` Stratos Psomadakis
2011-05-20 20:31 ` Stratos Psomadakis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.