Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5618942rwl; Wed, 28 Dec 2022 23:32:13 -0800 (PST) X-Google-Smtp-Source: AMrXdXtSnCmZZeLBwfVkh6PZ0pGKxpkCEEo87KKH+QSrGBSfvb4rkDo4MiO3QoDNIDpFvxl7GbOz X-Received: by 2002:a05:6a00:be9:b0:580:f5a8:2e2b with SMTP id x41-20020a056a000be900b00580f5a82e2bmr17673488pfu.8.1672299133118; Wed, 28 Dec 2022 23:32:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672299133; cv=none; d=google.com; s=arc-20160816; b=Q5klOKex0p45v5ix++YtP+VtciYk32yxJKxLdOCIf02TnwyL7GpJWgK1Kv9C4saenK h0K0XGH3Pa9Sb0oj2zZ7kFrydV7K3PsGN8vhkUflVR7zKpUSs06u9aJLVktDWEgj/623 Mduo6av11SWDiiSsr14T9aEOhowcrSnx4tsmvB6jnsbC9/fXxX4obvhRkF25yETbYBCT YhBl/7WxuhawBJV7ioQGp4O0KPZ6PPRlUbh/kqqy696qyR0NzT1rzwIpwoLPHJ/fpMOI hPtxDTRvRZ+ETHhfzJkQlAe3vt2bQuvUWjshEJPJM+3ea6sEqO6BBbzUzdZql1TpOInR wN4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=NyO6uqjB2dwZSOm3XGde3tp+drDUDYghg+k6MNgNHXY=; b=Oc0BOQHjKrkQ3V080+yy59NplraD3w6CwQuaJ+WtIktux/sK0gAE74m3Ct5u344kdD hrzh8338yojowdgLgvkWzr26n6sPR9n/fG2o8szjMgLS4klpZtW+RNjO0KOBTVyIeXvA ImJ23/8lSY30TaFWckmEQ4lqG7sbcr0aUjnsvM/Hq7ydAh6gOCuOaqWcGiNgMWiHE38B VV0zRmghl9mW/6gdfBbv3kTZmFsdMa/aBpZxAL8AFLXTSFeQtqI1xgDNS7uuRKS4aGzl bdG+s2Mpg3PDi0S0M6XgunTLVPQM+2VDNwibfCONNn6dgVr+Rfl8J7k2aAoG6Co1a3NX C0hw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u194-20020a6279cb000000b005814aae3d2asi8051687pfc.312.2022.12.28.23.32.04; Wed, 28 Dec 2022 23:32:13 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229625AbiL2HRu (ORCPT + 62 others); Thu, 29 Dec 2022 02:17:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbiL2HRj (ORCPT ); Thu, 29 Dec 2022 02:17:39 -0500 Received: from mail.nfschina.com (unknown [42.101.60.237]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA84E24F for ; Wed, 28 Dec 2022 23:17:37 -0800 (PST) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 80B701A00931; Thu, 29 Dec 2022 15:17:44 +0800 (CST) X-Virus-Scanned: amavisd-new at nfschina.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (localhost.localdomain [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id URFiTjXp3l3C; Thu, 29 Dec 2022 15:17:43 +0800 (CST) Received: from kernel.localdomain (unknown [219.141.250.2]) (Authenticated sender: lvqian@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id B1BF81A0092A; Thu, 29 Dec 2022 15:17:43 +0800 (CST) From: lvqian@nfschina.com To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, lvqian Subject: [PATCH] mm/page_alloc.c: Remove function return value Date: Thu, 29 Dec 2022 15:17:30 +0800 Message-Id: <20221229071730.174444-1-lvqian@nfschina.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_NONE autolearn=no 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 From: lvqian The return value of this function has no meaning, so the original int type is replaced with a void type, which reduces the execution time of one return. Signed-off-by: lvqian --- mm/page_alloc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 0745aedebb37..fffe16d854a9 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -828,17 +828,16 @@ static int __init early_debug_pagealloc(char *buf) } early_param("debug_pagealloc", early_debug_pagealloc); -static int __init debug_guardpage_minorder_setup(char *buf) +static void __init debug_guardpage_minorder_setup(char *buf) { unsigned long res; if (kstrtoul(buf, 10, &res) < 0 || res > MAX_ORDER / 2) { pr_err("Bad debug_guardpage_minorder value\n"); - return 0; + } else { + _debug_guardpage_minorder = res; + pr_info("Setting debug_guardpage_minorder to %lu\n", res); } - _debug_guardpage_minorder = res; - pr_info("Setting debug_guardpage_minorder to %lu\n", res); - return 0; } early_param("debug_guardpage_minorder", debug_guardpage_minorder_setup); -- 2.34.1