All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stratos Psomadakis <psomas@cslab.ece.ntua.gr>
To: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] ppc64: Fix compiler warning in pgtable-ppc64.h [-Wunused-but-set-variable]
Date: Sat,  7 May 2011 17:11:31 +0300	[thread overview]
Message-ID: <1304777491-7947-3-git-send-email-psomas@cslab.ece.ntua.gr> (raw)
In-Reply-To: <1304777491-7947-1-git-send-email-psomas@cslab.ece.ntua.gr>

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>
---
 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 2b09cd5..0b27dba 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,
 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);
 }
 
 /*
-- 
1.5.6.5


  parent reply	other threads:[~2011-05-07 14:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-07 14:11 [PATCH 0/2] ppc/cleaup: Fix compiler warnings Stratos Psomadakis
2011-05-07 14:11 ` Stratos Psomadakis
2011-05-07 14:11 ` [PATCH 1/2] ppc: Fix compiler warning in ptrace.c [-Wno-array-bounds] Stratos Psomadakis
2011-05-07 15:18   ` Andreas Schwab
2011-05-07 15:54     ` [RESEND PATCH " Stratos Psomadakis
2011-05-07 15:54       ` Stratos Psomadakis
2011-05-07 15:57     ` [PATCH " Stratos Psomadakis
2011-05-07 14:11 ` Stratos Psomadakis [this message]
2011-05-08 20:02 ` [PATCH 0/2] ppc/cleaup: Fix compiler warnings Stratos Psomadakis
2011-05-08 20:02   ` Stratos Psomadakis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304777491-7947-3-git-send-email-psomas@cslab.ece.ntua.gr \
    --to=psomas@cslab.ece.ntua.gr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.