All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lib/stackdepot.c: fix the compile warning
@ 2021-02-02  7:43 Hui Su
  0 siblings, 0 replies; only message in thread
From: Hui Su @ 2021-02-02  7:43 UTC (permalink / raw)
  To: Andrew Morton, Alexander Potapenko, Gustavo A. R. Silva,
	Vijayanand Jitta, Stephen Rothwell, Yogesh Lal, linux-kernel
  Cc: sh_def

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@163.com>
---
 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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-02  9:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-02  7:43 [PATCH] lib/stackdepot.c: fix the compile warning Hui Su

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.