Skip to contentSkip to conversation

bus: mhi: Use %p for pointer formatting

PATCH Applied Sebastian Andrzej Siewior 2 participants 2 messages Sep 18 – Sep 26

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

PATCH 1/1 bus: mhi: Use %p for pointer formatting

Since commit ad67b74d2469d ("printk: hash addresses printed with %p") pointers are hashed by default and the behaviour can be controller by `hash_pointers' boot argument.
Removing %pK makes it possible to remove its handling from the library. The pointers are still hashed so there is no address leak. The policy on %p is to not introduce new ones.

Use %p for pointer formatting instead of removing it so it allows debugging.

---
 drivers/bus/mhi/host/debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/bus/mhi/host/debugfs.c +2 -2
index 39e45748a24c0..93f458a2557dc 100644
@@ -72,7 +72,7 @@ static int mhi_debugfs_events_show(struct seq_file *m, void *d)
 		seq_printf(m, " rp: 0x%llx wp: 0x%llx", le64_to_cpu(er_ctxt->rp),
 			   le64_to_cpu(er_ctxt->wp));
 
-		seq_printf(m, " local rp: 0x%pK db: 0x%pad\n", ring->rp,
+		seq_printf(m, " local rp: 0x%p db: 0x%pad\n", ring->rp,
 			   &mhi_event->db_cfg.db_val);
 	}
 
@@ -120,7 +120,7 @@ static int mhi_debugfs_channels_show(struct seq_file *m, void *d)
 			   le64_to_cpu(chan_ctxt->rbase), le64_to_cpu(chan_ctxt->rlen),
 			   le64_to_cpu(chan_ctxt->rp), le64_to_cpu(chan_ctxt->wp));
 
-		seq_printf(m, " local rp: 0x%pK local wp: 0x%pK db: 0x%pad\n",
+		seq_printf(m, " local rp: 0x%p local wp: 0x%p db: 0x%pad\n",
 			   ring->rp, ring->wp,
 			   &mhi_chan->db_cfg.db_val);
 	}
Signature · 1 line
2.55.0
maintainer Applied
#1 lore raw
Quoted 8 lines · Sebastian Andrzej Siewior

Since commit ad67b74d2469d ("printk: hash addresses printed with %p") pointers are hashed by default and the behaviour can be controller by `hash_pointers' boot argument.
Removing %pK makes it possible to remove its handling from the library. The pointers are still hashed so there is no address leak. The policy on %p is to not introduce new ones.

[...]

Applied, thanks!

[1/1] bus: mhi: Use %p for pointer formatting

      commit: ba9eee2d6f7926ca665d94bd4b8b8c962dec37eb

Best regards,

Signature · 1 line
மணிவண்ணன் சதாசிவம்