From: Martyn Welch <martyn.welch@collabora.co.uk>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Use RX_BUF_SIZE to set size of RX buffer
Date: Thu, 28 Sep 2017 11:04:51 +0100 [thread overview]
Message-ID: <20170928100451.GL6739@hermes.home> (raw)
In-Reply-To: <20170928100019.ynpbdctn65vxf7kq@pengutronix.de>
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/ |
prev parent reply other threads:[~2017-09-28 10:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-28 9:52 [PATCH] Use RX_BUF_SIZE to set size of RX buffer Martyn Welch
2017-09-28 10:00 ` Uwe Kleine-König
2017-09-28 10:04 ` Martyn Welch [this message]
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=20170928100451.GL6739@hermes.home \
--to=martyn.welch@collabora.co.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).