From patchwork Fri Feb 26 01:21:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12105533 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7D6BC433E0 for ; Fri, 26 Feb 2021 01:21:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 32DF764F3B for ; Fri, 26 Feb 2021 01:21:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32DF764F3B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B23636B00EF; Thu, 25 Feb 2021 20:21:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AD3686B00F0; Thu, 25 Feb 2021 20:21:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A10116B00F1; Thu, 25 Feb 2021 20:21:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0002.hostedemail.com [216.40.44.2]) by kanga.kvack.org (Postfix) with ESMTP id 87AB16B00EF for ; Thu, 25 Feb 2021 20:21:33 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 51865824C453 for ; Fri, 26 Feb 2021 01:21:33 +0000 (UTC) X-FDA: 77858666466.07.F073721 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf06.hostedemail.com (Postfix) with ESMTP id 9A4F3C0007D8 for ; Fri, 26 Feb 2021 01:21:34 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id C9A9064F27; Fri, 26 Feb 2021 01:21:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1614302492; bh=+AVAnkueL+La1x3r/MEipm3fensULqxSe/sRfk6AYJY=; h=Date:From:To:Subject:In-Reply-To:From; b=ioIeH0O84PoUZfDELcTO++G5KlTcu0iBwtVC8c/P1zNdr6L08oSa7BnwPn746KQ5C jusEGOR83eIMogblrecF2sVmzcULJwHXklfsuBSCvFwV9ya4s1inqfAOCoIUVkgzLb hFjqhp1TDfT9vKaTKoEzLQLeZk851tOr+3Boqt7Y= Date: Thu, 25 Feb 2021 17:21:31 -0800 From: Andrew Morton To: akpm@linux-foundation.org, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org, vjitta@codeaurora.org Subject: [patch 096/118] lib: stackdepot: fix ignoring return value warning Message-ID: <20210226012131.hmqwehXgW%akpm@linux-foundation.org> In-Reply-To: <20210225171452.713967e96554bb6a53e44a19@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 9A4F3C0007D8 X-Stat-Signature: ghs4zsk7gwrxn85hqws6ji1amo6ok9gq Received-SPF: none (linux-foundation.org>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614302494-253733 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Vijayanand Jitta Subject: lib: stackdepot: fix ignoring return value warning Fix the below ignoring return value warning for kstrtobool in is_stack_depot_disabled function. 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] Link: https://lkml.kernel.org/r/1612163048-28026-1-git-send-email-vjitta@codeaurora.org Fixes: b9779abb09a8 ("lib: stackdepot: add support to disable stack depot") Signed-off-by: Vijayanand Jitta Signed-off-by: Andrew Morton --- lib/stackdepot.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/lib/stackdepot.c~lib-stackdepot-add-support-to-disable-stack-depot-fix-2 +++ a/lib/stackdepot.c @@ -151,8 +151,10 @@ static struct stack_record **stack_table static int __init is_stack_depot_disabled(char *str) { - kstrtobool(str, &stack_depot_disable); - if (stack_depot_disable) { + int ret; + + ret = kstrtobool(str, &stack_depot_disable); + if (!ret && stack_depot_disable) { pr_info("Stack Depot is disabled\n"); stack_table = NULL; }