From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC7F55381 for ; Mon, 19 Jun 2023 10:43:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3480CC433C0; Mon, 19 Jun 2023 10:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1687171406; bh=2k+zdiZWNOwDHqTPh7WgCTfO7D/fSThIEoX5B/c8VGQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TkdPMbD0j0piHRX3Xzhf/g5fF/3RsIJPqmm9SmXRlOhXywcQjd3x9Py0aXcR43TgI Sq3LTQywmMDrlk5jWzroH0VGLg231ZmtRAptWosvbAzahkx4n6nWRw+DFwl2diO3lZ XXR/cS8HOEFVe9sHx2rtD3QOVqrk6G28nNEl2Xsc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christophe JAILLET , Luis Chamberlain , Sasha Levin Subject: [PATCH 6.1 002/166] test_firmware: Use kstrtobool() instead of strtobool() Date: Mon, 19 Jun 2023 12:27:59 +0200 Message-ID: <20230619102154.721816289@linuxfoundation.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230619102154.568541872@linuxfoundation.org> References: <20230619102154.568541872@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Christophe JAILLET [ Upstream commit f7d85515bd21902b218370a1a6301f76e4e636ff ] strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/34f04735d20e0138695dd4070651bd860a36b81c.1673688120.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman Stable-dep-of: 4acfe3dfde68 ("test_firmware: prevent race conditions by a correct implementation of locking") Signed-off-by: Sasha Levin --- lib/test_firmware.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/test_firmware.c b/lib/test_firmware.c index 7f165c517338a..6ef3e6926da8a 100644 --- a/lib/test_firmware.c +++ b/lib/test_firmware.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -365,7 +366,7 @@ static int test_dev_config_update_bool(const char *buf, size_t size, int ret; mutex_lock(&test_fw_mutex); - if (strtobool(buf, cfg) < 0) + if (kstrtobool(buf, cfg) < 0) ret = -EINVAL; else ret = size; -- 2.39.2