Skip to contentSkip to conversation

lib/stackdepot.c: fix the compile warning

PATCH New Hui Su 1 participant 1 message Feb 2, 2021 Library code

lore
Share & tools
lore

Hui Su

author
#0 lore raw

PATCH 1/1 lib/stackdepot.c: fix the compile warning

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);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
 lib/stackdepot.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
lib/stackdepot.c +3 -1
index cc21116512a7..acd13f574f97 100644
@@ -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;
Signature · 1 line
2.25.1