Commit 7ceb740c authored by Souptick Joarder's avatar Souptick Joarder Committed by Doug Ledford

IB/mthca: Replace pci_pool_alloc by pci_pool_zalloc

In mthca_create_ah(), pci_pool_alloc() followed by memset will be
replaced by pci_pool_zalloc()
Signed-off-by: default avatarSouptick joarder <jrdr.linux@gmail.com>
Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 1974ab9d
...@@ -186,8 +186,8 @@ int mthca_create_ah(struct mthca_dev *dev, ...@@ -186,8 +186,8 @@ int mthca_create_ah(struct mthca_dev *dev,
on_hca_fail: on_hca_fail:
if (ah->type == MTHCA_AH_PCI_POOL) { 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); GFP_ATOMIC, &ah->avdma);
if (!ah->av) if (!ah->av)
return -ENOMEM; return -ENOMEM;
...@@ -196,8 +196,6 @@ int mthca_create_ah(struct mthca_dev *dev, ...@@ -196,8 +196,6 @@ int mthca_create_ah(struct mthca_dev *dev,
ah->key = pd->ntmr.ibmr.lkey; 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->port_pd = cpu_to_be32(pd->pd_num | (ah_attr->port_num << 24));
av->g_slid = ah_attr->src_path_bits; av->g_slid = ah_attr->src_path_bits;
av->dlid = cpu_to_be16(ah_attr->dlid); av->dlid = cpu_to_be16(ah_attr->dlid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment