Skip to contentSkip to conversation

Bluetooth: Remove %pK formatting

PATCH In review Sebastian Andrzej Siewior 2 participants 2 messages Sep 18

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: Remove %pK formatting

Commit 71338aa7d050c ("net: convert %p usage to %pK") which is from 2011 and changed the %p annotation for pointer to %pK. Back then the default behaviour for %p was to print the pointer. The %pK modifier was introduced to able to control the behaviour of specific pointer values without changing the behaviour of %p for everyone. It was dedicated to avoid leaking pointers via /proc.
With the introduction of bt_procfs_init(), bluetooth followed this %pK semantic.

Things changed over time. Since printing the pointer did not add any value, networking prints now 0 instead of the socket pointer.

Replace %pK with 0 value, update the header line to match column names.

---

The relevant net commit is 7c0ec6288b497 ("net: Replace %pK output with 0") which is net-next.

 net/bluetooth/af_bluetooth.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
net/bluetooth/af_bluetooth.c +2 -3
index 411d66f24393d..8dc06fc1811ec 100644
@@ -846,7 +846,7 @@ static int bt_seq_show(struct seq_file *seq, void *v)
 	struct bt_sock_list *l = pde_data(file_inode(seq->file));
 
 	if (v == SEQ_START_TOKEN) {
-		seq_puts(seq, "sk               RefCnt Rmem   Wmem   User   Inode  Parent");
+		seq_puts(seq, "sk  RefCnt Rmem   Wmem   User   Inode  Parent");
 
 		if (l->custom_seq_show) {
 			seq_putc(seq, ' ');
@@ -859,8 +859,7 @@ static int bt_seq_show(struct seq_file *seq, void *v)
 		struct bt_sock *bt = bt_sk(sk);
 
 		seq_printf(seq,
-			   "%pK %-6d %-6u %-6u %-6u %-6llu %-6llu",
-			   sk,
+			   " 0  %-6d %-6u %-6u %-6u %-6llu %-6llu",
 			   refcount_read(&sk->sk_refcnt),
 			   sk_rmem_alloc_get(sk),
 			   sk_wmem_alloc_get(sk),
Signature · 1 line
2.55.0
#1 lore raw

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/series/1168562/

---Test result---

Test Summary:

CheckPatch                    PASS      1.41 seconds
VerifyFixes                   PASS      0.11 seconds
VerifySignedoff               PASS      0.11 seconds
GitLint                       PASS      0.27 seconds
SubjectPrefix                 PASS      0.11 seconds
BuildKernel                   PASS      21.02 seconds
CheckAllWarning               PASS      24.27 seconds
CheckSparse                   PASS      28.12 seconds
BuildKernel32                 PASS      21.46 seconds
CheckKernelLLVM               PASS      23.47 seconds
TestRunnerSetup               PASS      502.85 seconds
TestRunner_l2cap-tester       PASS      17.81 seconds
TestRunner_iso-tester         PASS      29.96 seconds
TestRunner_bnep-tester        PASS      3.01 seconds
TestRunner_mgmt-tester        FAIL      55.95 seconds
TestRunner_rfcomm-tester      PASS      4.10 seconds
TestRunner_sco-tester         PASS      7.00 seconds
TestRunner_ioctl-tester       PASS      4.15 seconds
TestRunner_mesh-tester        FAIL      8.29 seconds
TestRunner_smp-tester         PASS      4.27 seconds
TestRunner_userchan-tester    PASS      3.25 seconds
TestRunner_6lowpan-tester     PASS      4.14 seconds
IncrementalBuild              PASS      22.31 seconds

Details
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner Output:
Total: 501, Passed: 496 (99.0%), Failed: 1, Not Run: 4

Failed Test Cases
Read Exp Feature - Success Failed 0.018 seconds
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0

Failed Test Cases

Mesh - Send cancel - 1                               Timed out    2.669 seconds
Mesh - Send cancel - 2                               Timed out    2.000 seconds

https://github.com/bluez/bluetooth-next/pull/791

---
Regards,
Linux Bluetooth