diff options
author | Moiz Sonasath <m-sonasath@ti.com> | 2012-08-01 14:08:30 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-08-07 08:28:20 +0300 |
commit | 348e026fafe2501281db5fb7fed599b337cad358 (patch) | |
tree | 0a5a02cc373c46d19f7a9db65fa52f0c17d959bf | |
parent | 2dfe37d4a5f9a7586a7ff79249492fb8280afb6f (diff) | |
download | blackbird-obmc-linux-348e026fafe2501281db5fb7fed599b337cad358.tar.gz blackbird-obmc-linux-348e026fafe2501281db5fb7fed599b337cad358.zip |
usb: dwc3: gadget: Fix sparse warnings
This patch fixes the following sparse warnings:
drivers/usb/dwc3/gadget.c:1096:7: warning: symbol 'ret' shadows an earlier one
drivers/usb/dwc3/gadget.c:1058:8: originally declared here
drivers/usb/dwc3/gadget.c:1100:16: warning: symbol 'dwc' shadows an earlier one
drivers/usb/dwc3/gadget.c:1057:15: originally declared here
drivers/usb/dwc3/gadget.c:1118:16: warning: symbol 'dwc' shadows an earlier one
drivers/usb/dwc3/gadget.c:1057:15: originally declared here
drivers/usb/dwc3/gadget.c:1800:19: warning: symbol 'dep' shadows an earlier one
drivers/usb/dwc3/gadget.c:1778:18: originally declared here
Also, fix the potential checkpatch errors around the if() loops that
this fix patch can create.
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 283c0cb2f40c..920d99716e4f 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1092,15 +1092,10 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) * */ if (dep->flags & DWC3_EP_PENDING_REQUEST) { - int ret; - ret = __dwc3_gadget_kick_transfer(dep, 0, true); - if (ret && ret != -EBUSY) { - struct dwc3 *dwc = dep->dwc; - + if (ret && ret != -EBUSY) dev_dbg(dwc->dev, "%s: failed to kick transfers\n", dep->name); - } } /* @@ -1113,12 +1108,9 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) WARN_ON_ONCE(!dep->resource_index); ret = __dwc3_gadget_kick_transfer(dep, dep->resource_index, false); - if (ret && ret != -EBUSY) { - struct dwc3 *dwc = dep->dwc; - + if (ret && ret != -EBUSY) dev_dbg(dwc->dev, "%s: failed to kick transfers\n", dep->name); - } } /* @@ -1755,7 +1747,7 @@ static void dwc3_endpoint_transfer_complete(struct dwc3 *dwc, int i; for (i = 0; i < DWC3_ENDPOINTS_NUM; i++) { - struct dwc3_ep *dep = dwc->eps[i]; + dep = dwc->eps[i]; if (!(dep->flags & DWC3_EP_ENABLED)) continue; |