提交 d59e609d 编写于 作者: C Chris Metcalf

arch/tile: avoid __must_check warning on one strict_strtol check

For the "initfree" boot argument it's not that big a deal, but
to avoid warnings in the code, we check for a valid value before
allowing the specified argument to override the kernel default.
Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
上级 5d966115
...@@ -988,8 +988,12 @@ static long __write_once initfree = 1; ...@@ -988,8 +988,12 @@ static long __write_once initfree = 1;
/* Select whether to free (1) or mark unusable (0) the __init pages. */ /* Select whether to free (1) or mark unusable (0) the __init pages. */
static int __init set_initfree(char *str) static int __init set_initfree(char *str)
{ {
strict_strtol(str, 0, &initfree); long val;
pr_info("initfree: %s free init pages\n", initfree ? "will" : "won't"); if (strict_strtol(str, 0, &val)) {
initfree = val;
pr_info("initfree: %s free init pages\n",
initfree ? "will" : "won't");
}
return 1; return 1;
} }
__setup("initfree=", set_initfree); __setup("initfree=", set_initfree);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册