[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7ed4782b8872b5bf2788d4ce440149112f7e3c4b.camel@perches.com>
Date: Sat, 17 Nov 2018 10:07:33 -0800
From: Joe Perches <joe@...ches.com>
To: Cristian Sicilia <sicilia.cristian@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Carmeli Tamir <carmeli.tamir@...il.com>,
Christopher Diaz Riveros <chrisadr@...too.org>,
Arkadiusz Lis <areklis909@...il.com>,
Nathan Chancellor <natechancellor@...il.com>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] staging: emxx_udc: Split line and fix eol
parenthesis
On Sat, 2018-11-17 at 00:46 +0100, Cristian Sicilia wrote:
> Fix some parenthesis opened at end of line.
It looks like this is all guarded by #ifdef UDC_DEBUG_DUMP
which is not ever set and this probably would not compile
if it was.
It's probably better to remove all the blocks guarded by
that flag and the flag itself.
> Signed-off-by: Cristian Sicilia <sicilia.cristian@...il.com>
> ---
> drivers/staging/emxx_udc/emxx_udc.c | 73 ++++++++++++++++++-------------------
> 1 file changed, 36 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> index bf7c5da..26bd77c 100644
> --- a/drivers/staging/emxx_udc/emxx_udc.c
> +++ b/drivers/staging/emxx_udc/emxx_udc.c
> @@ -108,20 +108,20 @@ static void _nbu2ss_dump_register(struct nbu2ss_udc *udc)
>
> dev_dbg(&udc->dev, "\n-USB REG-\n");
> for (i = 0x0 ; i < USB_BASE_SIZE ; i += 16) {
> - reg_data = _nbu2ss_readl(
> - (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i));
> + reg_data = _nbu2ss_readl((u32 *)IO_ADDRESS(USB_BASE_ADDRESS +
> + i));
> dev_dbg(&udc->dev, "USB%04x =%08x", i, (int)reg_data);
>
> - reg_data = _nbu2ss_readl(
> - (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 4));
> + reg_data = _nbu2ss_readl((u32 *)IO_ADDRESS(USB_BASE_ADDRESS +
> + i + 4));
> dev_dbg(&udc->dev, " %08x", (int)reg_data);
>
> - reg_data = _nbu2ss_readl(
> - (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 8));
> + reg_data = _nbu2ss_readl((u32 *)IO_ADDRESS(USB_BASE_ADDRESS +
> + i + 8));
> dev_dbg(&udc->dev, " %08x", (int)reg_data);
>
> - reg_data = _nbu2ss_readl(
> - (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 12));
> + reg_data = _nbu2ss_readl((u32 *)IO_ADDRESS(USB_BASE_ADDRESS +
> + i + 12));
> dev_dbg(&udc->dev, " %08x\n", (int)reg_data);
> }
>
> @@ -473,22 +473,23 @@ static void _nbu2ss_dma_map_single(
> if (req->unaligned) {
> req->req.dma = ep->phys_buf;
> } else {
> - req->req.dma = dma_map_single(
> - udc->gadget.dev.parent,
> - req->req.buf,
> - req->req.length,
> - (direct == USB_DIR_IN)
> - ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
> + req->req.dma =
> + dma_map_single(udc->gadget.dev.parent,
> + req->req.buf,
> + req->req.length,
> + (direct == USB_DIR_IN) ?
> + DMA_TO_DEVICE :
> + DMA_FROM_DEVICE);
> }
> req->mapped = 1;
> } else {
> if (!req->unaligned)
> - dma_sync_single_for_device(
> - udc->gadget.dev.parent,
> - req->req.dma,
> - req->req.length,
> - (direct == USB_DIR_IN)
> - ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
> + dma_sync_single_for_device(udc->gadget.dev.parent,
> + req->req.dma,
> + req->req.length,
> + (direct == USB_DIR_IN)
> + ? DMA_TO_DEVICE :
> + DMA_FROM_DEVICE);
>
> req->mapped = 0;
> }
> @@ -975,8 +976,8 @@ static int _nbu2ss_epn_out_transfer(
>
> /*-------------------------------------------------------------*/
> /* Receive Length */
> - i_recv_length
> - = _nbu2ss_readl(&preg->EP_REGS[num].EP_LEN_DCNT) & EPN_LDATA;
> + i_recv_length =
> + _nbu2ss_readl(&preg->EP_REGS[num].EP_LEN_DCNT) & EPN_LDATA;
>
> if (i_recv_length != 0) {
> result = _nbu2ss_epn_out_data(udc, ep, req, i_recv_length);
> @@ -1115,10 +1116,9 @@ static int _nbu2ss_epn_in_pio(
> i_word_length = length / sizeof(u32);
> if (i_word_length > 0) {
> for (i = 0; i < i_word_length; i++) {
> - _nbu2ss_writel(
> - &preg->EP_REGS[ep->epnum - 1].EP_WRITE
> - , p_buf_32->dw
> - );
> + _nbu2ss_writel(&preg->EP_REGS[ep->epnum -
> + 1].EP_WRITE,
> + p_buf_32->dw);
>
> p_buf_32++;
> }
> @@ -1472,13 +1472,11 @@ static inline int _nbu2ss_req_feature(struct nbu2ss_udc *udc, bool bset)
> if (0x0000 == (wIndex & 0xFF70)) {
> if (selector == USB_ENDPOINT_HALT) {
> ep_adrs = wIndex & 0xFF;
> - if (!bset) {
> - _nbu2ss_endpoint_toggle_reset(
> - udc, ep_adrs);
> - }
> + if (!bset)
> + _nbu2ss_endpoint_toggle_reset(udc,
> + ep_adrs);
>
> - _nbu2ss_set_endpoint_stall(
> - udc, ep_adrs, bset);
> + _nbu2ss_set_endpoint_stall(udc, ep_adrs, bset);
>
> result = 0;
> }
> @@ -1524,8 +1522,8 @@ static void _nbu2ss_epn_set_stall(
> for (limit_cnt = 0
> ; limit_cnt < IN_DATA_EMPTY_COUNT
> ; limit_cnt++) {
> - regdata = _nbu2ss_readl(
> - &preg->EP_REGS[ep->epnum - 1].EP_STATUS);
> + regdata = _nbu2ss_readl(&preg->EP_REGS[ep->epnum -
> + 1].EP_STATUS);
>
> if ((regdata & EPN_IN_DATA) == 0)
> break;
> @@ -2666,9 +2664,10 @@ static int nbu2ss_ep_queue(
>
> if (req->unaligned) {
> if (!ep->virt_buf)
> - ep->virt_buf = dma_alloc_coherent(
> - NULL, PAGE_SIZE,
> - &ep->phys_buf, GFP_ATOMIC | GFP_DMA);
> + ep->virt_buf = dma_alloc_coherent(NULL,
> + PAGE_SIZE,
> + &ep->phys_buf,
> + GFP_ATOMIC | GFP_DMA);
> if (ep->epnum > 0) {
> if (ep->direct == USB_DIR_IN)
> memcpy(ep->virt_buf, req->req.buf,
Powered by blists - more mailing lists