From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Cyrille Pitchen <cyrille.pitchen@atmel.com>,
gregkh@linuxfoundation.org, wenyou.yang@atmel.com,
ludovic.desroches@atmel.com, leilei.zhao@atmel.com,
voice.shen@atmel.com, josh.wu@atmel.com,
linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/5] tty/serial: at91: fix typo and indentation
Date: Fri, 9 Jan 2015 16:41:26 +0100 [thread overview]
Message-ID: <54AFF6A6.4060204@atmel.com> (raw)
In-Reply-To: <faa94cfe2de1047de096b51c780f6e408aced2fb.1418131298.git.cyrille.pitchen@atmel.com>
Le 09/12/2014 14:31, Cyrille Pitchen a écrit :
> Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
thanks Cyrille. Bye.
> ---
> drivers/tty/serial/atmel_serial.c | 40 +++++++++++++++++++++------------------
> 1 file changed, 22 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 9e0c636..846552b 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -738,7 +738,11 @@ static void atmel_complete_tx_dma(void *arg)
> if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
> uart_write_wakeup(port);
>
> - /* Do we really need this? */
> + /*
> + * xmit is a circular buffer so, if we have just send data from
> + * xmit->tail to the end of xmit->buf, now we have to transmit the
> + * remaining data from the beginning of xmit->buf to xmit->head.
> + */
> if (!uart_circ_empty(xmit))
> tasklet_schedule(&atmel_port->tasklet);
>
> @@ -797,11 +801,11 @@ static void atmel_tx_dma(struct uart_port *port)
> BUG_ON(!sg_dma_len(sg));
>
> desc = dmaengine_prep_slave_sg(chan,
> - sg,
> - 1,
> - DMA_MEM_TO_DEV,
> - DMA_PREP_INTERRUPT |
> - DMA_CTRL_ACK);
> + sg,
> + 1,
> + DMA_MEM_TO_DEV,
> + DMA_PREP_INTERRUPT |
> + DMA_CTRL_ACK);
> if (!desc) {
> dev_err(port->dev, "Failed to send via dma!\n");
> return;
> @@ -1025,13 +1029,13 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
> /* UART circular rx buffer is an aligned page. */
> BUG_ON((int)port->state->xmit.buf & ~PAGE_MASK);
> sg_set_page(&atmel_port->sg_rx,
> - virt_to_page(ring->buf),
> - ATMEL_SERIAL_RINGSIZE,
> - (int)ring->buf & ~PAGE_MASK);
> - nent = dma_map_sg(port->dev,
> - &atmel_port->sg_rx,
> - 1,
> - DMA_FROM_DEVICE);
> + virt_to_page(ring->buf),
> + ATMEL_SERIAL_RINGSIZE,
> + (int)ring->buf & ~PAGE_MASK);
> + nent = dma_map_sg(port->dev,
> + &atmel_port->sg_rx,
> + 1,
> + DMA_FROM_DEVICE);
>
> if (!nent) {
> dev_dbg(port->dev, "need to release resource of dma\n");
> @@ -1060,11 +1064,11 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
> * each one is half ring buffer size
> */
> desc = dmaengine_prep_dma_cyclic(atmel_port->chan_rx,
> - sg_dma_address(&atmel_port->sg_rx),
> - sg_dma_len(&atmel_port->sg_rx),
> - sg_dma_len(&atmel_port->sg_rx)/2,
> - DMA_DEV_TO_MEM,
> - DMA_PREP_INTERRUPT);
> + sg_dma_address(&atmel_port->sg_rx),
> + sg_dma_len(&atmel_port->sg_rx),
> + sg_dma_len(&atmel_port->sg_rx)/2,
> + DMA_DEV_TO_MEM,
> + DMA_PREP_INTERRUPT);
> desc->callback = atmel_complete_rx_dma;
> desc->callback_param = port;
> atmel_port->desc_rx = desc;
>
--
Nicolas Ferre
WARNING: multiple messages have this Message-ID (diff)
From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] tty/serial: at91: fix typo and indentation
Date: Fri, 9 Jan 2015 16:41:26 +0100 [thread overview]
Message-ID: <54AFF6A6.4060204@atmel.com> (raw)
In-Reply-To: <faa94cfe2de1047de096b51c780f6e408aced2fb.1418131298.git.cyrille.pitchen@atmel.com>
Le 09/12/2014 14:31, Cyrille Pitchen a ?crit :
> Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
thanks Cyrille. Bye.
> ---
> drivers/tty/serial/atmel_serial.c | 40 +++++++++++++++++++++------------------
> 1 file changed, 22 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 9e0c636..846552b 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -738,7 +738,11 @@ static void atmel_complete_tx_dma(void *arg)
> if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
> uart_write_wakeup(port);
>
> - /* Do we really need this? */
> + /*
> + * xmit is a circular buffer so, if we have just send data from
> + * xmit->tail to the end of xmit->buf, now we have to transmit the
> + * remaining data from the beginning of xmit->buf to xmit->head.
> + */
> if (!uart_circ_empty(xmit))
> tasklet_schedule(&atmel_port->tasklet);
>
> @@ -797,11 +801,11 @@ static void atmel_tx_dma(struct uart_port *port)
> BUG_ON(!sg_dma_len(sg));
>
> desc = dmaengine_prep_slave_sg(chan,
> - sg,
> - 1,
> - DMA_MEM_TO_DEV,
> - DMA_PREP_INTERRUPT |
> - DMA_CTRL_ACK);
> + sg,
> + 1,
> + DMA_MEM_TO_DEV,
> + DMA_PREP_INTERRUPT |
> + DMA_CTRL_ACK);
> if (!desc) {
> dev_err(port->dev, "Failed to send via dma!\n");
> return;
> @@ -1025,13 +1029,13 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
> /* UART circular rx buffer is an aligned page. */
> BUG_ON((int)port->state->xmit.buf & ~PAGE_MASK);
> sg_set_page(&atmel_port->sg_rx,
> - virt_to_page(ring->buf),
> - ATMEL_SERIAL_RINGSIZE,
> - (int)ring->buf & ~PAGE_MASK);
> - nent = dma_map_sg(port->dev,
> - &atmel_port->sg_rx,
> - 1,
> - DMA_FROM_DEVICE);
> + virt_to_page(ring->buf),
> + ATMEL_SERIAL_RINGSIZE,
> + (int)ring->buf & ~PAGE_MASK);
> + nent = dma_map_sg(port->dev,
> + &atmel_port->sg_rx,
> + 1,
> + DMA_FROM_DEVICE);
>
> if (!nent) {
> dev_dbg(port->dev, "need to release resource of dma\n");
> @@ -1060,11 +1064,11 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
> * each one is half ring buffer size
> */
> desc = dmaengine_prep_dma_cyclic(atmel_port->chan_rx,
> - sg_dma_address(&atmel_port->sg_rx),
> - sg_dma_len(&atmel_port->sg_rx),
> - sg_dma_len(&atmel_port->sg_rx)/2,
> - DMA_DEV_TO_MEM,
> - DMA_PREP_INTERRUPT);
> + sg_dma_address(&atmel_port->sg_rx),
> + sg_dma_len(&atmel_port->sg_rx),
> + sg_dma_len(&atmel_port->sg_rx)/2,
> + DMA_DEV_TO_MEM,
> + DMA_PREP_INTERRUPT);
> desc->callback = atmel_complete_rx_dma;
> desc->callback_param = port;
> atmel_port->desc_rx = desc;
>
--
Nicolas Ferre
WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Cyrille Pitchen <cyrille.pitchen@atmel.com>,
<gregkh@linuxfoundation.org>, <wenyou.yang@atmel.com>,
<ludovic.desroches@atmel.com>, <leilei.zhao@atmel.com>,
<voice.shen@atmel.com>, <josh.wu@atmel.com>,
<linux-serial@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 5/5] tty/serial: at91: fix typo and indentation
Date: Fri, 9 Jan 2015 16:41:26 +0100 [thread overview]
Message-ID: <54AFF6A6.4060204@atmel.com> (raw)
In-Reply-To: <faa94cfe2de1047de096b51c780f6e408aced2fb.1418131298.git.cyrille.pitchen@atmel.com>
Le 09/12/2014 14:31, Cyrille Pitchen a écrit :
> Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
thanks Cyrille. Bye.
> ---
> drivers/tty/serial/atmel_serial.c | 40 +++++++++++++++++++++------------------
> 1 file changed, 22 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 9e0c636..846552b 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -738,7 +738,11 @@ static void atmel_complete_tx_dma(void *arg)
> if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
> uart_write_wakeup(port);
>
> - /* Do we really need this? */
> + /*
> + * xmit is a circular buffer so, if we have just send data from
> + * xmit->tail to the end of xmit->buf, now we have to transmit the
> + * remaining data from the beginning of xmit->buf to xmit->head.
> + */
> if (!uart_circ_empty(xmit))
> tasklet_schedule(&atmel_port->tasklet);
>
> @@ -797,11 +801,11 @@ static void atmel_tx_dma(struct uart_port *port)
> BUG_ON(!sg_dma_len(sg));
>
> desc = dmaengine_prep_slave_sg(chan,
> - sg,
> - 1,
> - DMA_MEM_TO_DEV,
> - DMA_PREP_INTERRUPT |
> - DMA_CTRL_ACK);
> + sg,
> + 1,
> + DMA_MEM_TO_DEV,
> + DMA_PREP_INTERRUPT |
> + DMA_CTRL_ACK);
> if (!desc) {
> dev_err(port->dev, "Failed to send via dma!\n");
> return;
> @@ -1025,13 +1029,13 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
> /* UART circular rx buffer is an aligned page. */
> BUG_ON((int)port->state->xmit.buf & ~PAGE_MASK);
> sg_set_page(&atmel_port->sg_rx,
> - virt_to_page(ring->buf),
> - ATMEL_SERIAL_RINGSIZE,
> - (int)ring->buf & ~PAGE_MASK);
> - nent = dma_map_sg(port->dev,
> - &atmel_port->sg_rx,
> - 1,
> - DMA_FROM_DEVICE);
> + virt_to_page(ring->buf),
> + ATMEL_SERIAL_RINGSIZE,
> + (int)ring->buf & ~PAGE_MASK);
> + nent = dma_map_sg(port->dev,
> + &atmel_port->sg_rx,
> + 1,
> + DMA_FROM_DEVICE);
>
> if (!nent) {
> dev_dbg(port->dev, "need to release resource of dma\n");
> @@ -1060,11 +1064,11 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
> * each one is half ring buffer size
> */
> desc = dmaengine_prep_dma_cyclic(atmel_port->chan_rx,
> - sg_dma_address(&atmel_port->sg_rx),
> - sg_dma_len(&atmel_port->sg_rx),
> - sg_dma_len(&atmel_port->sg_rx)/2,
> - DMA_DEV_TO_MEM,
> - DMA_PREP_INTERRUPT);
> + sg_dma_address(&atmel_port->sg_rx),
> + sg_dma_len(&atmel_port->sg_rx),
> + sg_dma_len(&atmel_port->sg_rx)/2,
> + DMA_DEV_TO_MEM,
> + DMA_PREP_INTERRUPT);
> desc->callback = atmel_complete_rx_dma;
> desc->callback_param = port;
> atmel_port->desc_rx = desc;
>
--
Nicolas Ferre
next prev parent reply other threads:[~2015-01-09 15:41 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 13:31 [PATCH 0/5] tty/serial: at91: fix atmel_serial_probe(), dma_sync_* and the Hardware Handshaking support Cyrille Pitchen
2014-12-09 13:31 ` Cyrille Pitchen
2014-12-09 13:31 ` Cyrille Pitchen
2014-12-09 13:31 ` [PATCH 1/5] tty/serial: at91: use correct type for dma_sync_*_for_cpu() and dma_sync_*_for_device() Cyrille Pitchen
2014-12-09 13:31 ` Cyrille Pitchen
2014-12-09 13:31 ` Cyrille Pitchen
2015-01-09 15:13 ` Nicolas Ferre
2015-01-09 15:13 ` Nicolas Ferre
2015-01-09 15:13 ` Nicolas Ferre
2015-01-09 22:19 ` Greg KH
2015-01-09 22:19 ` Greg KH
2014-12-09 13:31 ` [PATCH 2/5] tty/serial: at91: enable peripheral clock before accessing I/O registers Cyrille Pitchen
2014-12-09 13:31 ` Cyrille Pitchen
2014-12-09 13:31 ` Cyrille Pitchen
2015-01-09 15:12 ` Nicolas Ferre
2015-01-09 15:12 ` Nicolas Ferre
2015-01-09 15:12 ` Nicolas Ferre
2014-12-09 13:31 ` [PATCH 3/5] tty/serial: at91: fix error handling in atmel_serial_probe() Cyrille Pitchen
2014-12-09 13:31 ` Cyrille Pitchen
2014-12-09 13:31 ` Cyrille Pitchen
2015-01-09 15:28 ` Nicolas Ferre
2015-01-09 15:28 ` Nicolas Ferre
2015-01-09 15:28 ` Nicolas Ferre
2014-12-09 13:31 ` [PATCH 4/5] tty/serial: at91: fix RTS line management when hardware handshake is enabled Cyrille Pitchen
2014-12-09 13:31 ` Cyrille Pitchen
2014-12-09 13:31 ` Cyrille Pitchen
2015-01-09 15:40 ` Nicolas Ferre
2015-01-09 15:40 ` Nicolas Ferre
2015-01-09 15:40 ` Nicolas Ferre
2014-12-09 13:31 ` [PATCH 5/5] tty/serial: at91: fix typo and indentation Cyrille Pitchen
2014-12-09 13:31 ` Cyrille Pitchen
2014-12-09 13:31 ` Cyrille Pitchen
2015-01-09 15:41 ` Nicolas Ferre [this message]
2015-01-09 15:41 ` Nicolas Ferre
2015-01-09 15:41 ` Nicolas Ferre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54AFF6A6.4060204@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=cyrille.pitchen@atmel.com \
--cc=gregkh@linuxfoundation.org \
--cc=josh.wu@atmel.com \
--cc=leilei.zhao@atmel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=ludovic.desroches@atmel.com \
--cc=voice.shen@atmel.com \
--cc=wenyou.yang@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.