Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7427164ybn; Mon, 30 Sep 2019 13:46:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyM071zG3hBeKbF2K0nHP/A2iNGUGls9Z1BqQHaLTe2BAdO3BuExeChRvpdrMcsnCTqsQxq X-Received: by 2002:a17:906:ecb6:: with SMTP id qh22mr20904672ejb.114.1569876401049; Mon, 30 Sep 2019 13:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569876401; cv=none; d=google.com; s=arc-20160816; b=WZ01IAcsNQY+MGWkHlKvgqbUgyoDMsgdNEuqprlMrQjAIcRpkEpjthGueuiJkSKO0t 9J9Mjs/75rFWFBOXiBeD0tgdAQo+J7bkXCxcKzxgys9/KSLyuvUSb/XICCPlMjjFTct6 zKbzjINjj2eNiqlgVsueeKnuWiR1VUn8r9D1ZT1iMGwOYVmrApyuqZD8v1jaxPMBBTUT o72xHOGBrWCHidfCsTk3vkm8zRkM+MCE1zd0hZYGLodkzpmaSoapcXiEtewF/HrYaNYU 48uqfWWMpy029z5E7qOPiLxY7HFrtPHpUHJw6azN3xBDKl3pwb8wO8MS2iu66xHqIK6P RORw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=5H2qPyiWDn47uqy9zIJy1yaJpC2vjsTK5L+ez/p+EZU=; b=HH5RJsxgYiqYm8SY/2Ndf16V9quPc+jr5xla2b5uRzs4CNrUjnTUwagmSQU6Dn0Gjg HEcebXCpkXPnQUUu5jc4Q4TtncTA+V+e8fnkIIAvmFpoJqNF33TRmU7ikUnSpc43CelW 1dnQ0iaodCfoj2AM+rYQOhZOVf9pJjdNR9svebphrMXcMSk+x6I7CDfqV5gK/Vy2vNN5 mOY6xh3BMbF+F/8JXzwk2iPoT+pCxYuJNEHdkxC2Dp+5+H+Xtcw3NYSHM+1HLNxfBUkD 9fhDjl6kBPELFxPlxILLxo7y7IYF8YRdcdN6dCVzKXSIDP+35Z6JwEtGjKh/TJrdb0LO jy8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=nDTe8mCy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v26si7280847eja.230.2019.09.30.13.46.16; Mon, 30 Sep 2019 13:46:41 -0700 (PDT) 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=@nvidia.com header.s=n1 header.b=nDTe8mCy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730693AbfI3UqM (ORCPT + 99 others); Mon, 30 Sep 2019 16:46:12 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:16170 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729066AbfI3UqL (ORCPT ); Mon, 30 Sep 2019 16:46:11 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 30 Sep 2019 12:55:48 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Mon, 30 Sep 2019 12:55:40 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Mon, 30 Sep 2019 12:55:40 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 30 Sep 2019 19:55:40 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 30 Sep 2019 19:55:40 +0000 Received: from rcampbell-dev.nvidia.com (Not Verified[10.110.48.66]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Mon, 30 Sep 2019 12:55:40 -0700 From: Ralph Campbell To: CC: , "Kirill A . Shutemov" , Andrew Morton , Ralph Campbell Subject: [PATCH] mm/thp: make set_huge_zero_page() return void Date: Mon, 30 Sep 2019 12:55:28 -0700 Message-ID: <20190930195528.32553-1-rcampbell@nvidia.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: quoted-printable Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1569873348; bh=5H2qPyiWDn47uqy9zIJy1yaJpC2vjsTK5L+ez/p+EZU=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:X-NVConfidentiality:Content-Transfer-Encoding: Content-Type; b=nDTe8mCyf7ivJABZxIQxgN9Ejhl/rQe7zR0VTSvcPw/K+jzPlmq9K/DY0JidJl41p BmzxlD1v+LyEOqAVBSTWDVza3cyvfCDZyzBQwLdh3jx0Ln1ecmZ4n583SP3oiw9wch Rs4TyF4bS7OpLQbbADfry5Ygno6sMPsjSx6PPEI8l5HusFr0zzS52wMK2J9C0jxxvN 1PqIwWdU/rbUjTjDNEheKeiSfduVs/wg51T2z1/GckxhBz4/1OyeWMjNVnm+llMjwn lBjxCsLN4RZ/5lja7DiT8R6P9Pzu3ZJUNULM2pA+6FjM0reolqCYL89GUYfZLQYGtO 3r+tu58B8w83g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The return value from set_huge_zero_page() is never checked so simplify the code by making it return void. Signed-off-by: Ralph Campbell --- mm/huge_memory.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index c5cb6dcd6c69..6cf0ee65538d 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -686,20 +686,18 @@ static inline gfp_t alloc_hugepage_direct_gfpmask(str= uct vm_area_struct *vma) } =20 /* Caller must hold page table lock. */ -static bool set_huge_zero_page(pgtable_t pgtable, struct mm_struct *mm, +static void set_huge_zero_page(pgtable_t pgtable, struct mm_struct *mm, struct vm_area_struct *vma, unsigned long haddr, pmd_t *pmd, struct page *zero_page) { pmd_t entry; - if (!pmd_none(*pmd)) - return false; + entry =3D mk_pmd(zero_page, vma->vm_page_prot); entry =3D pmd_mkhuge(entry); if (pgtable) pgtable_trans_huge_deposit(mm, pmd, pgtable); set_pmd_at(mm, haddr, pmd, entry); mm_inc_nr_ptes(mm); - return true; } =20 vm_fault_t do_huge_pmd_anonymous_page(struct vm_fault *vmf) --=20 2.20.1