Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753077AbdI1KA2 (ORCPT ); Thu, 28 Sep 2017 06:00:28 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:54549 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753050AbdI1KAY (ORCPT ); Thu, 28 Sep 2017 06:00:24 -0400 Date: Thu, 28 Sep 2017 12:00:19 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Martyn Welch Cc: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Use RX_BUF_SIZE to set size of RX buffer Message-ID: <20170928100019.ynpbdctn65vxf7kq@pengutronix.de> References: <1506592335-12623-1-git-send-email-martyn.welch@collabora.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1506592335-12623-1-git-send-email-martyn.welch@collabora.co.uk> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:5054:ff:fe2a:3aa X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1127 Lines: 33 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 -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |