Commit 60cfb37a authored by Felipe Balbi's avatar Felipe Balbi

usb: dwc3: remove trailing newline from dwc3_trace

when passing strings to trace, we don't need the
trailing newline character. Trace already appends a
newline character automatically.
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent d2728fb3
...@@ -977,7 +977,7 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc, ...@@ -977,7 +977,7 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
ret = usb_gadget_map_request(&dwc->gadget, &req->request, ret = usb_gadget_map_request(&dwc->gadget, &req->request,
dep->number); dep->number);
if (ret) { if (ret) {
dwc3_trace(trace_dwc3_ep0, "failed to map request\n"); dwc3_trace(trace_dwc3_ep0, "failed to map request");
return; return;
} }
...@@ -1005,7 +1005,7 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc, ...@@ -1005,7 +1005,7 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
ret = usb_gadget_map_request(&dwc->gadget, &req->request, ret = usb_gadget_map_request(&dwc->gadget, &req->request,
dep->number); dep->number);
if (ret) { if (ret) {
dwc3_trace(trace_dwc3_ep0, "failed to map request\n"); dwc3_trace(trace_dwc3_ep0, "failed to map request");
return; return;
} }
......
...@@ -289,16 +289,11 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd, ...@@ -289,16 +289,11 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd,
if (!(reg & DWC3_DEPCMD_CMDACT)) { if (!(reg & DWC3_DEPCMD_CMDACT)) {
cmd_status = DWC3_DEPCMD_STATUS(reg); cmd_status = DWC3_DEPCMD_STATUS(reg);
dwc3_trace(trace_dwc3_gadget,
"Command Complete --> %d",
cmd_status);
switch (cmd_status) { switch (cmd_status) {
case 0: case 0:
ret = 0; ret = 0;
break; break;
case DEPEVT_TRANSFER_NO_RESOURCE: case DEPEVT_TRANSFER_NO_RESOURCE:
dwc3_trace(trace_dwc3_gadget, "no resource available");
ret = -EINVAL; ret = -EINVAL;
break; break;
case DEPEVT_TRANSFER_BUS_EXPIRY: case DEPEVT_TRANSFER_BUS_EXPIRY:
...@@ -313,7 +308,6 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd, ...@@ -313,7 +308,6 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd,
* give a hint to the gadget driver that this is * give a hint to the gadget driver that this is
* the case by returning -EAGAIN. * the case by returning -EAGAIN.
*/ */
dwc3_trace(trace_dwc3_gadget, "bus expiry");
ret = -EAGAIN; ret = -EAGAIN;
break; break;
default: default:
...@@ -325,8 +319,6 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd, ...@@ -325,8 +319,6 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd,
} while (--timeout); } while (--timeout);
if (timeout == 0) { if (timeout == 0) {
dwc3_trace(trace_dwc3_gadget,
"Command Timed Out");
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
cmd_status = -ETIMEDOUT; cmd_status = -ETIMEDOUT;
} }
...@@ -1068,14 +1060,14 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) ...@@ -1068,14 +1060,14 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
if (!dep->endpoint.desc) { if (!dep->endpoint.desc) {
dwc3_trace(trace_dwc3_gadget, dwc3_trace(trace_dwc3_gadget,
"trying to queue request %p to disabled %s\n", "trying to queue request %p to disabled %s",
&req->request, dep->endpoint.name); &req->request, dep->endpoint.name);
return -ESHUTDOWN; return -ESHUTDOWN;
} }
if (WARN(req->dep != dep, "request %p belongs to '%s'\n", if (WARN(req->dep != dep, "request %p belongs to '%s'\n",
&req->request, req->dep->name)) { &req->request, req->dep->name)) {
dwc3_trace(trace_dwc3_gadget, "request %p belongs to '%s'\n", dwc3_trace(trace_dwc3_gadget, "request %p belongs to '%s'",
&req->request, req->dep->name); &req->request, req->dep->name);
return -EINVAL; return -EINVAL;
} }
...@@ -1179,7 +1171,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) ...@@ -1179,7 +1171,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
out: out:
if (ret && ret != -EBUSY) if (ret && ret != -EBUSY)
dwc3_trace(trace_dwc3_gadget, dwc3_trace(trace_dwc3_gadget,
"%s: failed to kick transfers\n", "%s: failed to kick transfers",
dep->name); dep->name);
if (ret == -EBUSY) if (ret == -EBUSY)
ret = 0; ret = 0;
...@@ -1199,7 +1191,7 @@ static int __dwc3_gadget_ep_queue_zlp(struct dwc3 *dwc, struct dwc3_ep *dep) ...@@ -1199,7 +1191,7 @@ static int __dwc3_gadget_ep_queue_zlp(struct dwc3 *dwc, struct dwc3_ep *dep)
struct usb_request *request; struct usb_request *request;
struct usb_ep *ep = &dep->endpoint; struct usb_ep *ep = &dep->endpoint;
dwc3_trace(trace_dwc3_gadget, "queueing ZLP\n"); dwc3_trace(trace_dwc3_gadget, "queueing ZLP");
request = dwc3_gadget_ep_alloc_request(ep, GFP_ATOMIC); request = dwc3_gadget_ep_alloc_request(ep, GFP_ATOMIC);
if (!request) if (!request)
return -ENOMEM; return -ENOMEM;
...@@ -1429,7 +1421,7 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc) ...@@ -1429,7 +1421,7 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc)
speed = reg & DWC3_DSTS_CONNECTSPD; speed = reg & DWC3_DSTS_CONNECTSPD;
if ((speed == DWC3_DSTS_SUPERSPEED) || if ((speed == DWC3_DSTS_SUPERSPEED) ||
(speed == DWC3_DSTS_SUPERSPEED_PLUS)) { (speed == DWC3_DSTS_SUPERSPEED_PLUS)) {
dwc3_trace(trace_dwc3_gadget, "no wakeup on SuperSpeed\n"); dwc3_trace(trace_dwc3_gadget, "no wakeup on SuperSpeed");
return 0; return 0;
} }
...@@ -1441,7 +1433,7 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc) ...@@ -1441,7 +1433,7 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc)
break; break;
default: default:
dwc3_trace(trace_dwc3_gadget, dwc3_trace(trace_dwc3_gadget,
"can't wakeup from '%s'\n", "can't wakeup from '%s'",
dwc3_gadget_link_string(link_state)); dwc3_gadget_link_string(link_state));
return -EINVAL; return -EINVAL;
} }
...@@ -1963,7 +1955,7 @@ static int __dwc3_cleanup_done_trbs(struct dwc3 *dwc, struct dwc3_ep *dep, ...@@ -1963,7 +1955,7 @@ static int __dwc3_cleanup_done_trbs(struct dwc3 *dwc, struct dwc3_ep *dep,
trb_status = DWC3_TRB_SIZE_TRBSTS(trb->size); trb_status = DWC3_TRB_SIZE_TRBSTS(trb->size);
if (trb_status == DWC3_TRBSTS_MISSED_ISOC) { if (trb_status == DWC3_TRBSTS_MISSED_ISOC) {
dwc3_trace(trace_dwc3_gadget, dwc3_trace(trace_dwc3_gadget,
"%s: incomplete IN transfer\n", "%s: incomplete IN transfer",
dep->name); dep->name);
/* /*
* If missed isoc occurred and there is * If missed isoc occurred and there is
...@@ -2161,7 +2153,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc, ...@@ -2161,7 +2153,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) { if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
dwc3_trace(trace_dwc3_gadget, dwc3_trace(trace_dwc3_gadget,
"%s is an Isochronous endpoint\n", "%s is an Isochronous endpoint",
dep->name); dep->name);
return; return;
} }
...@@ -2189,7 +2181,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc, ...@@ -2189,7 +2181,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
return; return;
dwc3_trace(trace_dwc3_gadget, dwc3_trace(trace_dwc3_gadget,
"%s: failed to kick transfers\n", "%s: failed to kick transfers",
dep->name); dep->name);
} }
...@@ -2212,11 +2204,11 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc, ...@@ -2212,11 +2204,11 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
/* FALLTHROUGH */ /* FALLTHROUGH */
default: default:
dwc3_trace(trace_dwc3_gadget, dwc3_trace(trace_dwc3_gadget,
"unable to find suitable stream\n"); "unable to find suitable stream");
} }
break; break;
case DWC3_DEPEVT_RXTXFIFOEVT: case DWC3_DEPEVT_RXTXFIFOEVT:
dwc3_trace(trace_dwc3_gadget, "%s FIFO Overrun\n", dep->name); dwc3_trace(trace_dwc3_gadget, "%s FIFO Overrun", dep->name);
break; break;
case DWC3_DEPEVT_EPCMDCMPLT: case DWC3_DEPEVT_EPCMDCMPLT:
dwc3_trace(trace_dwc3_gadget, "Endpoint Command Complete"); dwc3_trace(trace_dwc3_gadget, "Endpoint Command Complete");
...@@ -2934,7 +2926,7 @@ int dwc3_gadget_init(struct dwc3 *dwc) ...@@ -2934,7 +2926,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
*/ */
if (dwc->revision < DWC3_REVISION_220A) if (dwc->revision < DWC3_REVISION_220A)
dwc3_trace(trace_dwc3_gadget, dwc3_trace(trace_dwc3_gadget,
"Changing max_speed on rev %08x\n", "Changing max_speed on rev %08x",
dwc->revision); dwc->revision);
dwc->gadget.max_speed = dwc->maximum_speed; dwc->gadget.max_speed = dwc->maximum_speed;
......
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