Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: stm32: dfsdm: don't use %pK through printk

In the past %pK was preferable to %p as it would not leak raw pointer
values into the kernel log.
Since commit ad67b74d2469 ("printk: hash addresses printed with %p")
the regular %p has been improved to avoid this issue.
Furthermore, restricted pointers ("%pK") were never meant to be used
through printk(). They can still unintentionally leak raw pointers or
acquire sleeping locks in atomic contexts.

Switch to the regular pointer formatting which is safer and
easier to reason about.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20251106-restricted-pointers-stm-v1-1-7d03eb5020ba@linutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Thomas Weißschuh and committed by
Mark Brown
4db4ce15 47d98d43

+1 -1
+1 -1
sound/soc/stm/stm32_adfsdm.c
··· 180 180 src_size >>= 1; 181 181 cur_size = src_size; 182 182 183 - dev_dbg(rtd->dev, "%s: buff_add :%pK, pos = %d, size = %zu\n", 183 + dev_dbg(rtd->dev, "%s: buff_add :%p, pos = %d, size = %zu\n", 184 184 __func__, &pcm_buff[priv->pos], priv->pos, src_size); 185 185 186 186 if ((priv->pos + src_size) > buff_size) {