Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp902085iog; Wed, 15 Jun 2022 15:12:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sfTXJ+J53hWYU5eDiIQNfzDWu7YnUTvRVEorSvhtbT6g5MuqbiGM+AQZDOZHIkYPb1nhnn X-Received: by 2002:a63:5fc3:0:b0:3fd:f15d:5df6 with SMTP id t186-20020a635fc3000000b003fdf15d5df6mr1590194pgb.573.1655331158113; Wed, 15 Jun 2022 15:12:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655331158; cv=none; d=google.com; s=arc-20160816; b=o6F+Z4dM1Nc3kzOkul7shJNpnLaIpYfqwUhXsxi4p9G//uxFJ0jF1RN5hdlFOMcuOf wwgCDQRZm7TXlpXg0Xs4fE7Yidu0RNmKBzjiK7EZ8gxRHdiQVc8TENsWkza9Ez7hIrFL 21bkDJ8CULIb4FyKqeiea6c+JxmqqUUpZ6n+7NvCGreI9JCL6ozBr5WHB0k/g9vIiiD0 +GYVfMn82JkWVa10aTzMVJxykaMlh+HWGLYHw1mgSQNhsSz10Co7l0x0dLL6veT/z7cc nF5aHn5Nqut5ygkqogmDWh9M+NjoC9RIbgBVrh/YSHjqw6vGzV8GsNH8YKzuTyC8Fsaq y/DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=liEq3vTBzjbeEOgGm9j8jdSvHDZIAOUrgNJBC9Mei7k=; b=x7On8hXUmJMW0MvhnKZso9YkCacqSA/VxUJZx3Q6zNbrf4sp/Dwj+75Vy3s66MaaAq Qz7arTZZHDOtTcoAgzBt0eQXOvUTn75C+sj4671Ze8btXGI9uM+17Ybh8zprgH2OxR7N WI9UgCgnJN8XRALCanG3GuPbTnkOHwcWf+hmGYDz9vCv6EpwXo16jnMlUpp3ayMvLXyA L6ngWPgMW3pYZejqeGJbXvslsEkFPAUXX73BGms1eMw5CJ/8MpyuBEB/WEj6wWHhlWP9 RIppON6Qhv/wtBcYKh1ymn9rF5Zsvw89wqHbH7V9XIAePg4xT28WYJmRzsV4G6nwExyU kYQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="SfpbG/R/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nn9-20020a17090b38c900b001eae90cb9b3si527503pjb.38.2022.06.15.15.12.25; Wed, 15 Jun 2022 15:12:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="SfpbG/R/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346887AbiFOVgE (ORCPT + 99 others); Wed, 15 Jun 2022 17:36:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346434AbiFOVgC (ORCPT ); Wed, 15 Jun 2022 17:36:02 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DB7B56381 for ; Wed, 15 Jun 2022 14:36:02 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id u18so11499330plb.3 for ; Wed, 15 Jun 2022 14:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=liEq3vTBzjbeEOgGm9j8jdSvHDZIAOUrgNJBC9Mei7k=; b=SfpbG/R/1cL+p415YQgXtEAqXlPY2tWuY5j5/RzVTJWFDAclmh8IcA35qoSdcVUE8B V1IfBRuDWrn5+htxaFyyCjh7MDMNohRxD8EZFppRYvipzz4fF3iBlYQ3eJBlCYgS6fwi z7vu8Itu7b8j/HYfaqt2UW71Ad2XAzi+Kn2Owajt8QvGnU/KbznSzR+88BkMTvJmmPoh l9/75WwY9Lsx3z5EMeN6IPpCq71SEwAAsZz5QB4GGZ7KM/1+BVb2rMqVmg7bH7qUbeiP RQTy/CkiAcQO7mMpQILl9QUoPhtPCFfOp9Eqw7GzoRiO9Wuy2K+C26KkxgB2LJIx2pg+ urPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=liEq3vTBzjbeEOgGm9j8jdSvHDZIAOUrgNJBC9Mei7k=; b=dHhmD5nx/m3ITW/LvHzaMLlKke88X3VHbBR9IS+zExyHij23qZTt4tMD9LqFChJ/hB DjiuOfNgEhhIZOCGoQen1xMeZk9NoILS33lEo8/CeqVSyfIJXH2kEz+rAEDEQYXUkfId Z9s2Z8Dc+Y1kFsifqXfqxus27P/WXJ3BU5UhniQKDDKdP95OKi/Z/N6droWw0drrtbLt ul3fwFqmCxNWnS2HkXfGsBWY0vME6ZRCamafnJxQmmCptQRviW5SSz/XJviu2ItjP4dj 9lhoYe+r1UixxBYJrrEaOHFgZCaaVa4jci1AAkTazGiJOZVRqb89fzIweeAHGbFcOeOp hndw== X-Gm-Message-State: AJIora+UFQ490QUblbiZKIIPj/FLRU38tN+UVrQDocz6RvCJa0jl9qdg mJj45nlecNg8EURAKAOQu3WGHMtJ8WbRg6SmcVQ= X-Received: by 2002:a17:902:8492:b0:167:6cbf:145b with SMTP id c18-20020a170902849200b001676cbf145bmr1750643plo.26.1655328961593; Wed, 15 Jun 2022 14:36:01 -0700 (PDT) MIME-Version: 1.0 References: <20220611084731.55155-1-linmiaohe@huawei.com> <20220611084731.55155-7-linmiaohe@huawei.com> In-Reply-To: <20220611084731.55155-7-linmiaohe@huawei.com> From: Yang Shi Date: Wed, 15 Jun 2022 14:35:49 -0700 Message-ID: Subject: Re: [PATCH 6/7] mm/khugepaged: remove unneeded return value of khugepaged_add_pte_mapped_thp() To: Miaohe Lin Cc: Andrew Morton , Andrea Arcangeli , Matthew Wilcox , Vlastimil Babka , David Howells , NeilBrown , Alistair Popple , David Hildenbrand , Suren Baghdasaryan , Peter Xu , Linux MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 11, 2022 at 1:47 AM Miaohe Lin wrote: > > The return value of khugepaged_add_pte_mapped_thp() is always 0 and also > ignored. Remove it to clean up the code. > > Signed-off-by: Miaohe Lin Reviewed-by: Yang Shi > --- > mm/khugepaged.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/mm/khugepaged.c b/mm/khugepaged.c > index 142e26e4bdbf..ee0a719c8be9 100644 > --- a/mm/khugepaged.c > +++ b/mm/khugepaged.c > @@ -1372,7 +1372,7 @@ static void collect_mm_slot(struct mm_slot *mm_slot) > * Notify khugepaged that given addr of the mm is pte-mapped THP. Then > * khugepaged should try to collapse the page table. > */ > -static int khugepaged_add_pte_mapped_thp(struct mm_struct *mm, > +static void khugepaged_add_pte_mapped_thp(struct mm_struct *mm, > unsigned long addr) > { > struct mm_slot *mm_slot; > @@ -1384,7 +1384,6 @@ static int khugepaged_add_pte_mapped_thp(struct mm_struct *mm, > if (likely(mm_slot && mm_slot->nr_pte_mapped_thp < MAX_PTE_MAPPED_THP)) > mm_slot->pte_mapped_thp[mm_slot->nr_pte_mapped_thp++] = addr; > spin_unlock(&khugepaged_mm_lock); > - return 0; > } > > static void collapse_and_free_pmd(struct mm_struct *mm, struct vm_area_struct *vma, > -- > 2.23.0 > >