Namely, print endpoint names instead of addresses. This way, trace() output is useful even without a hw debugger/kgdb. Signed-off-by: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx> --- drivers/usb/gadget/ci13xxx_udc.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c index 4b28ea5..53ecef5 100644 --- a/drivers/usb/gadget/ci13xxx_udc.c +++ b/drivers/usb/gadget/ci13xxx_udc.c @@ -1468,7 +1468,7 @@ static int _hardware_enqueue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq) int ret = 0; unsigned length = mReq->req.length; - trace(udc->dev, "%p, %p", mEp, mReq); + trace(udc->dev, "%s, %p", mEp->name, mReq); /* don't queue twice */ if (mReq->req.status == -EALREADY) @@ -1570,7 +1570,7 @@ done: */ static int _hardware_dequeue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq) { - trace(mEp->udc->dev, "%p, %p", mEp, mReq); + trace(mEp->udc->dev, "%s, %p", mEp->name, mReq); if (mReq->req.status != -EALREADY) return -EINVAL; @@ -1621,7 +1621,7 @@ static int _ep_nuke(struct ci13xxx_ep *mEp) __releases(mEp->lock) __acquires(mEp->lock) { - trace(mEp->udc->dev, "%p", mEp); + trace(mEp->udc->dev, "%s", mEp->name); if (mEp == NULL) return -EINVAL; @@ -1740,11 +1740,11 @@ __acquires(udc->lock) */ static void isr_get_status_complete(struct usb_ep *ep, struct usb_request *req) { - trace(NULL, "%p, %p", ep, req); - if (ep == NULL || req == NULL) return; + trace(mEp->udc->dev, "%s, %p", ep->name, req); + kfree(req->buf); usb_ep_free_request(ep, req); } @@ -1766,7 +1766,7 @@ __acquires(mEp->lock) gfp_t gfp_flags = GFP_ATOMIC; int dir, num, retval; - trace(udc->dev, "%p, %p", mEp, setup); + trace(udc->dev, "%s, %p", mEp->name, setup); if (mEp == NULL || setup == NULL) return -EINVAL; @@ -1829,7 +1829,7 @@ isr_setup_status_complete(struct usb_ep *ep, struct usb_request *req) struct ci13xxx *udc = req->context; unsigned long flags; - trace(udc->dev, "%p, %p", ep, req); + trace(udc->dev, "%s, %p", ep->name, req); spin_lock_irqsave(&udc->lock, flags); if (udc->test_mode) @@ -1878,7 +1878,7 @@ __acquires(mEp->lock) struct ci13xxx_ep *mEpTemp = mEp; int uninitialized_var(retval); - trace(mEp->udc->dev, "%p", mEp); + trace(mEp->udc->dev, "%s", mEp->name); if (list_empty(&mEp->qh.queue)) return -EINVAL; @@ -2114,7 +2114,7 @@ static int ep_enable(struct usb_ep *ep, int retval = 0; unsigned long flags; - trace(mEp->udc->dev, "%p, %p", ep, desc); + trace(mEp->udc->dev, "%s, %p", mEp->name, desc); if (ep == NULL || desc == NULL) return -EINVAL; @@ -2171,7 +2171,7 @@ static int ep_disable(struct usb_ep *ep) int direction, retval = 0; unsigned long flags; - trace(mEp->udc->dev, "%p", ep); + trace(mEp->udc->dev, "%s", mEp->name); if (ep == NULL) return -EINVAL; @@ -2211,7 +2211,7 @@ static struct usb_request *ep_alloc_request(struct usb_ep *ep, gfp_t gfp_flags) struct ci13xxx_ep *mEp = container_of(ep, struct ci13xxx_ep, ep); struct ci13xxx_req *mReq = NULL; - trace(mEp->udc->dev, "%p, %i", ep, gfp_flags); + trace(mEp->udc->dev, "%s, %i", mEp->name, gfp_flags); if (ep == NULL) return NULL; @@ -2245,7 +2245,7 @@ static void ep_free_request(struct usb_ep *ep, struct usb_request *req) struct ci13xxx_req *mReq = container_of(req, struct ci13xxx_req, req); unsigned long flags; - trace(mEp->udc->dev, "%p, %p", ep, req); + trace(mEp->udc->dev, "%s, %p", mEp->name, req); if (ep == NULL || req == NULL) { return; @@ -2279,7 +2279,7 @@ static int ep_queue(struct usb_ep *ep, struct usb_request *req, int retval = 0; unsigned long flags; - trace(mEp->udc->dev, "%p, %p, %X", ep, req, gfp_flags); + trace(mEp->udc->dev, "%s, %p, %X", mEp->name, req, gfp_flags); if (ep == NULL || req == NULL || mEp->desc == NULL) return -EINVAL; @@ -2342,7 +2342,7 @@ static int ep_dequeue(struct usb_ep *ep, struct usb_request *req) struct ci13xxx_req *mReq = container_of(req, struct ci13xxx_req, req); unsigned long flags; - trace(mEp->udc->dev, "%p, %p", ep, req); + trace(mEp->udc->dev, "%s, %p", mEp->name, req); if (ep == NULL || req == NULL || mReq->req.status != -EALREADY || mEp->desc == NULL || list_empty(&mReq->queue) || @@ -2386,7 +2386,7 @@ static int ep_set_halt(struct usb_ep *ep, int value) int direction, retval = 0; unsigned long flags; - trace(mEp->udc->dev, "%p, %i", ep, value); + trace(mEp->udc->dev, "%s, %i", mEp->name, value); if (ep == NULL || mEp->desc == NULL) return -EINVAL; @@ -2429,7 +2429,7 @@ static int ep_set_wedge(struct usb_ep *ep) struct ci13xxx_ep *mEp = container_of(ep, struct ci13xxx_ep, ep); unsigned long flags; - trace(mEp->udc->dev, "%p", ep); + trace(mEp->udc->dev, "%s", mEp->name); if (ep == NULL || mEp->desc == NULL) return -EINVAL; @@ -2454,7 +2454,7 @@ static void ep_fifo_flush(struct usb_ep *ep) struct ci13xxx_ep *mEp = container_of(ep, struct ci13xxx_ep, ep); unsigned long flags; - trace(mEp->udc->dev, "%p", ep); + trace(mEp->udc->dev, "%s", mEp->name); if (ep == NULL) { dev_err(mEp->udc->dev, "%02X: -EINVAL\n", _usb_addr(mEp)); -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html