From patchwork Wed Feb 24 20:07:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12102661 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 20589C433DB for ; Wed, 24 Feb 2021 20:07:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A2EC864F29 for ; Wed, 24 Feb 2021 20:07:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2EC864F29 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2B7848D0028; Wed, 24 Feb 2021 15:07:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 218628D001E; Wed, 24 Feb 2021 15:07:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 107128D0028; Wed, 24 Feb 2021 15:07:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0185.hostedemail.com [216.40.44.185]) by kanga.kvack.org (Postfix) with ESMTP id EB1D88D001E for ; Wed, 24 Feb 2021 15:07:31 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id AA7FE185044DA for ; Wed, 24 Feb 2021 20:07:31 +0000 (UTC) X-FDA: 77854246302.02.5959895 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf09.hostedemail.com (Postfix) with ESMTP id 4C1CF60024A9 for ; Wed, 24 Feb 2021 20:07:27 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 0B5F864F20; Wed, 24 Feb 2021 20:07:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1614197250; bh=x4Kev3w/HWUO8XzagillSlgaP/LUtP4yRoEgl1VDGMU=; h=Date:From:To:Subject:In-Reply-To:From; b=mcY/GET/sAC05KhQd9j3+V4Nsnc9FiK9VaaT41VB5p+0DU+gHgaiyHZ+pKKvgd76F t9UKpig+eBQkdqLCI+VfCCILOf8V/++doBZpSzqBScIgocgy1sepAWgPAtONHJImrn kW375lDKK5sxh/64wXy2GnhtVdfka4Jl808gg18k= Date: Wed, 24 Feb 2021 12:07:29 -0800 From: Andrew Morton To: akpm@linux-foundation.org, linmiaohe@huawei.com, linux-mm@kvack.org, mike.kravetz@oracle.com, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 124/173] mm/huge_memory.c: remove unused return value of set_huge_zero_page() Message-ID: <20210224200729._Bjv-Xo-g%akpm@linux-foundation.org> In-Reply-To: <20210224115824.1e289a6895087f10c41dd8d6@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Stat-Signature: b79z55kb4xizc6xrbk4m1ypudzk86mny X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 4C1CF60024A9 Received-SPF: none (linux-foundation.org>: No applicable sender policy available) receiver=imf09; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614197247-558309 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: From: Miaohe Lin Subject: mm/huge_memory.c: remove unused return value of set_huge_zero_page() The return value of set_huge_zero_page() is always ignored. So we should drop such return value. Link: https://lkml.kernel.org/r/20210203084816.46307-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Mike Kravetz Signed-off-by: Andrew Morton --- mm/huge_memory.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/mm/huge_memory.c~mm-remove-unused-return-value-of-set_huge_zero_page +++ a/mm/huge_memory.c @@ -691,20 +691,19 @@ static inline gfp_t alloc_hugepage_direc } /* 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; + return; entry = mk_pmd(zero_page, vma->vm_page_prot); entry = 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; } vm_fault_t do_huge_pmd_anonymous_page(struct vm_fault *vmf)