[PATCH] lib/stackdepot.c: fix the compile warning
From: Hui Su
Date: Tue Feb 02 2021 - 04:22:31 EST
fix the compile warning introduced by commit b9779abb09a8 ("lib: stackdepot:
add support to disable stack depot")
../lib/stackdepot.c: In function ‘is_stack_depot_disabled’:
../lib/stackdepot.c:154:2: warning: ignoring return value of ‘kstrtobool’, declared with attribute warn_unused_result [-Wunused-result]
154 | kstrtobool(str, &stack_depot_disable);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Hui Su <sh_def@xxxxxxx>
---
lib/stackdepot.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index cc21116512a7..acd13f574f97 100644
--- a/lib/stackdepot.c
+++ b/lib/stackdepot.c
@@ -151,7 +151,9 @@ static struct stack_record **stack_table;
static int __init is_stack_depot_disabled(char *str)
{
- kstrtobool(str, &stack_depot_disable);
+ int no_warn;
+
+ no_warn = kstrtobool(str, &stack_depot_disable);
if (stack_depot_disable) {
pr_info("Stack Depot is disabled\n");
stack_table = NULL;
--
2.25.1