Skip to contentSkip to conversation

USB: phy: tahvo:replace "%p" with "%pK"

PATCH Greg Kroah-Hartman 1 participant 1 message Sep 24, 2021 1 message not in the archive USB

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Greg Kroah-Hartman

author maintainer
#1 lore raw
Quoted 34 lines · Zhiwei Yang

Use "%pK" to avoid kernel address leaked

---
 drivers/usb/phy/phy-tahvo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/phy/phy-tahvo.c +2 -2
index baebb1f5a973..5dc600fadc5f 100644
@@ -194,7 +194,7 @@ static int tahvo_usb_set_host(struct usb_otg *otg, struct usb_bus *host)
 	struct tahvo_usb *tu = container_of(otg->usb_phy, struct tahvo_usb,
 					    phy);
 
-	dev_dbg(&tu->pt_dev->dev, "%s %p\n", __func__, host);
+	dev_dbg(&tu->pt_dev->dev, "%s %pK\n", __func__, host);
 
 	mutex_lock(&tu->serialize);
 
@@ -224,7 +224,7 @@ static int tahvo_usb_set_peripheral(struct usb_otg *otg,
 	struct tahvo_usb *tu = container_of(otg->usb_phy, struct tahvo_usb,
 					    phy);
 
-	dev_dbg(&tu->pt_dev->dev, "%s %p\n", __func__, gadget);
+	dev_dbg(&tu->pt_dev->dev, "%s %pK\n", __func__, gadget);
 
 	mutex_lock(&tu->serialize);
 
Signature · 1 line
2.20.1

Both of these lines should just be removed as ftrace can be (and should be) used instead for stuff like "did the kernel get to this function?" that these lines seem to be for.

So can you just resubmit this as removing those lines?

thanks,

greg k-h