when passing strings to trace, we don't need the trailing newline character. Trace already appends a newline character automatically. Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx> --- drivers/usb/dwc3/ep0.c | 4 ++-- drivers/usb/dwc3/gadget.c | 32 ++++++++++++-------------------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 93d6cdd9e0c9..fe79d771dee4 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -977,7 +977,7 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc, ret = usb_gadget_map_request(&dwc->gadget, &req->request, dep->number); if (ret) { - dwc3_trace(trace_dwc3_ep0, "failed to map request\n"); + dwc3_trace(trace_dwc3_ep0, "failed to map request"); return; } @@ -1005,7 +1005,7 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc, ret = usb_gadget_map_request(&dwc->gadget, &req->request, dep->number); if (ret) { - dwc3_trace(trace_dwc3_ep0, "failed to map request\n"); + dwc3_trace(trace_dwc3_ep0, "failed to map request"); return; } diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index b665a6afd336..5d82ab60dddf 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -289,16 +289,11 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd, if (!(reg & DWC3_DEPCMD_CMDACT)) { cmd_status = DWC3_DEPCMD_STATUS(reg); - dwc3_trace(trace_dwc3_gadget, - "Command Complete --> %d", - cmd_status); - switch (cmd_status) { case 0: ret = 0; break; case DEPEVT_TRANSFER_NO_RESOURCE: - dwc3_trace(trace_dwc3_gadget, "no resource available"); ret = -EINVAL; break; case DEPEVT_TRANSFER_BUS_EXPIRY: @@ -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 * the case by returning -EAGAIN. */ - dwc3_trace(trace_dwc3_gadget, "bus expiry"); ret = -EAGAIN; break; default: @@ -325,8 +319,6 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd, } while (timeout--); if (timeout == 0) { - dwc3_trace(trace_dwc3_gadget, - "Command Timed Out"); ret = -ETIMEDOUT; cmd_status = -ETIMEDOUT; } @@ -1046,14 +1038,14 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) if (!dep->endpoint.desc) { 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); return -ESHUTDOWN; } if (WARN(req->dep != dep, "request %p belongs to '%s'\n", &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); return -EINVAL; } @@ -1157,7 +1149,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) out: if (ret && ret != -EBUSY) dwc3_trace(trace_dwc3_gadget, - "%s: failed to kick transfers\n", + "%s: failed to kick transfers", dep->name); if (ret == -EBUSY) ret = 0; @@ -1177,7 +1169,7 @@ static int __dwc3_gadget_ep_queue_zlp(struct dwc3 *dwc, struct dwc3_ep *dep) struct usb_request *request; 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); if (!request) return -ENOMEM; @@ -1407,7 +1399,7 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc) speed = reg & DWC3_DSTS_CONNECTSPD; if ((speed == DWC3_DSTS_SUPERSPEED) || (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; } @@ -1419,7 +1411,7 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc) break; default: dwc3_trace(trace_dwc3_gadget, - "can't wakeup from '%s'\n", + "can't wakeup from '%s'", dwc3_gadget_link_string(link_state)); return -EINVAL; } @@ -1941,7 +1933,7 @@ static int __dwc3_cleanup_done_trbs(struct dwc3 *dwc, struct dwc3_ep *dep, trb_status = DWC3_TRB_SIZE_TRBSTS(trb->size); if (trb_status == DWC3_TRBSTS_MISSED_ISOC) { dwc3_trace(trace_dwc3_gadget, - "%s: incomplete IN transfer\n", + "%s: incomplete IN transfer", dep->name); /* * If missed isoc occurred and there is @@ -2139,7 +2131,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc, if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) { dwc3_trace(trace_dwc3_gadget, - "%s is an Isochronous endpoint\n", + "%s is an Isochronous endpoint", dep->name); return; } @@ -2167,7 +2159,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc, return; dwc3_trace(trace_dwc3_gadget, - "%s: failed to kick transfers\n", + "%s: failed to kick transfers", dep->name); } @@ -2190,11 +2182,11 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc, /* FALLTHROUGH */ default: dwc3_trace(trace_dwc3_gadget, - "unable to find suitable stream\n"); + "unable to find suitable stream"); } break; 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; case DWC3_DEPEVT_EPCMDCMPLT: dwc3_trace(trace_dwc3_gadget, "Endpoint Command Complete"); @@ -2915,7 +2907,7 @@ int dwc3_gadget_init(struct dwc3 *dwc) */ if (dwc->revision < DWC3_REVISION_220A) dwc3_trace(trace_dwc3_gadget, - "Changing max_speed on rev %08x\n", + "Changing max_speed on rev %08x", dwc->revision); dwc->gadget.max_speed = dwc->maximum_speed; -- 2.8.3 --------------------------------------------------------------------- Intel Finland Oy Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- 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