* [PATCH v2] Use RX_BUF_SIZE to set size of RX buffer
@ 2017-09-28 10:07 Martyn Welch
2017-10-03 18:24 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Martyn Welch @ 2017-09-28 10:07 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Jiri Slaby, linux-serial, linux-kernel, Uwe Kleine-König,
Martyn Welch
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.
Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Acked-by: Uwe Kleine-König <u.kleine-könig@pengtronix.de>
---
v2: Add missing SoB and Uwe's Acked-by.
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 1691ed2..9da109a 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1164,7 +1164,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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] Use RX_BUF_SIZE to set size of RX buffer
2017-09-28 10:07 [PATCH v2] Use RX_BUF_SIZE to set size of RX buffer Martyn Welch
@ 2017-10-03 18:24 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2017-10-03 18:24 UTC (permalink / raw)
To: Martyn Welch
Cc: Jiri Slaby, linux-serial, linux-kernel, Uwe Kleine-König
On Thu, Sep 28, 2017 at 11:07:40AM +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.
>
> Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
> Acked-by: Uwe Kleine-König <u.kleine-könig@pengtronix.de>
> ---
>
> v2: Add missing SoB and Uwe's Acked-by.
Your subject is missing "serial: imx:" :(
I'll go fix it up...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-03 18:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-28 10:07 [PATCH v2] Use RX_BUF_SIZE to set size of RX buffer Martyn Welch
2017-10-03 18:24 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox