Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5628511rwl; Wed, 28 Dec 2022 23:44:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXvJyswhK0prO9Qsi117Z7Il4XJiAX9NC/3Vwi2MuPU1E/OlVu/Re+98UtWHzxSOc/HEP88H X-Received: by 2002:a05:6402:4010:b0:467:481f:df5e with SMTP id d16-20020a056402401000b00467481fdf5emr24833651eda.19.1672299886580; Wed, 28 Dec 2022 23:44:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672299886; cv=none; d=google.com; s=arc-20160816; b=kR+GuqkNt2WKBBv5gwE8N+ChMI0udrAZR0rWjN78YoqWp2Xb1rd0l3i0x+ffMlX+Jt KoW8C5fdVj/rMepYFnd+wKD/WygEa9mr7/wrmBGhAQo6rnYC8JqI0aizvlS3vMew1yaW 03ofYWIW8o3XHdNKw1dIxbDUgAfmlTYsPrIhH8srjEGhrOcTRDgx/SFmU/imziZCzqhm QEnpF6x1dRROOaHodTokazJ14r0QqcrApNhWrfDxO46i0beiZ/yDaYoOY6RGYzBRyDyQ ZOsPQk0Ss3H9wFYRgBBHajrhxl3/PrHUzkEws4GSX9i0XXhBB3uajmOEuKLh71OoZKc0 5ZVQ== 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=j/w6t/pqoSLAqpjIDs7ywzGVw14MiFuDhvHjZBAJrQA=; b=a1WRipKVYqgEyXXG/UOIc0LCzNQxgfLlSj2M1BLdNlt25P4WW8/x4NofVc/hfHjse7 I+I2R+yfioZL5wbV9DGqVwTIwZXDQEio+Ud29INTNxOKafdJGGkHt0lVN4x64PXv6r/s 4W/HURZ0NRkZFWtm7weSNydhH8+qKwxxnoGzF3zZ8779a3S1qk/yAOS/VBBpoWGpg20a 9379FGD5cHWJFIGq7htWGiUzxs+dRCJenx76pSwg9fUH6i5BV8FFNjiPFg0l0L8lfFZx +O+tE08rAg4IqM9xRmt85mGEHesu+DfixDfiuV3BuHzxeoVph1Mtj19dKcYQxgkiud2A ot7A== 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 bt14-20020a0564020a4e00b0048627327f17si6321907edb.622.2022.12.28.23.44.31; Wed, 28 Dec 2022 23:44:46 -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 S232834AbiL2HRA (ORCPT + 62 others); Thu, 29 Dec 2022 02:17:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231142AbiL2HQ5 (ORCPT ); Thu, 29 Dec 2022 02:16:57 -0500 X-Greylist: delayed 211 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 28 Dec 2022 23:16:55 PST Received: from mail.nfschina.com (unknown [42.101.60.237]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D610224F for ; Wed, 28 Dec 2022 23:16:55 -0800 (PST) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id DD43D1A00935; Thu, 29 Dec 2022 15:13:28 +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 YN6QHQj31uzm; Thu, 29 Dec 2022 15:13:28 +0800 (CST) Received: from kernel.localdomain (unknown [219.141.250.2]) (Authenticated sender: lvqian@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 14CD61A0092A; Thu, 29 Dec 2022 15:13:28 +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:13:18 +0800 Message-Id: <20221229071318.174109-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 bool type is replaced with a void type, which reduces the execution time of one return. Signed-off-by: lvqian --- mm/page_alloc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 0745aedebb37..5304bd5d2f6c 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -834,11 +834,10 @@ static int __init debug_guardpage_minorder_setup(char *buf) 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