Skip to content

Commit

Permalink
mm/page_alloc.c: Remove function return value
Browse files Browse the repository at this point in the history
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 <lvqian@nfschina.com>
  • Loading branch information
nfs-lvqian authored and intel-lab-lkp committed Dec 29, 2022
1 parent 3264107 commit 1c571b3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mm/page_alloc.c
Expand Up @@ -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);

Expand Down

0 comments on commit 1c571b3

Please sign in to comment.