From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Ferre 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 Message-ID: <5734A7DD.8030705@atmel.com> References: <1463067456-6983-1-git-send-email-ludovic.desroches@atmel.com> <1463067456-6983-3-git-send-email-ludovic.desroches@atmel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1463067456-6983-3-git-send-email-ludovic.desroches@atmel.com> Sender: linux-kernel-owner@vger.kernel.org To: Ludovic Desroches , gregkh@linuxfoundation.org Cc: jslaby@suse.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org List-Id: linux-serial@vger.kernel.org Le 12/05/2016 17:37, Ludovic Desroches a =E9crit : > 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. >=20 > Signed-off-by: Ludovic Desroches Acked-by: Nicolas Ferre Thanks! > --- > drivers/tty/serial/atmel_serial.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/a= tmel_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; > }; > =20 > +/* > + * Be careful, the real size of the ring buffer is > + * sizeof(atmel_uart_char) * ATMEL_SERIAL_RINGSIZE. It means that ri= ng buffer > + * can contain up to 1024 characters in PIO mode and up to 4096 char= acters in > + * DMA mode. > + */ > #define ATMEL_SERIAL_RINGSIZE 1024 > =20 > /* >=20 --=20 Nicolas Ferre From mboxrd@z Thu Jan 1 00:00:00 1970 From: nicolas.ferre@atmel.com (Nicolas Ferre) Date: Thu, 12 May 2016 17:57:17 +0200 Subject: [PATCH 3/3] tty/serial: atmel: add comment for the ring buffer size macro In-Reply-To: <1463067456-6983-3-git-send-email-ludovic.desroches@atmel.com> References: <1463067456-6983-1-git-send-email-ludovic.desroches@atmel.com> <1463067456-6983-3-git-send-email-ludovic.desroches@atmel.com> Message-ID: <5734A7DD.8030705@atmel.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 Acked-by: Nicolas Ferre 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932393AbcELP5G (ORCPT ); Thu, 12 May 2016 11:57:06 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:2433 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932120AbcELP5F (ORCPT ); Thu, 12 May 2016 11:57:05 -0400 Subject: Re: [PATCH 3/3] tty/serial: atmel: add comment for the ring buffer size macro To: Ludovic Desroches , References: <1463067456-6983-1-git-send-email-ludovic.desroches@atmel.com> <1463067456-6983-3-git-send-email-ludovic.desroches@atmel.com> CC: , , , From: Nicolas Ferre Organization: atmel Message-ID: <5734A7DD.8030705@atmel.com> Date: Thu, 12 May 2016 17:57:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1463067456-6983-3-git-send-email-ludovic.desroches@atmel.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.161.30.18] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Nicolas Ferre 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