Commit 89eda1fa authored by Walt Feasel's avatar Walt Feasel Committed by Greg Kroah-Hartman

staging: emxx_udc: emxx_udc.c Logical continuation

Make suggested checkpatch modification for
CHECK: Logical continuations should be on the
previous line
Signed-off-by: default avatarWalt Feasel <waltfeasel@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a0edbc94
...@@ -926,8 +926,8 @@ static int _nbu2ss_epn_out_pio( ...@@ -926,8 +926,8 @@ static int _nbu2ss_epn_out_pio(
req->req.actual += result; req->req.actual += result;
if ((req->req.actual == req->req.length) if ((req->req.actual == req->req.length) ||
|| ((req->req.actual % ep->ep.maxpacket) != 0)) { ((req->req.actual % ep->ep.maxpacket) != 0)) {
result = 0; result = 0;
} }
...@@ -953,9 +953,8 @@ static int _nbu2ss_epn_out_data( ...@@ -953,9 +953,8 @@ static int _nbu2ss_epn_out_data(
iBufSize = min((req->req.length - req->req.actual), data_size); iBufSize = min((req->req.length - req->req.actual), data_size);
if ((ep->ep_type != USB_ENDPOINT_XFER_INT) if ((ep->ep_type != USB_ENDPOINT_XFER_INT) && (req->req.dma != 0) &&
&& (req->req.dma != 0) (iBufSize >= sizeof(u32))) {
&& (iBufSize >= sizeof(u32))) {
nret = _nbu2ss_out_dma(udc, req, num, iBufSize); nret = _nbu2ss_out_dma(udc, req, num, iBufSize);
} else { } else {
iBufSize = min_t(u32, iBufSize, ep->ep.maxpacket); iBufSize = min_t(u32, iBufSize, ep->ep.maxpacket);
...@@ -996,8 +995,8 @@ static int _nbu2ss_epn_out_transfer( ...@@ -996,8 +995,8 @@ static int _nbu2ss_epn_out_transfer(
} }
} }
} else { } else {
if ((req->req.actual == req->req.length) if ((req->req.actual == req->req.length) ||
|| ((req->req.actual % ep->ep.maxpacket) != 0)) { ((req->req.actual % ep->ep.maxpacket) != 0)) {
result = 0; result = 0;
} }
} }
...@@ -1166,9 +1165,8 @@ static int _nbu2ss_epn_in_data( ...@@ -1166,9 +1165,8 @@ static int _nbu2ss_epn_in_data(
num = ep->epnum - 1; num = ep->epnum - 1;
if ((ep->ep_type != USB_ENDPOINT_XFER_INT) if ((ep->ep_type != USB_ENDPOINT_XFER_INT) && (req->req.dma != 0) &&
&& (req->req.dma != 0) (data_size >= sizeof(u32))) {
&& (data_size >= sizeof(u32))) {
nret = _nbu2ss_in_dma(udc, ep, req, num, data_size); nret = _nbu2ss_in_dma(udc, ep, req, num, data_size);
} else { } else {
data_size = min_t(u32, data_size, ep->ep.maxpacket); data_size = min_t(u32, data_size, ep->ep.maxpacket);
...@@ -1577,8 +1575,7 @@ static int std_req_get_status(struct nbu2ss_udc *udc) ...@@ -1577,8 +1575,7 @@ static int std_req_get_status(struct nbu2ss_udc *udc)
u8 ep_adrs; u8 ep_adrs;
int result = -EINVAL; int result = -EINVAL;
if ((udc->ctrl.wValue != 0x0000) if ((udc->ctrl.wValue != 0x0000) || (direction != USB_DIR_IN)) {
|| (direction != USB_DIR_IN)) {
return result; return result;
} }
...@@ -1891,9 +1888,8 @@ static inline void _nbu2ss_ep0_int(struct nbu2ss_udc *udc) ...@@ -1891,9 +1888,8 @@ static inline void _nbu2ss_ep0_int(struct nbu2ss_udc *udc)
break; break;
case EP0_OUT_STATUS_PAHSE: case EP0_OUT_STATUS_PAHSE:
if ((status & STG_END_INT) if ((status & STG_END_INT) || (status & SETUP_INT) ||
|| (status & SETUP_INT) (status & EP0_OUT_NULL_INT)) {
|| (status & EP0_OUT_NULL_INT)) {
status &= ~(STG_END_INT status &= ~(STG_END_INT
| EP0_OUT_INT | EP0_OUT_INT
| EP0_OUT_NULL_INT); | EP0_OUT_NULL_INT);
...@@ -2537,8 +2533,8 @@ static int nbu2ss_ep_enable( ...@@ -2537,8 +2533,8 @@ static int nbu2ss_ep_enable(
} }
ep_type = usb_endpoint_type(desc); ep_type = usb_endpoint_type(desc);
if ((ep_type == USB_ENDPOINT_XFER_CONTROL) if ((ep_type == USB_ENDPOINT_XFER_CONTROL) ||
|| (ep_type == USB_ENDPOINT_XFER_ISOC)) { (ep_type == USB_ENDPOINT_XFER_ISOC)) {
pr_err(" *** %s, bat bmAttributes\n", __func__); pr_err(" *** %s, bat bmAttributes\n", __func__);
return -EINVAL; return -EINVAL;
} }
...@@ -2547,8 +2543,7 @@ static int nbu2ss_ep_enable( ...@@ -2547,8 +2543,7 @@ static int nbu2ss_ep_enable(
if (udc->vbus_active == 0) if (udc->vbus_active == 0)
return -ESHUTDOWN; return -ESHUTDOWN;
if ((!udc->driver) if ((!udc->driver) || (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
|| (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
dev_err(ep->udc->dev, " *** %s, udc !!\n", __func__); dev_err(ep->udc->dev, " *** %s, udc !!\n", __func__);
return -ESHUTDOWN; return -ESHUTDOWN;
} }
...@@ -2663,9 +2658,7 @@ static int nbu2ss_ep_queue( ...@@ -2663,9 +2658,7 @@ static int nbu2ss_ep_queue(
} }
req = container_of(_req, struct nbu2ss_req, req); req = container_of(_req, struct nbu2ss_req, req);
if (unlikely if (unlikely(!_req->complete || !_req->buf || !list_empty(&req->queue))) {
(!_req->complete || !_req->buf
|| !list_empty(&req->queue))) {
if (!_req->complete) if (!_req->complete)
pr_err("udc: %s --- !_req->complete\n", __func__); pr_err("udc: %s --- !_req->complete\n", __func__);
......
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