lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 29 Dec 2022 15:13:18 +0800
From:   lvqian@...china.com
To:     akpm@...ux-foundation.org
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        lvqian <lvqian@...china.com>
Subject: [PATCH] mm/page_alloc.c: Remove function return value

From: lvqian <lvqian@...china.com>

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 <lvqian@...china.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ