Commit 8272d099 authored by Shuah Khan's avatar Shuah Khan Committed by Greg Kroah-Hartman

usbip: vhci: stop printing kernel pointer addresses in messages

Remove and/or change debug, info. and error messages to not print
kernel pointer addresses.
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 07b9f128
...@@ -656,9 +656,6 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flag ...@@ -656,9 +656,6 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flag
struct vhci_device *vdev; struct vhci_device *vdev;
unsigned long flags; unsigned long flags;
usbip_dbg_vhci_hc("enter, usb_hcd %p urb %p mem_flags %d\n",
hcd, urb, mem_flags);
if (portnum > VHCI_HC_PORTS) { if (portnum > VHCI_HC_PORTS) {
pr_err("invalid port number %d\n", portnum); pr_err("invalid port number %d\n", portnum);
return -ENODEV; return -ENODEV;
...@@ -822,8 +819,6 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) ...@@ -822,8 +819,6 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
struct vhci_device *vdev; struct vhci_device *vdev;
unsigned long flags; unsigned long flags;
pr_info("dequeue a urb %p\n", urb);
spin_lock_irqsave(&vhci->lock, flags); spin_lock_irqsave(&vhci->lock, flags);
priv = urb->hcpriv; priv = urb->hcpriv;
...@@ -851,7 +846,6 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) ...@@ -851,7 +846,6 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
/* tcp connection is closed */ /* tcp connection is closed */
spin_lock(&vdev->priv_lock); spin_lock(&vdev->priv_lock);
pr_info("device %p seems to be disconnected\n", vdev);
list_del(&priv->list); list_del(&priv->list);
kfree(priv); kfree(priv);
urb->hcpriv = NULL; urb->hcpriv = NULL;
...@@ -863,8 +857,6 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) ...@@ -863,8 +857,6 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
* vhci_rx will receive RET_UNLINK and give back the URB. * vhci_rx will receive RET_UNLINK and give back the URB.
* Otherwise, we give back it here. * Otherwise, we give back it here.
*/ */
pr_info("gives back urb %p\n", urb);
usb_hcd_unlink_urb_from_ep(hcd, urb); usb_hcd_unlink_urb_from_ep(hcd, urb);
spin_unlock_irqrestore(&vhci->lock, flags); spin_unlock_irqrestore(&vhci->lock, flags);
...@@ -892,8 +884,6 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) ...@@ -892,8 +884,6 @@ static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
unlink->unlink_seqnum = priv->seqnum; unlink->unlink_seqnum = priv->seqnum;
pr_info("device %p seems to be still connected\n", vdev);
/* send cmd_unlink and try to cancel the pending URB in the /* send cmd_unlink and try to cancel the pending URB in the
* peer */ * peer */
list_add_tail(&unlink->list, &vdev->unlink_tx); list_add_tail(&unlink->list, &vdev->unlink_tx);
......
...@@ -23,24 +23,23 @@ struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev, __u32 seqnum) ...@@ -23,24 +23,23 @@ struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev, __u32 seqnum)
urb = priv->urb; urb = priv->urb;
status = urb->status; status = urb->status;
usbip_dbg_vhci_rx("find urb %p vurb %p seqnum %u\n", usbip_dbg_vhci_rx("find urb seqnum %u\n", seqnum);
urb, priv, seqnum);
switch (status) { switch (status) {
case -ENOENT: case -ENOENT:
/* fall through */ /* fall through */
case -ECONNRESET: case -ECONNRESET:
dev_info(&urb->dev->dev, dev_dbg(&urb->dev->dev,
"urb %p was unlinked %ssynchronuously.\n", urb, "urb seq# %u was unlinked %ssynchronuously\n",
status == -ENOENT ? "" : "a"); seqnum, status == -ENOENT ? "" : "a");
break; break;
case -EINPROGRESS: case -EINPROGRESS:
/* no info output */ /* no info output */
break; break;
default: default:
dev_info(&urb->dev->dev, dev_dbg(&urb->dev->dev,
"urb %p may be in a error, status %d\n", urb, "urb seq# %u may be in a error, status %d\n",
status); seqnum, status);
} }
list_del(&priv->list); list_del(&priv->list);
...@@ -67,8 +66,8 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev, ...@@ -67,8 +66,8 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
spin_unlock_irqrestore(&vdev->priv_lock, flags); spin_unlock_irqrestore(&vdev->priv_lock, flags);
if (!urb) { if (!urb) {
pr_err("cannot find a urb of seqnum %u\n", pdu->base.seqnum); pr_err("cannot find a urb of seqnum %u max seqnum %d\n",
pr_info("max seqnum %d\n", pdu->base.seqnum,
atomic_read(&vhci_hcd->seqnum)); atomic_read(&vhci_hcd->seqnum));
usbip_event_add(ud, VDEV_EVENT_ERROR_TCP); usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
return; return;
...@@ -91,7 +90,7 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev, ...@@ -91,7 +90,7 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
if (usbip_dbg_flag_vhci_rx) if (usbip_dbg_flag_vhci_rx)
usbip_dump_urb(urb); usbip_dump_urb(urb);
usbip_dbg_vhci_rx("now giveback urb %p\n", urb); usbip_dbg_vhci_rx("now giveback urb %u\n", pdu->base.seqnum);
spin_lock_irqsave(&vhci->lock, flags); spin_lock_irqsave(&vhci->lock, flags);
usb_hcd_unlink_urb_from_ep(vhci_hcd_to_hcd(vhci_hcd), urb); usb_hcd_unlink_urb_from_ep(vhci_hcd_to_hcd(vhci_hcd), urb);
...@@ -158,7 +157,7 @@ static void vhci_recv_ret_unlink(struct vhci_device *vdev, ...@@ -158,7 +157,7 @@ static void vhci_recv_ret_unlink(struct vhci_device *vdev,
pr_info("the urb (seqnum %d) was already given back\n", pr_info("the urb (seqnum %d) was already given back\n",
pdu->base.seqnum); pdu->base.seqnum);
} else { } else {
usbip_dbg_vhci_rx("now giveback urb %p\n", urb); usbip_dbg_vhci_rx("now giveback urb %d\n", pdu->base.seqnum);
/* If unlink is successful, status is -ECONNRESET */ /* If unlink is successful, status is -ECONNRESET */
urb->status = pdu->u.ret_unlink.status; urb->status = pdu->u.ret_unlink.status;
......
...@@ -69,7 +69,8 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev) ...@@ -69,7 +69,8 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev)
memset(&msg, 0, sizeof(msg)); memset(&msg, 0, sizeof(msg));
memset(&iov, 0, sizeof(iov)); memset(&iov, 0, sizeof(iov));
usbip_dbg_vhci_tx("setup txdata urb %p\n", urb); usbip_dbg_vhci_tx("setup txdata urb seqnum %lu\n",
priv->seqnum);
/* 1. setup usbip_header */ /* 1. setup usbip_header */
setup_cmd_submit_pdu(&pdu_header, urb); setup_cmd_submit_pdu(&pdu_header, urb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment