From patchwork Sat Jan 14 09:22:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 43725 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp204746wrn; Sat, 14 Jan 2023 01:27:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXtDzuRGUHJai/W4Jj6k+uMbxAOuWJ8Hk/qOQM03OL8fNXyhwnDE2OQFVPlBsu7O1pxy0wjJ X-Received: by 2002:a17:907:a70d:b0:7c0:a17c:fe5 with SMTP id vw13-20020a170907a70d00b007c0a17c0fe5mr66130562ejc.44.1673688460714; Sat, 14 Jan 2023 01:27:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673688460; cv=none; d=google.com; s=arc-20160816; b=Cvbh5erkS5P6YPI5sPY2B2KSsLsDSFeuVUr2975Ty3/sLJsGddoA27UwjVCk4JAymD 4QW1bZjdND6d9RQ7x71ozTuOIiR/ujIN8KEWzOwhYP/EBM/G5n8MMiY8YDT9ZS4DBOZE DUT0iH5DoJ8DS2b/LGoVUXI0pwIibmDtZE5V5gG77E2L69V01xD7asoZROoz6YSBsJIr pNgc11FlKnYfNfTtKjrcey2U5KuteEI8yNKUkpsKSnzO7IHc5FJtsYz6Ta7krwGXwI5Z L48Gnlv306RbHWJp5qEOoOukh1VWUp5bg1eNB4CSVxkWn0/HAePTHaEBT019Aow+lvKv pgUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=QTy8ZP34gcl2h/+Pdws71hE+Ei9Z1F2j7tLlpcJlxrI=; b=AzWanJYE/JRgBxd3+LZ6motch2H8Vc4WBI+IlBodTtxK4vK5ZU7avSpNxrpnWGBbfb ikGxonNx/VqX1xVR4OUJWSPHxIpWpac6oXL+BePCkZCsmjuuAdb1B0ZocvJE1hNspJLh mEEmFdo9Ll9pJ1Cjbg6ZhxygcxthFkRXSDNt/DcdJJkKh0eLiCeaHPTBa2VpWMbiZS+n 7NVPEVMI1C+waKk19+kIrnQYZSBg4l1WeqSrrp6NnKbkRy00b6/aRrHp8afy6cYWK5Wz hzW84OzE1Pfbcx0/XTYIIAaE4J8wLiDkEhmL3/Pd2Bw7k55tqOouoSpI41M2mhowDsHo 1Fsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wt10-20020a170906ee8a00b007c4fb4ee06bsi25932734ejb.534.2023.01.14.01.26.52; Sat, 14 Jan 2023 01:27:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbjANJWL (ORCPT + 99 others); Sat, 14 Jan 2023 04:22:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbjANJWJ (ORCPT ); Sat, 14 Jan 2023 04:22:09 -0500 Received: from smtp.smtpout.orange.fr (smtp-24.smtpout.orange.fr [80.12.242.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18BD45BBB for ; Sat, 14 Jan 2023 01:22:08 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id GcjlpZA1MpxjIGcjlpgpeF; Sat, 14 Jan 2023 10:22:07 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 14 Jan 2023 10:22:07 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: gregkh@linuxfoundation.org, russell.h.weight@intel.com, mcgrof@kernel.org, tianfei.zhang@intel.com, shaozhengchao@huawei.com, colin.i.king@gmail.com, error27@gmail.com Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2] test_firmware: Use kstrtobool() instead of strtobool() Date: Sat, 14 Jan 2023 10:22:03 +0100 Message-Id: <34f04735d20e0138695dd4070651bd860a36b81c.1673688120.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754989550979706194?= X-GMAIL-MSGID: =?utf-8?q?1754989550979706194?= 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 --- This patch was already sent as a part of a serie ([1]) that axed all usages of strtobool(). Most of the patches have been merged in -next. I synch'ed with latest -next and re-send the remaining ones as individual patches. Note that the first version was sent to no-one, only mailing lists, because "get_maintainer.pl --nogit-fallback" returns an empty list. Changes in v2: - No change [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/ --- 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 e207bc08820d..3632cf62c812 100644 --- a/lib/test_firmware.c +++ b/lib/test_firmware.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -358,7 +359,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;