2023-01-14 09:17:00

by Christophe JAILLET

[permalink] [raw]
Subject: [PATCH v2] Bluetooth: hci_debugfs: Use kstrtobool() instead of strtobool()

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 <[email protected]>
---
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/[email protected]/

Signed-off-by: Christophe JAILLET <[email protected]>
---
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))
--
2.34.1


2023-01-14 10:05:35

by bluez.test.bot

[permalink] [raw]
Subject: RE: [v2] Bluetooth: hci_debugfs: Use kstrtobool() instead of strtobool()

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=712009

---Test result---

Test Summary:
CheckPatch FAIL 1.41 seconds
GitLint FAIL 0.60 seconds
SubjectPrefix PASS 0.13 seconds
BuildKernel PASS 37.00 seconds
CheckAllWarning PASS 41.26 seconds
CheckSparse PASS 46.06 seconds
CheckSmatch PASS 123.84 seconds
BuildKernel32 PASS 36.17 seconds
TestRunnerSetup PASS 512.78 seconds
TestRunner_l2cap-tester PASS 18.11 seconds
TestRunner_iso-tester PASS 19.64 seconds
TestRunner_bnep-tester PASS 6.73 seconds
TestRunner_mgmt-tester PASS 123.34 seconds
TestRunner_rfcomm-tester PASS 10.41 seconds
TestRunner_sco-tester PASS 9.42 seconds
TestRunner_ioctl-tester PASS 11.28 seconds
TestRunner_mesh-tester PASS 8.50 seconds
TestRunner_smp-tester PASS 9.35 seconds
TestRunner_userchan-tester PASS 6.99 seconds
IncrementalBuild PASS 34.29 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v2] Bluetooth: hci_debugfs: Use kstrtobool() instead of strtobool()
WARNING: Duplicate signature
#79:
Signed-off-by: Christophe JAILLET <[email protected]>

total: 0 errors, 1 warnings, 0 checks, 15 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13101914.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[v2] Bluetooth: hci_debugfs: Use kstrtobool() instead of strtobool()

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
23: B1 Line exceeds max length (84>80): "[1]: https://lore.kernel.org/all/[email protected]/"


---
Regards,
Linux Bluetooth