From patchwork Mon Nov 28 12:51:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 9449519 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 527BD60235 for ; Mon, 28 Nov 2016 12:51:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B9BC26E64 for ; Mon, 28 Nov 2016 12:51:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F0AE277D9; Mon, 28 Nov 2016 12:51:33 +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 CA7DA26E64 for ; Mon, 28 Nov 2016 12:51:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754312AbcK1Mvb (ORCPT ); Mon, 28 Nov 2016 07:51:31 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34405 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754190AbcK1Mvb (ORCPT ); Mon, 28 Nov 2016 07:51:31 -0500 Received: by mail-pf0-f196.google.com with SMTP id y68so6478330pfb.1 for ; Mon, 28 Nov 2016 04:51:30 -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=wF8cHiUv6TVmk+8Z95xQwN65hRUdxRD46yehc+AGLCE=; b=YmWgfJrx4RW/c1h6TXy2+OPSqH8BaMoFH/bH16r8xLHLvMvXEjPNT2rVnwKAEuRwet kovCSXSrzPuGxFyhyw1huADhQBTlb3JhU8nyKYBc4lWyd0Alfy/viI4aj3H3hTAfamsk WatueCJTuah4eq/WgHBcJdT6aecvSEqUpLWzHtfm29ummPVsgItutZJj5Svtr5L5NRG1 xsdb7ijO4qvJ+r8T69mp+eHD+sc6x+GKo0RmiLANKPPjH7nZIEHBazyxUw6dZsl/1zd1 4+axBgl3l9vufmGHHQOBBHC5n496mqD3hanglvdgnfzdHVjfwSh5moQl1XNUNsEClpOY NpRg== 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=wF8cHiUv6TVmk+8Z95xQwN65hRUdxRD46yehc+AGLCE=; b=OsWYiL42YoMAtUe69sZMYdNXiXcqypKrE19sVTEKzjaeyeYjmGqKrNnMlWW5GE/e9e j9DjQNDxixjr3T8nCKvhzXTssdi0veSaTFxShnBctBJoRPSs/mmMk/1QrR0XuMLoMl51 hz4XDSVa2hHsZrSHNx9ytPNbEi9hAulvaLkBrIS69imwn0KzOH54x+N3YlXt6sD87piN /F6OuAjgWWHsVhZ2TgGwCAd0OYBmCPoHhKhcfj4Juy5TG1m/ZM/MSoQehsJJS6riUtQB tNIFHK56cVRbqlYCmrmb4rBG0NZVWvyntiTfhhDH3J63nAbAzwR8T9oG9BTGD2yWhMAt MyXA== X-Gm-Message-State: AKaTC01lsd/+7ydKM+7PYxnHOmC9qvn1tUgXdYOxqCF+t4kZQQV44xcpRqz6DJUBXwaG/A== X-Received: by 10.99.144.65 with SMTP id a62mr39450153pge.103.1480337490246; Mon, 28 Nov 2016 04:51:30 -0800 (PST) Received: from gnr743-HP-ZBook-15 ([223.31.70.102]) by smtp.gmail.com with ESMTPSA id b80sm87254120pfe.52.2016.11.28.04.51.28 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Nov 2016 04:51:28 -0800 (PST) Date: Mon, 28 Nov 2016 18:21:26 +0530 From: Souptick Joarder To: dledford@redhat.com, sean.hefty@intel.com, hal.rosenstock@gmail.com Cc: linux-rdma@vger.kernel.org, sahu.rameshwar73@gmail.com Subject: [PATCH] infiniband: mthca: Replace pci_pool_alloc by pci_pool_zalloc Message-ID: <20161128125126.GA32365@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 mthca_create_ah(), pci_pool_alloc() followed by memset will be replaced by pci_pool_zalloc() Signed-off-by: Souptick joarder --- drivers/infiniband/hw/mthca/mthca_av.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c index bcac294..c202c89 100644 --- a/drivers/infiniband/hw/mthca/mthca_av.c +++ b/drivers/infiniband/hw/mthca/mthca_av.c @@ -186,7 +186,7 @@ int mthca_create_ah(struct mthca_dev *dev, on_hca_fail: if (ah->type == MTHCA_AH_PCI_POOL) { - ah->av = pci_pool_alloc(dev->av_table.pool, + ah->av = pci_pool_zalloc(dev->av_table.pool, GFP_ATOMIC, &ah->avdma); if (!ah->av) return -ENOMEM; @@ -196,7 +196,6 @@ int mthca_create_ah(struct mthca_dev *dev, ah->key = pd->ntmr.ibmr.lkey; - memset(av, 0, MTHCA_AV_SIZE); av->port_pd = cpu_to_be32(pd->pd_num | (ah_attr->port_num << 24)); av->g_slid = ah_attr->src_path_bits;