From patchwork Sat Jan 14 09:11:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 43722 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp204203wrn; Sat, 14 Jan 2023 01:25:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXuQvLfTL05Yy/7wBBO7dv+6D4472skY8QBJJ48J0ekCj1mklS6aljStHMq7j+ZXCYLtttWv X-Received: by 2002:aa7:d61a:0:b0:499:376e:6b2d with SMTP id c26-20020aa7d61a000000b00499376e6b2dmr24584619edr.0.1673688324002; Sat, 14 Jan 2023 01:25:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673688323; cv=none; d=google.com; s=arc-20160816; b=n1vnFPtzmgyy3fD2ZVfK91ewstUfH/tjzUS4XCN5OS2rIdN7IWKyGRK0xMGbHUwQ3B s5cL2TQoEBOALsa3Eb/vvHKVTDuLLFnEfDtRfJ1NoITamhZfiXD6yfdgFKNnGwkk1g8w e9ZwUAVbMhzZJ2awcVda1YoxnQuXDVlSwt4Uu6Ch+l+LC0Slb4RgnuXA8VbaVsx385/b lyQXolJsSpLuhq35HVTjaiNFT8df399leV+QCi+9yA5T94te04omOFoJSRXY32ZfMekM rdJidtzUGVK3oomjV1YRGo8HQp5cQNodFNcEMZsd8ake2J4FlZMNHyTENW8w+COn+pFb Hc5A== 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=3xwU/cO27KPnJtSjkppaGin95DXERC3DJeEAoUlIR2A=; b=ITVHVXOIWvCrIE/a7BsZ+qOXFeH+K6t83pF8ePgl/joyCpKDOAKv4ju0MDOJh3chyR UyObMvohApWpD+UGT1+X6pwdy2NNi7XpCZnYAmN4ZVVjEhPYKoKk5NkFSPWRqHoApAlb +hpKX4vncZ70ReNJUmI+yhkAP4SNL6ZmoA8RAaIP7mgXd92KoiC93VMqPBjzVOZxxmiC uKzIzJtJ9PfRwyDTHKuO3pIeKhZFbImq+reCuz9fe8VNARD9BhWRu9CZmyK85rSE63Of HXEdbyB+o7brJp04SvA622m6h2Jy32Lu7n942QsKK2VB56L7km1pjG8cxKh+pIcgWOtR aQQA== 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 x2-20020a05640225c200b0048d63df54d7si23649739edb.20.2023.01.14.01.24.59; Sat, 14 Jan 2023 01:25:23 -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 S229747AbjANJLS (ORCPT + 99 others); Sat, 14 Jan 2023 04:11:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbjANJLP (ORCPT ); Sat, 14 Jan 2023 04:11:15 -0500 Received: from smtp.smtpout.orange.fr (smtp-19.smtpout.orange.fr [80.12.242.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D752A35B9 for ; Sat, 14 Jan 2023 01:11:14 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id GcZDpq3gg29hWGcZDp72BO; Sat, 14 Jan 2023 10:11:13 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 14 Jan 2023 10:11:13 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2] Bluetooth: hci_debugfs: Use kstrtobool() instead of strtobool() Date: Sat, 14 Jan 2023 10:11:04 +0100 Message-Id: <58207d5b81c5739c037c030893fb08ea3dbedc57.1673687451.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=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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754989407633980662?= X-GMAIL-MSGID: =?utf-8?q?1754989407633980662?= 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 --- 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. Changes in v2: - No change [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/ Signed-off-by: Christophe JAILLET --- 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 +#include #include #include @@ -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))