All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Ludovic Desroches <ludovic.desroches@atmel.com>,
	gregkh@linuxfoundation.org
Cc: jslaby@suse.com, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/3] tty/serial: atmel: add comment for the ring buffer size macro
Date: Thu, 12 May 2016 17:57:17 +0200	[thread overview]
Message-ID: <5734A7DD.8030705@atmel.com> (raw)
In-Reply-To: <1463067456-6983-3-git-send-email-ludovic.desroches@atmel.com>

Le 12/05/2016 17:37, Ludovic Desroches a écrit :
> There is a macro named ATMEL_SERIAL_RINGSIZE which suggesting that it
> corresponds to the real size of the ring buffer. Let warn people that
> there is a factor of four since allocation size is
> sizeof(struct atmel_uart_char) * ATMEL_SERIAL_RINGSIZE.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks!

> ---
>  drivers/tty/serial/atmel_serial.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 6c1ec7d..8570163 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -108,6 +108,12 @@ struct atmel_uart_char {
>  	u16		ch;
>  };
>  
> +/*
> + * Be careful, the real size of the ring buffer is
> + * sizeof(atmel_uart_char) * ATMEL_SERIAL_RINGSIZE. It means that ring buffer
> + * can contain up to 1024 characters in PIO mode and up to 4096 characters in
> + * DMA mode.
> + */
>  #define ATMEL_SERIAL_RINGSIZE 1024
>  
>  /*
> 


-- 
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 3/3] tty/serial: atmel: add comment for the ring buffer size macro
Date: Thu, 12 May 2016 17:57:17 +0200	[thread overview]
Message-ID: <5734A7DD.8030705@atmel.com> (raw)
In-Reply-To: <1463067456-6983-3-git-send-email-ludovic.desroches@atmel.com>

Le 12/05/2016 17:37, Ludovic Desroches a ?crit :
> There is a macro named ATMEL_SERIAL_RINGSIZE which suggesting that it
> corresponds to the real size of the ring buffer. Let warn people that
> there is a factor of four since allocation size is
> sizeof(struct atmel_uart_char) * ATMEL_SERIAL_RINGSIZE.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks!

> ---
>  drivers/tty/serial/atmel_serial.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 6c1ec7d..8570163 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -108,6 +108,12 @@ struct atmel_uart_char {
>  	u16		ch;
>  };
>  
> +/*
> + * Be careful, the real size of the ring buffer is
> + * sizeof(atmel_uart_char) * ATMEL_SERIAL_RINGSIZE. It means that ring buffer
> + * can contain up to 1024 characters in PIO mode and up to 4096 characters in
> + * DMA mode.
> + */
>  #define ATMEL_SERIAL_RINGSIZE 1024
>  
>  /*
> 


-- 
Nicolas Ferre

WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Ludovic Desroches <ludovic.desroches@atmel.com>,
	<gregkh@linuxfoundation.org>
Cc: <jslaby@suse.com>, <linux-serial@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/3] tty/serial: atmel: add comment for the ring buffer size macro
Date: Thu, 12 May 2016 17:57:17 +0200	[thread overview]
Message-ID: <5734A7DD.8030705@atmel.com> (raw)
In-Reply-To: <1463067456-6983-3-git-send-email-ludovic.desroches@atmel.com>

Le 12/05/2016 17:37, Ludovic Desroches a écrit :
> There is a macro named ATMEL_SERIAL_RINGSIZE which suggesting that it
> corresponds to the real size of the ring buffer. Let warn people that
> there is a factor of four since allocation size is
> sizeof(struct atmel_uart_char) * ATMEL_SERIAL_RINGSIZE.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks!

> ---
>  drivers/tty/serial/atmel_serial.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 6c1ec7d..8570163 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -108,6 +108,12 @@ struct atmel_uart_char {
>  	u16		ch;
>  };
>  
> +/*
> + * Be careful, the real size of the ring buffer is
> + * sizeof(atmel_uart_char) * ATMEL_SERIAL_RINGSIZE. It means that ring buffer
> + * can contain up to 1024 characters in PIO mode and up to 4096 characters in
> + * DMA mode.
> + */
>  #define ATMEL_SERIAL_RINGSIZE 1024
>  
>  /*
> 


-- 
Nicolas Ferre

  reply	other threads:[~2016-05-12 15:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 15:37 [PATCH 1/3] tty/serial: atmel: re-integrate status check in irq handler Ludovic Desroches
2016-05-12 15:37 ` Ludovic Desroches
2016-05-12 15:37 ` Ludovic Desroches
2016-05-12 15:37 ` [PATCH 2/3] tty/serial: atmel: split tx and rx paths Ludovic Desroches
2016-05-12 15:37   ` Ludovic Desroches
2016-05-12 15:37   ` Ludovic Desroches
2016-05-12 15:37 ` [PATCH 3/3] tty/serial: atmel: add comment for the ring buffer size macro Ludovic Desroches
2016-05-12 15:37   ` Ludovic Desroches
2016-05-12 15:37   ` Ludovic Desroches
2016-05-12 15:57   ` Nicolas Ferre [this message]
2016-05-12 15:57     ` Nicolas Ferre
2016-05-12 15:57     ` 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=5734A7DD.8030705@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.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 \
    /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.