aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_init_chip.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-05 03:07:36 +0000
committerRoland Dreier <rolandd@cisco.com>2011-01-12 11:11:58 -0800
commit948579cd8c6ea7c8c98c52b79f4470952e182ebd (patch)
tree77e85adbdd07be8394fa60d08d3f1dbda3c67393 /drivers/infiniband/hw/ipath/ipath_init_chip.c
parent4162cf64973df51fc885825bc9ca4d055891c49f (diff)
downloadkernel_samsung_smdk4412-948579cd8c6ea7c8c98c52b79f4470952e182ebd.zip
kernel_samsung_smdk4412-948579cd8c6ea7c8c98c52b79f4470952e182ebd.tar.gz
kernel_samsung_smdk4412-948579cd8c6ea7c8c98c52b79f4470952e182ebd.tar.bz2
RDMA: Use vzalloc() to replace vmalloc()+memset(0)
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_init_chip.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_init_chip.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c
index 7769382..fef0f42 100644
--- a/drivers/infiniband/hw/ipath/ipath_init_chip.c
+++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c
@@ -442,7 +442,7 @@ static void init_shadow_tids(struct ipath_devdata *dd)
struct page **pages;
dma_addr_t *addrs;
- pages = vmalloc(dd->ipath_cfgports * dd->ipath_rcvtidcnt *
+ pages = vzalloc(dd->ipath_cfgports * dd->ipath_rcvtidcnt *
sizeof(struct page *));
if (!pages) {
ipath_dev_err(dd, "failed to allocate shadow page * "
@@ -461,9 +461,6 @@ static void init_shadow_tids(struct ipath_devdata *dd)
return;
}
- memset(pages, 0, dd->ipath_cfgports * dd->ipath_rcvtidcnt *
- sizeof(struct page *));
-
dd->ipath_pageshadow = pages;
dd->ipath_physshadow = addrs;
}