From nobody Tue Sep 16 20:07:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1349DC4332F for ; Thu, 29 Dec 2022 07:17:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232950AbiL2HRB (ORCPT ); Thu, 29 Dec 2022 02:17:01 -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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: lvqian The return value of this function has no meaning,=20 so the original bool type is replaced with a void type,=20 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) =20 if (kstrtoul(buf, 10, &res) < 0 || res > MAX_ORDER / 2) { pr_err("Bad debug_guardpage_minorder value\n"); - return 0; + } else { + _debug_guardpage_minorder =3D res; + pr_info("Setting debug_guardpage_minorder to %lu\n", res); } - _debug_guardpage_minorder =3D res; - pr_info("Setting debug_guardpage_minorder to %lu\n", res); - return 0; } early_param("debug_guardpage_minorder", debug_guardpage_minorder_setup); =20 --=20 2.34.1