linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: pagewalk: fix unused variable warning
@ 2020-01-07 20:45 Arnd Bergmann
  2020-01-07 21:00 ` John Hubbard
  2020-01-08 11:22 ` Steven Price
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2020-01-07 20:45 UTC (permalink / raw)
  To: Jérôme Glisse, Andrew Morton, Steven Price, Stephen Rothwell
  Cc: Arnd Bergmann, Albert Ou, Alexandre Ghiti, Andy Lutomirski,
	Ard Biesheuvel, Benjamin Herrenschmidt, Borislav Petkov,
	Catalin Marinas, Christian Borntraeger, Dave Hansen,
	David S. Miller, Heiko Carstens, H. Peter Anvin, Ingo Molnar,
	James Hogan, James Morse, Liang, Kan, Mark Rutland,
	Michael Ellerman, Palmer Dabbelt, Paul Burton, Paul Mackerras,
	Paul Walmsley, Peter Zijlstra, Ralf Baechle, Russell King,
	Thomas Gleixner, Vasily Gorbik, Vineet Gupta, Will Deacon,
	Zong Li, Jason Gunthorpe, Ralph Campbell, John Hubbard, linux-mm,
	linux-kernel

One of the pagewalk patches introduced a harmless warning:

mm/hmm.c: In function 'hmm_vma_walk_pud':
mm/hmm.c:478:9: error: unused variable 'pmdp' [-Werror=unused-variable]
  pmd_t *pmdp;
         ^~~~
mm/hmm.c:477:30: error: unused variable 'next' [-Werror=unused-variable]
  unsigned long addr = start, next;
                              ^~~~

Remove both of the now-unused variables.

Fixes: cb4d03d5fb4c ("mm: pagewalk: add p4d_entry() and pgd_entry()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 mm/hmm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/hmm.c b/mm/hmm.c
index a71295e99968..72e5a6d9a417 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -474,8 +474,7 @@ static int hmm_vma_walk_pud(pud_t *pudp, unsigned long start, unsigned long end,
 {
 	struct hmm_vma_walk *hmm_vma_walk = walk->private;
 	struct hmm_range *range = hmm_vma_walk->range;
-	unsigned long addr = start, next;
-	pmd_t *pmdp;
+	unsigned long addr = start;
 	pud_t pud;
 	int ret = 0;
 	spinlock_t *ptl = pud_trans_huge_lock(pudp, walk->vma);
-- 
2.20.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-08 11:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 20:45 [PATCH] mm: pagewalk: fix unused variable warning Arnd Bergmann
2020-01-07 21:00 ` John Hubbard
2020-01-08 11:22 ` Steven Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).