From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFE8AC33C9E for ; Wed, 8 Jan 2020 11:22:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD977206DB for ; Wed, 8 Jan 2020 11:22:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726814AbgAHLWf (ORCPT ); Wed, 8 Jan 2020 06:22:35 -0500 Received: from foss.arm.com ([217.140.110.172]:42756 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726107AbgAHLWf (ORCPT ); Wed, 8 Jan 2020 06:22:35 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9AAFD30E; Wed, 8 Jan 2020 03:22:34 -0800 (PST) Received: from arm.com (e112269-lin.cambridge.arm.com [10.1.194.52]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 22C303F703; Wed, 8 Jan 2020 03:22:30 -0800 (PST) Date: Wed, 8 Jan 2020 11:22:22 +0000 From: Steven Price To: Arnd Bergmann Cc: =?iso-8859-1?B?Suly9G1l?= Glisse , Andrew Morton , Stephen Rothwell , 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@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] mm: pagewalk: fix unused variable warning Message-ID: <20200108112221.GA37977@arm.com> References: <20200107204607.1533842-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200107204607.1533842-1-arnd@arndb.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 07, 2020 at 08:45:50PM +0000, Arnd Bergmann wrote: > 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 Gah! Sorry about that, thanks for fixing it up. Reviewed-by: Steven Price > --- > 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 >