From patchwork Mon Nov 28 13:28:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 9449527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BF78060235 for ; Mon, 28 Nov 2016 13:28:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADC9F27C0C for ; Mon, 28 Nov 2016 13:28:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A070727CF3; Mon, 28 Nov 2016 13:28:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AD9427C0C for ; Mon, 28 Nov 2016 13:28:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932662AbcK1N22 (ORCPT ); Mon, 28 Nov 2016 08:28:28 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34169 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932469AbcK1N2X (ORCPT ); Mon, 28 Nov 2016 08:28:23 -0500 Received: by mail-pg0-f65.google.com with SMTP id e9so13158897pgc.1; Mon, 28 Nov 2016 05:28:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=3ZcEG4dNAM1TX0EsIWeexwFDpkTaPGMt1hX+wmAQgnQ=; b=Rdr0yzzFCZ342q8HGDnTQcYgJ1EhjQN4FRwwy9zJoOUyK2DNtPm62Ifdio2BRdLA4Y aUchW+Y+22rn/ybt1scD3QqlrCTJ+rbIJogHs/MzsVuKRMySuAKxqDGNE9MviDuJL6WE ShznTW5xhSGM4t+nh03yjQ4X5zTZrnYf+zyywKAn5p/2AaEEMfKhVNNVik4wKK+bqUth OOArptGhK28Wz37kvfZPWfWjxSsvSjQ6jiZcRe6Czh5r3PpzRF2haxIps8V06j83+vWH wejjtZ5nsJh8IIL/yS47eCPCdynE1SykAdqtEzHkK0c/7lZvkSLIqq3tAC8EMEds1XCZ 0pGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=3ZcEG4dNAM1TX0EsIWeexwFDpkTaPGMt1hX+wmAQgnQ=; b=dfbmompAvwdyTEPU7lpQQFktMFBz000wcivd9E6KzUdqX+3AjaFfo9ZQ7JWn2K+wME wFnR7Fz2UK6dBBIwlna2COS2opLXmGQ8VAnyO72ciRPv10Xiyim1XMcRbL/xcJO6ACyd JwJ4g9h5L72Hkbw/P+mr+lp1zHocpOKwt2WhzgXvphP2Do1qQoidVGBBZxPyVZdnRCPy 4TRlXzNtEST/Yd3FCnUIqWasrDwpD9c1oUbmMBgUrLz/x2Huocutp75cc7lb9K7dR3wk YsYA0kmYb+fhIFOpIGsgpuNea2iT/pH0AQRD9PkPQd6bcOoMKi7/OwM+tmHvhQWnAwde vZgw== X-Gm-Message-State: AKaTC01ogz4rLQV7RWevcYFciljnePoxlRQyqXkPsFOLQfBsjTkPjS4MmbWs0B/AHNswKw== X-Received: by 10.99.44.84 with SMTP id s81mr39748533pgs.153.1480339702338; Mon, 28 Nov 2016 05:28:22 -0800 (PST) Received: from gnr743-HP-ZBook-15 ([223.31.70.102]) by smtp.gmail.com with ESMTPSA id s8sm87525544pfj.45.2016.11.28.05.28.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Nov 2016 05:28:21 -0800 (PST) Date: Mon, 28 Nov 2016 18:58:19 +0530 From: Souptick Joarder To: yishaih@mellanox.com Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, sahu.rameshwar73@gmail.com Subject: [PATCH] ethernet :mellanox :mlx4: Replace pci_pool_alloc by pci_pool_zalloc Message-ID: <20161128132819.GA500@gnr743-HP-ZBook-15> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In mlx4_alloc_cmd_mailbox(), pci_pool_alloc() followed by memset will be replaced by pci_pool_zalloc() Signed-off-by: Souptick joarder --- drivers/net/ethernet/mellanox/mlx4/cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c index e36bebc..ee3bd76 100644 --- a/drivers/net/ethernet/mellanox/mlx4/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c @@ -2679,14 +2679,13 @@ struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev) if (!mailbox) return ERR_PTR(-ENOMEM); - mailbox->buf = pci_pool_alloc(mlx4_priv(dev)->cmd.pool, GFP_KERNEL, + mailbox->buf = pci_pool_zalloc(mlx4_priv(dev)->cmd.pool, GFP_KERNEL, &mailbox->dma); if (!mailbox->buf) { kfree(mailbox); return ERR_PTR(-ENOMEM); } - memset(mailbox->buf, 0, MLX4_MAILBOX_SIZE); return mailbox; }