Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1741358 > unrolled thread
| Started by | Martyn Welch <martyn.welch@collabora.co.uk> |
|---|---|
| First post | 2017-09-28 12:00 +0200 |
| Last post | 2017-09-28 12:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] Use RX_BUF_SIZE to set size of RX buffer Martyn Welch <martyn.welch@collabora.co.uk> - 2017-09-28 12:00 +0200
Re: [PATCH] Use RX_BUF_SIZE to set size of RX buffer Uwe Kleine-König <u.kleine-koenig@pengutronix.de> - 2017-09-28 12:10 +0200
Re: [PATCH] Use RX_BUF_SIZE to set size of RX buffer Martyn Welch <martyn.welch@collabora.co.uk> - 2017-09-28 12:10 +0200
| From | Martyn Welch <martyn.welch@collabora.co.uk> |
|---|---|
| Date | 2017-09-28 12:00 +0200 |
| Subject | [PATCH] Use RX_BUF_SIZE to set size of RX buffer |
| Message-ID | <uuDLQ-7o2-21@gated-at.bofh.it> |
The imx serial driver uses PAGE_SIZE when allocating rx_buf, but then
uses RX_BUF_SIZE (which is currently defined as PAGE_SIZE) to describe
the length of the buffer when initialising the scatter gather list.
In order to ensure that this stays consistent, use RX_BUF_SIZE in both
locations.
---
drivers/tty/serial/imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index fe368a4..bc2f2a2f 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1165,7 +1165,7 @@ static int imx_uart_dma_init(struct imx_port *sport)
goto err;
}
- sport->rx_buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
+ sport->rx_buf = kzalloc(RX_BUF_SIZE, GFP_KERNEL);
if (!sport->rx_buf) {
ret = -ENOMEM;
goto err;
--
1.8.3.1
[toc] | [next] | [standalone]
| From | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
|---|---|
| Date | 2017-09-28 12:10 +0200 |
| Message-ID | <uuDVw-7Gp-17@gated-at.bofh.it> |
| In reply to | #1741358 |
On Thu, Sep 28, 2017 at 10:52:15AM +0100, Martyn Welch wrote:
> The imx serial driver uses PAGE_SIZE when allocating rx_buf, but then
> uses RX_BUF_SIZE (which is currently defined as PAGE_SIZE) to describe
> the length of the buffer when initialising the scatter gather list.
>
> In order to ensure that this stays consistent, use RX_BUF_SIZE in both
> locations.
Missing SoB Line
> ---
> drivers/tty/serial/imx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index fe368a4..bc2f2a2f 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -1165,7 +1165,7 @@ static int imx_uart_dma_init(struct imx_port *sport)
> goto err;
> }
>
> - sport->rx_buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
> + sport->rx_buf = kzalloc(RX_BUF_SIZE, GFP_KERNEL);
> if (!sport->rx_buf) {
> ret = -ENOMEM;
> goto err;
Acked-by: Uwe Kleine-König <u.kleine-könig@pengtronix.de>
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[toc] | [prev] | [next] | [standalone]
| From | Martyn Welch <martyn.welch@collabora.co.uk> |
|---|---|
| Date | 2017-09-28 12:10 +0200 |
| Message-ID | <uuDVw-7Gp-23@gated-at.bofh.it> |
| In reply to | #1741386 |
On Thu, Sep 28, 2017 at 12:00:19PM +0200, Uwe Kleine-König wrote:
> On Thu, Sep 28, 2017 at 10:52:15AM +0100, Martyn Welch wrote:
> > The imx serial driver uses PAGE_SIZE when allocating rx_buf, but then
> > uses RX_BUF_SIZE (which is currently defined as PAGE_SIZE) to describe
> > the length of the buffer when initialising the scatter gather list.
> >
> > In order to ensure that this stays consistent, use RX_BUF_SIZE in both
> > locations.
>
> Missing SoB Line
Doh! v2 on way...
>
> > ---
> > drivers/tty/serial/imx.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> > index fe368a4..bc2f2a2f 100644
> > --- a/drivers/tty/serial/imx.c
> > +++ b/drivers/tty/serial/imx.c
> > @@ -1165,7 +1165,7 @@ static int imx_uart_dma_init(struct imx_port *sport)
> > goto err;
> > }
> >
> > - sport->rx_buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
> > + sport->rx_buf = kzalloc(RX_BUF_SIZE, GFP_KERNEL);
> > if (!sport->rx_buf) {
> > ret = -ENOMEM;
> > goto err;
> Acked-by: Uwe Kleine-König <u.kleine-könig@pengtronix.de>
>
>
> --
> Pengutronix e.K. | Uwe Kleine-König |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web