All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] tty: rfcomm: use sysfs_emit() instead of sprintf()
@ 2024-12-24  6:07 Zhang Heng
  2024-12-24  6:36 ` [v2] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Heng @ 2024-12-24  6:07 UTC (permalink / raw)
  To: marcel, johan.hedberg, luiz.dentz, kees, erick.archer
  Cc: linux-bluetooth, linux-kernel, Zhang Heng

Follow the advice in Documentation/filesystems/sysfs.rst:
show() should only use sysfs_emit() or sysfs_emit_at() when formatting
the value to be returned to user space.

Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
---

Changes in v2:
- update author name spelling

 net/bluetooth/rfcomm/tty.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index af80d599c337..21a5b5535ebc 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -201,14 +201,14 @@ static ssize_t address_show(struct device *tty_dev,
 			    struct device_attribute *attr, char *buf)
 {
 	struct rfcomm_dev *dev = dev_get_drvdata(tty_dev);
-	return sprintf(buf, "%pMR\n", &dev->dst);
+	return sysfs_emit(buf, "%pMR\n", &dev->dst);
 }
 
 static ssize_t channel_show(struct device *tty_dev,
 			    struct device_attribute *attr, char *buf)
 {
 	struct rfcomm_dev *dev = dev_get_drvdata(tty_dev);
-	return sprintf(buf, "%d\n", dev->channel);
+	return sysfs_emit(buf, "%d\n", dev->channel);
 }
 
 static DEVICE_ATTR_RO(address);
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [v2] tty: rfcomm: use sysfs_emit() instead of sprintf()
  2024-12-24  6:07 [PATCH v2] tty: rfcomm: use sysfs_emit() instead of sprintf() Zhang Heng
@ 2024-12-24  6:36 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2024-12-24  6:36 UTC (permalink / raw)
  To: linux-bluetooth, zhangheng

[-- Attachment #1: Type: text/plain, Size: 2115 bytes --]

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=920623

---Test result---

Test Summary:
CheckPatch                    PENDING   0.28 seconds
GitLint                       PENDING   0.19 seconds
SubjectPrefix                 FAIL      0.39 seconds
BuildKernel                   PASS      25.99 seconds
CheckAllWarning               PASS      27.92 seconds
CheckSparse                   PASS      31.62 seconds
BuildKernel32                 PASS      25.30 seconds
TestRunnerSetup               PASS      447.90 seconds
TestRunner_l2cap-tester       PASS      21.19 seconds
TestRunner_iso-tester         PASS      36.65 seconds
TestRunner_bnep-tester        PASS      4.93 seconds
TestRunner_mgmt-tester        FAIL      121.28 seconds
TestRunner_rfcomm-tester      PASS      8.04 seconds
TestRunner_sco-tester         PASS      9.53 seconds
TestRunner_ioctl-tester       PASS      8.30 seconds
TestRunner_mesh-tester        PASS      6.15 seconds
TestRunner_smp-tester         PASS      7.17 seconds
TestRunner_userchan-tester    PASS      5.11 seconds
IncrementalBuild              PENDING   0.86 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 485 (99.0%), Failed: 1, Not Run: 4

Failed Test Cases
LL Privacy - Set Flags 2 (Enable RL)                 Failed       0.151 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-24  6:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-24  6:07 [PATCH v2] tty: rfcomm: use sysfs_emit() instead of sprintf() Zhang Heng
2024-12-24  6:36 ` [v2] " bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.