Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp796224imb; Fri, 1 Mar 2019 14:22:00 -0800 (PST) X-Google-Smtp-Source: AHgI3IZU/H4X8HUnfkdZ+OXD4+tEzWN0TFB8OCzwqXFDDw3s995cxXiFVSufN0tc5yLdDxaURkY9 X-Received: by 2002:a62:ee0e:: with SMTP id e14mr7977117pfi.201.1551478920209; Fri, 01 Mar 2019 14:22:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551478920; cv=none; d=google.com; s=arc-20160816; b=Uvn5xIsp9vewwX7G4b/hthE/18uW414KKaAlJn7BTdFrAXp50mDlkhdwrkpOIPvrZs cWwG2OmVO1jPejdnervcWxBaTtQYdCy2i4Jof/23g/8em50ev8maotpEbVMy4V3+ZyP9 OxlEZ12YilQkKCamZblokTm/X8mqHREKi2oLVCECAQnflBIk3qAEtdC0JkDYLKBI0fHL rZYUus8rrWyeA8YJR8nsF8jP06fpZsYALXDwt1hhiq0oxBhQY8iLcGQ8400Vd4x/Mimj /GVYPKqKWOViPpLNo33Om/cKyY8qft4bDjqhWkclV6dxWfpQtKqpfADfofaXom3Z00om 7Z6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=iQozw9AJ+KagTRxIhD3lA5iUQt/T2sO/BmSDzwBmI0I=; b=LHqwNzvquwJU8sUcj0NRzwfwQwoKhXRw/XG/dKzh0NDfGGnqfzNGg51UdLRKwi0WeS qg2A0Z2ulqG0XqSHbRV5Bd/dVAXvBVUd5SQ19KsB1GvxuWv/iH2EtR1quOtqGjHwXLRA a7k/tUfqjWLZ6BBn1zeMjrnFstUaVWfLUY7of6R/r3GRCWuPMRcDNQfXiyDLdMblpE78 RFm7LFROOzJmM6ggc24MvQvjPOQ/Qr1AX00H8aJU6V4I4PjlzNKxMkASAd2GdSSPbW4B q2OGkNcyeV88s5tGQy/vBrCjtSSdaTtE3dH+9yCumrzvZ9tuM4A0C3Qe01QS/7AkJ308 1Mrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=mYRUpQ85; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a72si20960829pge.100.2019.03.01.14.21.44; Fri, 01 Mar 2019 14:22:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=mYRUpQ85; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726534AbfCAWUL (ORCPT + 99 others); Fri, 1 Mar 2019 17:20:11 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:34697 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbfCAWUL (ORCPT ); Fri, 1 Mar 2019 17:20:11 -0500 Received: by mail-qt1-f195.google.com with SMTP id w4so29746474qtc.1 for ; Fri, 01 Mar 2019 14:20:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id; bh=iQozw9AJ+KagTRxIhD3lA5iUQt/T2sO/BmSDzwBmI0I=; b=mYRUpQ85kazeSJtNKWBFjpoQ0z+813L+c52GVx7Z1Wbn2Zgloz8PHCIM+/3IWZy8zG qcUh6dELXtCb3AckNCC5U4AxmDj+IXsJFnV0nHhJqZFR521wBhKRv7fro7YuxHoU6WKl 09lIITb1V+71mPeAJKAFPKdyM+Q7O2FGiPchNe0NV7++VqYlOJZj/hgjxQXlHBeaaYxu as2BY/iZg4f4BWG3kicSAfmXlzlcmTPTKGNODk741KJQCgrN4VG5C0QnzECzEeI/Kw8q QUv/Y3yKe+SimYQk027lH3ynSOmiIpXb/8z5SrkZOvxK2ENEkuOL1rZFAiWHh6zHvv+d hJrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iQozw9AJ+KagTRxIhD3lA5iUQt/T2sO/BmSDzwBmI0I=; b=NiHHextdeO+ga+LqfuiOP1IrcvTw3UjR/Cr/N7Boh0KAsi3i1hnsAVTlGiqi8h1RS9 4UuTFCiOL3oYkCGwXq2H1tBcMCnAdmjq1MQ+hFBmC8IEtHzEeRfWivkrAT5NaQz4c0FF nbQOG8ltank3s8arnt4lBgWMjyoP25WW51v46lOKV4yKB6ZQR4ntFKGcnj3ekEbXconX lU4L067j51DCzqhC/HafqFFIjGjSNhTbrNIFz40918EQynzOfR6QIgsHBHoxlqx4pVIn tBKuL72lYduL/PoomhMQIgNr4NdLjfiv6LdmpXTdsF1uMz7yJdi0QzBlNaTv1oA4g/J4 +P+A== X-Gm-Message-State: APjAAAU2baqUeNYgFk28KKAGpT/w2CRLwI8wGh9R7mkgmOi/dgQesPxg thIKfTZmuyyi8cwIUeKnP97joXnvCN4= X-Received: by 2002:aed:3574:: with SMTP id b49mr5864696qte.235.1551478809856; Fri, 01 Mar 2019 14:20:09 -0800 (PST) Received: from ovpn-120-151.rdu2.redhat.com (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id q23sm11364857qkc.64.2019.03.01.14.20.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Mar 2019 14:20:09 -0800 (PST) From: Qian Cai To: akpm@linux-foundation.org Cc: willy@infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Qian Cai Subject: [PATCH v2] mm/hugepages: fix "orig_pud" set but not used Date: Fri, 1 Mar 2019 17:19:56 -0500 Message-Id: <20190301221956.97493-1-cai@lca.pw> X-Mailer: git-send-email 2.17.2 (Apple Git-113) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The commit a00cc7d9dd93 ("mm, x86: add support for PUD-sized transparent hugepages") introduced pudp_huge_get_and_clear_full() but no one uses its return code. In order to not diverge from pmdp_huge_get_and_clear_full(), just change zap_huge_pud() to not assign the return value from pudp_huge_get_and_clear_full(). mm/huge_memory.c: In function 'zap_huge_pud': mm/huge_memory.c:1982:8: warning: variable 'orig_pud' set but not used [-Wunused-but-set-variable] pud_t orig_pud; ^~~~~~~~ Signed-off-by: Qian Cai --- v2: keep returning a code from pudp_huge_get_and_clear_full() for possible future uses. mm/huge_memory.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index faf357eaf0ce..9f57a1173e6a 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1979,7 +1979,6 @@ spinlock_t *__pud_trans_huge_lock(pud_t *pud, struct vm_area_struct *vma) int zap_huge_pud(struct mmu_gather *tlb, struct vm_area_struct *vma, pud_t *pud, unsigned long addr) { - pud_t orig_pud; spinlock_t *ptl; ptl = __pud_trans_huge_lock(pud, vma); @@ -1991,8 +1990,7 @@ int zap_huge_pud(struct mmu_gather *tlb, struct vm_area_struct *vma, * pgtable_trans_huge_withdraw after finishing pudp related * operations. */ - orig_pud = pudp_huge_get_and_clear_full(tlb->mm, addr, pud, - tlb->fullmm); + pudp_huge_get_and_clear_full(tlb->mm, addr, pud, tlb->fullmm); tlb_remove_pud_tlb_entry(tlb, pud, addr); if (vma_is_dax(vma)) { spin_unlock(ptl); -- 2.17.2 (Apple Git-113)