summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/amso1100/c2.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-08 14:24:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 15:57:28 -0700
commit9011a67b2fe9b89048bcba81745ef34394f6f7ab (patch)
tree9b50fb67c738f53423e4f9762f28a9c9d600c35e /drivers/infiniband/hw/amso1100/c2.c
parent7e835084fe1fff705be16e1db8a9e5e8f56b9b73 (diff)
downloadop-kernel-dev-9011a67b2fe9b89048bcba81745ef34394f6f7ab.zip
op-kernel-dev-9011a67b2fe9b89048bcba81745ef34394f6f7ab.tar.gz
infiniband: use pci_zalloc_consistent
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Tom Tucker <tom@opengridcomputing.com> Acked-by: Steve Wise <swise@opengridcomputing.com> Cc: Roland Dreier <roland@kernel.org> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: Faisal Latif <faisal.latif@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/infiniband/hw/amso1100/c2.c')
-rw-r--r--drivers/infiniband/hw/amso1100/c2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c
index 00400c3..766a71c 100644
--- a/drivers/infiniband/hw/amso1100/c2.c
+++ b/drivers/infiniband/hw/amso1100/c2.c
@@ -604,16 +604,14 @@ static int c2_up(struct net_device *netdev)
tx_size = c2_port->tx_ring.count * sizeof(struct c2_tx_desc);
c2_port->mem_size = tx_size + rx_size;
- c2_port->mem = pci_alloc_consistent(c2dev->pcidev, c2_port->mem_size,
- &c2_port->dma);
+ c2_port->mem = pci_zalloc_consistent(c2dev->pcidev, c2_port->mem_size,
+ &c2_port->dma);
if (c2_port->mem == NULL) {
pr_debug("Unable to allocate memory for "
"host descriptor rings\n");
return -ENOMEM;
}
- memset(c2_port->mem, 0, c2_port->mem_size);
-
/* Create the Rx host descriptor ring */
if ((ret =
c2_rx_ring_alloc(&c2_port->rx_ring, c2_port->mem, c2_port->dma,
OpenPOWER on IntegriCloud