lkml.org 
[lkml]   [2020]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3] mm: hugetlb: optionally allocate gigantic hugepages using cma
From
Date
On Wed, 2020-03-11 at 15:09 -0700, Roman Gushchin wrote:
> +#ifdef CONFIG_CMA
> +static unsigned long hugetlb_cma_size __initdata;
> +
> +static int __init cmdline_parse_hugetlb_cma(char *p)
> +{
> + unsigned long long val;
> + char *endptr;
> +
> + if (!p)
> + return -EINVAL;
> +
> + val = simple_strtoull(p, &endptr, 0);
> + hugetlb_cma_size = memparse(p, &p);
> + return 0;
> +}
> +

Here will generate a compilation warning,

mm/hugetlb.c: In function 'cmdline_parse_hugetlb_cma':
mm/hugetlb.c:5548:21: warning: variable 'val' set but not used [-Wunused-but-
set-variable]
  unsigned long long val;
                     ^~~
Also, the comments for simple_strtoull() in lib/vsprintf.c said,

"This function is obsolete. Please use kstrtoull instead."

\
 
 \ /
  Last update: 2020-03-12 14:34    [W:0.156 / U:14.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site