lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHYXAnKuobxgD0=0R5+Yzkh0M6QYHPsn5+hGBTGa8BQy9SzKqw@mail.gmail.com>
Date:   Thu, 30 Nov 2017 22:32:09 +0100
From:   "Gomonovych, Vasyl" <gomonovych@...il.com>
To:     netdev@...r.kernel.org, khalasa@...p.pl
Subject: Re: [PATCH] net: ethernet: ixp4xx_eth: Use dma_pool_zalloc

Sorry, Ignore this please.

On Thu, Nov 30, 2017 at 10:22 PM, Vasyl Gomonovych <gomonovych@...il.com> wrote:
> Replacing dma_pool_alloc and memset with a single call to dma_pool_zalloc
>
> Signed-off-by: Vasyl Gomonovych <gomonovych@...il.com>
> ---
>  drivers/net/ethernet/xscale/ixp4xx_eth.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
> index aee55c03def0..02f7f3e3da8d 100644
> --- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
> +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
> @@ -1108,10 +1108,10 @@ static int init_queues(struct port *port)
>                         return -ENOMEM;
>         }
>
> -       if (!(port->desc_tab = dma_pool_alloc(dma_pool, GFP_KERNEL,
> -                                             &port->desc_tab_phys)))
> +       port->desc_tab = dma_pool_zalloc(dma_pool, GFP_KERNEL,
> +                                        &port->desc_tab_phys);
> +       if (!port->desc_tab)
>                 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));
>
> --
> 1.9.1
>



-- 
Доброї вам пори дня.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ