Message ID | b180bd1dea7b7561039f52cdbde6bcbe8688442c.1667336095.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3215449wru; Tue, 1 Nov 2022 14:21:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4iLNQysSyYFFm4LPBr7PUICqucehlCwzqxHIb1LSzhAixNTo0lnj8qbZ7B7bKODaEN2/jJ X-Received: by 2002:a05:6a00:23c9:b0:56c:9f62:3369 with SMTP id g9-20020a056a0023c900b0056c9f623369mr21225580pfc.22.1667337702162; Tue, 01 Nov 2022 14:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667337702; cv=none; d=google.com; s=arc-20160816; b=Ao7grSPsgPDjCR8zw0FXjkrlJpL75/mUOoDVQxfsMAESyrCW0tqqiVxl+KtVA5q6dh uU74ffz5TQ/eoJ+14sNI/U6Mj7NWaaTVrHWcMpUibXgOdWaUfCKIcex1N/IKSD/pvLjv 1gE1yYsFamTvgO/D3L3EL29BE/xztKNzskDX7aSTAQfl+cvnJbgfYTaExoQrnVuVKGRJ G94Fn4LRoRJ9g2Sg8KCUiVglOcJUegVBNU201hDswZ5KdjMQ9OxH98hXkcDhJYehvEcW dObv0XPHQkuDeLMfdK/5nU3vi829PoqKXQpTdOHYLXHr1nkHgHUBxhW068Dtx0a1ng8u 2gmw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=wkIwsVOKjg9iufEbdSntCjAg5hezrYZpQuiU1+CYQZg=; b=dmmv3mme9IMjBI3ffUlO9xHBfozuFvxEu0Ff0hwT/Ef7/xMblBrYY8Wq00qN6V9ZPO hnKsFwklTgP/d3CGNOI+qRKm8qGQcpzV6u4FfjsnOMU8rvrsAXZAP4hfCx5YqHY5Orel eRYzqoKrY6fBah+T3V0kU7R3l38VX9SD2Z2USdzpYE14LKgt9m/ezHqAJeBFBZwsv/iA G6edTqVKS9RpR/IWUMCQOWMIFa+o79afNSOe4m9mcsWJUXmHDNSiZPIH/eJ9iIu5e7EZ ehD1peBDbrT6Btvy4RSFVbE2yTZ+0B0Nui/+rGZZH1zHHfTEIHBiyFzx5X6fKQxU4A9x ZmdQ== 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 o10-20020a635a0a000000b0046f63d17422si15508238pgb.359.2022.11.01.14.21.28; Tue, 01 Nov 2022 14:21:42 -0700 (PDT) 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 S231176AbiKAVQn (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Tue, 1 Nov 2022 17:16:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230442AbiKAVQG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 1 Nov 2022 17:16:06 -0400 Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D83B1F629 for <linux-kernel@vger.kernel.org>; Tue, 1 Nov 2022 14:15:27 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id pyanoKD2rsfCIpybVoWfKn; Tue, 01 Nov 2022 22:15:26 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 01 Nov 2022 22:15:26 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: Marcel Holtmann <marcel@holtmann.org>, Johan Hedberg <johan.hedberg@gmail.com>, Luiz Augusto von Dentz <luiz.dentz@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 22/30] Bluetooth: hci_debugfs: Use kstrtobool() instead of strtobool() Date: Tue, 1 Nov 2022 22:14:10 +0100 Message-Id: <b180bd1dea7b7561039f52cdbde6bcbe8688442c.1667336095.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 In-Reply-To: <cover.1667336095.git.christophe.jaillet@wanadoo.fr> References: <cover.1667336095.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748330298552349430?= X-GMAIL-MSGID: =?utf-8?q?1748330298552349430?= |
Series |
Remove strtobool()
|
|
Commit Message
Christophe JAILLET
Nov. 1, 2022, 9:14 p.m. UTC
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 (<linux/kstrtox.h>)
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.
The last patch of the serie removes the definition of strtobool().
You may not be in copy of the cover letter. So, if needed, it is available
at [1].
[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
net/bluetooth/hci_debugfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/bluetooth/hci_debugfs.c b/net/bluetooth/hci_debugfs.c index b7f682922a16..f1ef60ddd4a6 100644 --- a/net/bluetooth/hci_debugfs.c +++ b/net/bluetooth/hci_debugfs.c @@ -22,6 +22,7 @@ */ #include <linux/debugfs.h> +#include <linux/kstrtox.h> #include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> @@ -1152,7 +1153,7 @@ static ssize_t force_no_mitm_write(struct file *file, return -EFAULT; buf[buf_size] = '\0'; - if (strtobool(buf, &enable)) + if (kstrtobool(buf, &enable)) return -EINVAL; if (enable == hci_dev_test_flag(hdev, HCI_FORCE_NO_MITM))