[<prev] [next>] [day] [month] [year] [list]
Date: Tue, 2 Feb 2021 15:43:29 +0800
From: Hui Su <sh_def@....com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Alexander Potapenko <glider@...gle.com>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Vijayanand Jitta <vjitta@...eaurora.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Yogesh Lal <ylal@...eaurora.org>, linux-kernel@...r.kernel.org
Cc: sh_def@....com
Subject: [PATCH] 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);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Hui Su <sh_def@....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
Powered by blists - more mailing lists