From patchwork Tue Jan 7 20:45:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11321749 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E83C6138C for ; Tue, 7 Jan 2020 20:46:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BEE632072A for ; Tue, 7 Jan 2020 20:46:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEE632072A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 084238E0007; Tue, 7 Jan 2020 15:46:32 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 034948E0006; Tue, 7 Jan 2020 15:46:31 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E65968E0007; Tue, 7 Jan 2020 15:46:31 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0117.hostedemail.com [216.40.44.117]) by kanga.kvack.org (Postfix) with ESMTP id CE2FE8E0006 for ; Tue, 7 Jan 2020 15:46:31 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 8156A8249980 for ; Tue, 7 Jan 2020 20:46:31 +0000 (UTC) X-FDA: 76352021382.27.card25_902ef6b20e959 X-Spam-Summary: 2,0,0,e426e1d33e03b501,d41d8cd98f00b204,arnd@arndb.de,:jglisse@redhat.com:akpm@linux-foundation.org:steven.price@arm.com:sfr@canb.auug.org.au:arnd@arndb.de:aou@eecs.berkeley.edu:alex@ghiti.fr:luto@kernel.org:ard.biesheuvel@linaro.org:benh@kernel.crashing.org:bp@alien8.de:catalin.marinas@arm.com:borntraeger@de.ibm.com:dave.hansen@linux.intel.com:davem@davemloft.net:heiko.carstens@de.ibm.com:hpa@zytor.com:mingo@redhat.com:jhogan@kernel.org:james.morse@arm.com:kan.liang@linux.intel.com:mark.rutland@arm.com:mpe@ellerman.id.au:palmer@sifive.com:paul.burton@mips.com:paulus@samba.org:paul.walmsley@sifive.com:peterz@infradead.org:ralf@linux-mips.org:linux@armlinux.org.uk:tglx@linutronix.de:gor@linux.ibm.com:vgupta@synopsys.com:will@kernel.org:zong.li@sifive.com:jgg@ziepe.ca:rcampbell@nvidia.com:jhubbard@nvidia.com::linux-kernel@vger.kernel.org,RULES_HIT:41:355:379:541:800:960:968:988:989:1260:1311:1314:1345:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:1801:2393:2 559:2562 X-HE-Tag: card25_902ef6b20e959 X-Filterd-Recvd-Size: 4627 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Tue, 7 Jan 2020 20:46:30 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1MnIxu-1jVeUY1YPM-00jHl9; Tue, 07 Jan 2020 21:46:18 +0100 From: Arnd Bergmann To: =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , 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@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: pagewalk: fix unused variable warning Date: Tue, 7 Jan 2020 21:45:50 +0100 Message-Id: <20200107204607.1533842-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:nfd2MhnazBDFbdhEbkuXobt5dOcHmOdZavAoRTNw1E/Z0ByklA8 ZmWSk/F6KnOGn+N4FPoIgKcLx8FLOUTv72ZAiXvIOewWpM43sKdNXtJUfe7cNYhWL4gc5Qa 2OkGOKvYcZwKVRdUF0i504kVQWa1ePbs3WdoFcF18Lh36syCkac5LmTbH4mbSOtJGio4r5m lYhztIt8HyDSfKlf/oFoQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:SyFizkNhuwU=:SLvDzln1XdpostFeosJEMt noepWZS0FnRd5tMZNJk2BopLW9JAQSZs9viOuUd+Oaf4Xs2jaVH5zIqAbNLanFL85+898FW8f cSeFpuqZ1eroCE0ZIS14qS+/+13IS/zTrTU7lAI/ZipZRWHl9AniDLBDJeaY82SGMWBjnuYQG lYfQiVwVXq/dsFNc2WlrDbnpS1Zz6zBaeL10s4YYGrCUXxbdN9OQpM/FAs4/1eb/S00s6g5tn tHYp8yG152CrT34dxjslcpIWcu/kNnR093ZZ2Sd+5+oPYOT2aHov7PYc4iabHbAlEkY9b3bFY 9XXsN6URmOBX0ubC+5CVUGZFiZJ8xngl41SuIu1QxpexPRsNyztKYHrXHkW8SnUs/OCdp0YSH C83ZsiQd/jqQk5Yfiro7mbsb5fiVyFXgLrY5uJEbJGP1r5FIxRsjWRpteqKu2npW+D8pCoqZ+ vpf4H9hmz6AYZnl9LbWW3Hij5iydTz9DFHJqw4D89E4eNyxzcmpt5UQ29XyFIeiqMhBOyvopA thEN3MWT02eDhHReOmw4X7czemFnju3O81XiAtpOdLCNPKVwPCzzesZYMiJzzXZyH3/ABPs9t 9We+gk7fKg3GXkfVlJjJQV3IR0rZpMd1l85fzYvVAxKqvmcpDQdZNMMU7EehxAcW8Fbrptcni CuQIg9SKt1zicXc/CPuC0C/Ic68sOXSI6A5Hw4GHpXmSCuTF29PfJPLBZzp5Swq7iJC/U1PBe V3N3hQAoci/maTKmK78iHYb3FL747Bt12GYuEEiHJNtWgWjRnMjnw/zqS++mxjh2BIL+7gGoH FrMc3sHF+mrhO8KjflI2JseeaFFmSERUIBGmnBD2zuTfjbr2WonosYxGEv4gmwM+THfyA/chw ukFpbpuDo4o3IoTaMbfA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Reviewed-by: John Hubbard 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);