From mboxrd@z Thu Jan 1 00:00:00 1970 From: Souptick Joarder Subject: Re: [PATCH] net: wan: Use dma_pool_zalloc Date: Fri, 16 Dec 2016 19:25:18 +0530 Message-ID: References: <20161203091447.GA5231@jordon-HP-15-Notebook-PC> <1481820487.29291.66.camel@perches.com> <1481868649.29291.85.camel@perches.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: =?UTF-8?Q?Krzysztof_Ha=C5=82asa?= , netdev@vger.kernel.org, Rameshwar Sahu To: Joe Perches Return-path: Received: from mail-io0-f194.google.com ([209.85.223.194]:33231 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755619AbcLPNzs (ORCPT ); Fri, 16 Dec 2016 08:55:48 -0500 Received: by mail-io0-f194.google.com with SMTP id p13so11985861ioi.0 for ; Fri, 16 Dec 2016 05:55:19 -0800 (PST) In-Reply-To: <1481868649.29291.85.camel@perches.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Dec 16, 2016 at 11:40 AM, Joe Perches wrote: > On Fri, 2016-12-16 at 11:33 +0530, Souptick Joarder wrote: >> On Thu, Dec 15, 2016 at 10:18 PM, Joe Perches wrote: >> > On Thu, 2016-12-15 at 10:41 +0530, Souptick Joarder wrote: >> > > On Mon, Dec 12, 2016 at 10:12 AM, Souptick Joarder wrote: >> > > > On Fri, Dec 9, 2016 at 6:33 PM, Krzysztof Ha=C5=82asa wrote: >> > > > > Souptick Joarder writes: >> > > > > >> > > > > > We should use dma_pool_zalloc instead of dma_pool_alloc/memset >> > >> > [] >> > > > > > diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ix= p4xx_hss.c >> > >> > [] >> > > > > > @@ -976,10 +976,9 @@ static int init_hdlc_queues(struct port *= port) >> > > > > > return -ENOMEM; >> > > > > > } >> > > > > > >> > > > > > - if (!(port->desc_tab =3D dma_pool_alloc(dma_pool, GFP_KE= RNEL, >> > > > > > - &port->desc_tab_ph= ys))) >> > > > > > + if (!(port->desc_tab =3D dma_pool_zalloc(dma_pool, GFP_K= ERNEL, >> > > > > > + &port->desc_tab_p= hys))) >> > > > > > return -ENOMEM; >> > > > > > - memset(port->desc_tab, 0, POOL_ALLOC_SIZE); >> > > > > > memset(port->rx_buff_tab, 0, sizeof(port->rx_buff_tab));= /* tables */ >> > > > > > memset(port->tx_buff_tab, 0, sizeof(port->tx_buff_tab)); >> > > > > >> > > > > This look fine, feel free to send it to the netdev mailing list = for >> > > > > inclusion. >> > > > >> > > > Including netdev mailing list based as requested. >> > > > > Acked-by: Krzysztof Halasa >> > >> > [] >> > > Any comment on this patch ? >> > >> > Shouldn't the one in drivers/net/ethernet/xscale/ixp4xx_eth.c >> > also be changed? >> >> Yes, you are right. Do you want me to include it in same patch? > > Your choice. I would use a single patch. There are few other places where the same change is applicable. I am planning to put all those changes in a single patch. It includes changes in drivers/net/ethernet/xscale/ixp4xx_eth.c You can review this patch separately. >